diff --git a/CMakeLists.txt b/CMakeLists.txt index 1895abb..1a4c9ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,8 +89,6 @@ include(GNUInstallDirs) # Find / Build dependencies add_subdirectory(deps) -# Build and install the dmftproj executable -add_subdirectory(fortran/dmftproj) # Tests if(Build_Tests) diff --git a/fortran/dmftproj/CMakeLists.txt b/fortran/dmftproj/CMakeLists.txt deleted file mode 100644 index 0eddc06..0000000 --- a/fortran/dmftproj/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -# List the sources -set(SOURCES modules.f dmftproj.f readcomline.f set_ang_trans.f setsym.f - set_rotloc.f timeinv.f read_k_list.f set_projections.f orthogonal.f - rot_projectmat.f density.f symmetrize_mat.f rot_dens.f - orthogonal_wannier.f outputqmc.f outbwin.f outband.f) - -# The main target and what to link with... -add_executable(dmftproj ${SOURCES}) -target_link_libraries(dmftproj nda::blas_lapack) - -# where to install -install (TARGETS dmftproj DESTINATION bin) - -# install wien2k files -SET(D ${CMAKE_CURRENT_SOURCE_DIR}/SRC_templates/) -SET(WIEN_SRC_TEMPL_FILES ${D}/case.cf_f_mm2 ${D}/case.cf_p_cubic ${D}/case.indmftpr ${D}/run_triqs ${D}/runsp_triqs) -message(STATUS "-----------------------------------------------------------------------------") -message(STATUS " ******** WARNING ******** ") -message(STATUS " Wien2k 14.2 and older : after installation of DFTTools, copy the files from ") -message(STATUS " ${CMAKE_INSTALL_PREFIX}/share/triqs/Wien2k_SRC_files/SRC_templates ") -message(STATUS " to your Wien2k installation WIENROOT/SRC_templates (Cf documentation). ") -message(STATUS " For newer versions these files are already shipped with Wien2k. ") -message(STATUS "-----------------------------------------------------------------------------") -install (FILES ${WIEN_SRC_TEMPL_FILES} DESTINATION share/triqs/Wien2k_SRC_files/SRC_templates ) - diff --git a/fortran/dmftproj/SRC_templates/case.cf_f_mm2 b/fortran/dmftproj/SRC_templates/case.cf_f_mm2 deleted file mode 100644 index 3dea83d..0000000 --- a/fortran/dmftproj/SRC_templates/case.cf_f_mm2 +++ /dev/null @@ -1,14 +0,0 @@ - 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. -*0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. A1 -*0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. -.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. A2 - 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. -*0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. B1 - 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. -.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. -*0. 0. 0. 0. 0.70710678 0. 0. 0. -.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. B2 - 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. -*0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. A1 -*0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. -.70710678 0. 0. A2 - 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 -*0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0.70710678 0. 0. 0. 0. B1 - 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. -.70710678 0. -*0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.70710678 0. 0. 0. -.70710678 0. 0. 0. 0. 0. B2 diff --git a/fortran/dmftproj/SRC_templates/case.cf_p_cubic b/fortran/dmftproj/SRC_templates/case.cf_p_cubic deleted file mode 100644 index 69e90cd..0000000 --- a/fortran/dmftproj/SRC_templates/case.cf_p_cubic +++ /dev/null @@ -1,7 +0,0 @@ - 0.707106781 0. 0. 0. -0.707106781 0. 0. 0. 0. 0. 0. 0. - 0. 0.707106781 0. 0. 0. 0.707106781 0. 0. 0. 0. 0. 0. -*0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. - 0. 0. 0. 0. 0. 0. 0.707106781 0. 0. 0. -0.707106781 0. - 0. 0. 0. 0. 0. 0. 0. 0.707106781 0. 0. 0. 0.707106781 -*0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. - diff --git a/fortran/dmftproj/SRC_templates/case.indmftpr b/fortran/dmftproj/SRC_templates/case.indmftpr deleted file mode 100644 index 100fdd2..0000000 --- a/fortran/dmftproj/SRC_templates/case.indmftpr +++ /dev/null @@ -1,16 +0,0 @@ -3 ! Nsort -1 1 3 ! Mult(Nsort) -3 ! lmax -complex ! choice of angular harmonics -1 1 0 0 ! l included for each sort -0 0 0 0 ! If split into ireps, gives number of ireps. for a given orbital (otherwise 0) -cubic ! choice of angular harmonics -1 1 2 0 ! l included for each sort -0 0 2 0 ! If split into ireps, gives number of ireps. for a given orbital (otherwise 0) -01 ! -0 ! SO flag -complex ! choice of angular harmonics -1 1 0 0 ! l included for each sort -0 0 0 0 ! If split into ireps, gives number of ireps. for a given orbital (otherwise 0) --0.6 0.14 ! t2g + eg + Op - diff --git a/fortran/dmftproj/SRC_templates/run_triqs b/fortran/dmftproj/SRC_templates/run_triqs deleted file mode 100755 index 570ad21..0000000 --- a/fortran/dmftproj/SRC_templates/run_triqs +++ /dev/null @@ -1,784 +0,0 @@ -#!/bin/csh -f -hup -unalias rm -unalias mv - -set name = $0 -set bin = $name:h #directory of WIEN-executables -if !(-d $bin) set bin = . -set name = $name:t #name of this script-file -set logfile = :log -set tmp = (:$name) #temporary files - -set scratch = # set directory for vectors and help files -if ($?SCRATCH) then #if envronment SCRATCH is set - set scratch=`echo $SCRATCH | sed -e 's/\/$//'`/ #set $scratch to that value -endif - - - -#---> functions & subroutines -alias testinput 'set errin="\!:1";if (! -e \!:1 || -z \!:1) goto \!:2' - -alias teststatus 'if ($status) goto error' -alias testerror 'if (! -z \!:1.error) goto error' -alias teststop 'if (\!:1 == $stopafter ) goto stop' -alias cleandayfile 'grep -v "\[" $dayfile >.tmp;'\ - 'mv .tmp $dayfile' -alias output 'set date = `date +"(%T)"`;'\ - 'printf "> %s\t%s " "\!:*" "$date" >> $dayfile' - -alias exec '($bin/x \!:*) >> $dayfile;'\ - 'teststatus' - -alias total_exec 'output \!:*;'\ - 'exec \!:*;'\ - 'cleandayfile;'\ - 'testerror \!:1;'\ - 'teststop \!:1' -alias TOTtoFOR 'sed "s/TOT/FOR/" \!:1 > $tmp;'\ - 'mv $tmp \!:1' -alias FORtoTOT 'sed "s/FOR/TOT/" \!:1 > $tmp;'\ - 'mv $tmp \!:1' -alias IPRINT_inc 'sed "s/0 NUMBER/1 NUMBER/g" \!:1 > .case.inc;'\ - 'mv .case.inc \!:1' - - -#---> default parameters -set ccut = 0.0000 #upper limit for charge convergence -set fcut = 0 #upper limit for force convergence -set ecut = 0.0001 #upper limit for energy convergence -unset ec_conv -set cc_conv -set fc_conv -set ec_test -unset ec_test1 -unset cc_test -unset fc_test -set iter = 40 #maximum number of iterations -set riter = 99 #restart after $riter iterations -set stopafter #stop after $stopafter -set next #set -> start cycle with $next -set qlimit = 0.05 #set -> writes E-L in new in1 when qlimit is fulfilled -set in1new = 999 -set write_all = -ef # new default: -in1ef is activated (version 10.1) -set para -set nohns -set nohns1 = 0 -set it -set readHinv -set it0 -unset vec2pratt -set itnum=0 -set itnum1=0 -set so -set complex -set complex2 -set cmplx -set cmplx2 -set broyd -set ctest=(0 0 0) -set etest=(0 0 0) -set msrcount=0 -# QDMFT -set qdmft -set hf -set diaghf -set nonself -set noibz -set newklist -set redklist -set NSLOTS = 1 -# END QDMFT - -#---> default flags -unset renorm -set in1orig -unset force #set -> force-calculation after self-consistency -unset f_not_conv -unset help #set -> help output -unset init #set -> switches initially set to total energy calc. - -#---> handling of input options -echo "> ($name) options: $argv" >> $logfile -alias sb 'shift; breaksw' #definition used in switch -while ($#argv) - switch ($1) - case -[H|h]: - set help; sb - case -so: - set complex2 = c - set cmplx2 = -c - set so = -so; sb - case -nohns: - set nohns = -nohns; shift; set nohns1 = $1;sb - case -it: - set itnum = 99; set it = -it; set it0 = -it; sb - case -it1: - set itnum = 99; set it = -it; set it0 = -it; touch .noHinv; sb - case -it2: - set itnum = 99; set it = -it; set it0 = -it; touch .fulldiag; sb - case -noHinv: - set itnum = 99; set it = -it; set it0 = -it; set readHinv = -noHinv; sb - case -vec2pratt: - set vec2pratt; sb - case -p: - set para = -p; sb - case -I: - set init; sb - case -NI: - unset broyd; sb - case -e: - shift; set stopafter = $1; sb - case -cc: - shift; set ccut = $1; set cc_test;unset cc_conv; sb - case -ec: - shift; set ecut = $1; set ec_test1;unset ec_conv; sb - case -fc: - shift; set f_not_conv; set fcut = $1; set fc_test;unset fc_conv; sb - case -ql: - shift; set qlimit = $1; sb - case -in1ef: - set in1new = -1;set write_all = -ef; sb - case -in1new: - shift; set in1new = $1;set write_all; sb - case -in1orig: - set in1orig = -in1orig; set in1new = 999; sb - case -renorm: - set renorm; set next=scf1; sb - case -i: - shift; set iter = $1; sb - case -r: - shift; set riter = $1; sb - case -s: - shift; set next = $1; sb -# QDMFT - case -qdmft: - set qdmft=-qdmft; shift; set NSLOTS = $1; sb -# END QDMFT - case -hf: - set hf = -hf; sb - case -diaghf: - set diaghf = -diaghf; set hf = -hf; set iter = 1; sb - case -nonself: - set nonself = -nonself; set hf = -hf; set iter = 1; sb - case -noibz: - set noibz = -noibz; sb - case -newklist: - set newklist = -newklist; set hf = -hf; sb - case -redklist: - set redklist = -redklist; set hf = -hf; sb - default: - echo "ERROR: option $1 does not exist \!"; sb - endsw -end -if ($?help) goto help - -if($?cc_test) then - unset ec_test;set ec_conv -endif -if($?fc_test) then - unset ec_test;set ec_conv -endif -if($?ec_test1) then - set ec_test;unset ec_conv -endif -if(! $?ec_test) then - set ecut=0 -endif - -#---> path- and file-names -set file = `pwd` -set file = $file:t #tail of file-names -set dayfile = $file.dayfile #main output-file - -#---> starting out -printf "\nCalculating $file in `pwd`\non `hostname` with PID $$\n" > $dayfile -echo "using `cat $WIENROOT/VERSION` in $WIENROOT" >> $dayfile -printf "\n:LABEL1: Calculations in `pwd`\n:LABEL2: on `hostname` at `date`\n" >> $file.scf -echo ":LABEL3: using `cat $WIENROOT/VERSION` in $WIENROOT" >> $file.scf - -if ( "$so" == "-so" && "$hf" == "-hf") then - echo "Hartree-Fock and spin-orbit coupling not supported yet. STOP" - echo "Hartree-Fock and spin-orbit coupling not supported yet. STOP" >> $file.dayfile - exit 9 -endif - -if ( "$hf" == "-hf") then - if (-e $file.corewf) rm $file.corewf - IPRINT_inc $file.inc #modify IPRINT switch in case.inc -endif - -#---> complex -if ((-e $file.in1c) && !(-z $file.in1c)) then - set complex = c - set complex2 = c - set cmplx = -c - set cmplx2 = -c -endif - -set vresp -testinput $file.inm_vresp no_vresp -set vresp=-vresp -no_vresp: - -# set iter/riter to 999 when MSR1a/MSECa is used -set testmsr=`head -1 $file.inm | grep "MSR[12]a" | cut -c1-3` -set testmsr1=`head -1 $file.inm | grep "MSECa" | cut -c1-5` -if($testmsr1 == 'MSECa') set testmsr=MSR -if ($testmsr == 'MSR') then - if($riter == "99") set riter=999 - if($iter == "40") set iter=999 - foreach i ($file.in2*) - TOTtoFOR $i #switch FOR-label - echo changing TOT to FOR in $i - end - if (! -e $file.inM && ! -z $file.inM ) then - x pairhess - echo $file.inM and .minrestart have been created by pairhess >>$dayfile - endif -endif - -if ($next != "") goto start #start with optional program -set next = lapw0 #default start with lstart - -if !(-e $file.clmsum) then - if (-e $file.clmsum_old) then - cp $file.clmsum_old $file.clmsum - else - echo 'no' $file'.clmsum(_old) file found, which is necessary for lapw0 \!' - echo 'no' $file'.clmsum(_old) file found, which is necessary for lapw0 \!'\ - >>$dayfile - goto error - endif -endif - -if ($?broyd) then - if (-e $file.broyd1) then - echo "$file.broyd* files present \! You did not save_lapw a previous clculation." - echo "You have 60 seconds to kill this job ( ^C or kill $$ )" - echo "or the script will rm *.broyd* and continue (use -NI to avoid automatic rm)" - sleep 60 - rm *.broyd* - echo "$file.broyd* files removed \!" >> $dayfile - endif -endif - -start: #initalization of in2-files -if ($?init && $testmsr != 'MSR' ) then - foreach i ($file.in2*) - sed "1s/[A-Z]..../TOT /" $i > $tmp - mv $tmp $i - end -endif - -set icycle=1 - -set riter_save=$riter -printf "\n\n start \t(%s) " "`date`" >> $dayfile - -#goto mixer only if clmval file is present -if ($next == "scf1") then - if !(-e $file.clmval) then - set next = lapw0 - endif -endif - -echo "with $next ($iter/$riter to go)" >> $dayfile -goto $next - - -cycle: #begin of sc-cycle -nohup echo in cycle $icycle " ETEST: $etest[3] CTEST: $ctest[3]" -hup - -if ($it == '-it' ) then - set ittest=`echo "$icycle / $itnum * $itnum "| bc` - if ( $ittest == $icycle ) touch .fulldiag -endif - -lapw0: -printf "\n cycle $icycle \t(%s) \t(%s)\n\n" "`date`" "$iter/$riter to go" >> $dayfile - -testinput $file.in0_grr cont_lapw0 -total_exec lapw0 -grr $para - -cont_lapw0: -testinput $file.in0 error_input -total_exec lapw0 $para - -if ($fcut == "0") goto lapw1 -set f_exist=`grep :FHF $file.scf0` -if ($#f_exist == 0 ) then - set fcut=0 - set fc_conv - echo Force-convergence not possible. Forces not present. - echo Force-convergence not possible. Forces not present.>> $dayfile - if($?ec_test) goto lapw1 - if($?cc_test) goto lapw1 - goto error -endif -#---> test of force-convergence for all forces -if !(-e $file.scf) goto lapw1 - if(! $?ec_conv) goto lapw1 - if(! $?cc_conv) goto lapw1 -set natom=`head -2 $file.struct |tail -1 |cut -c28-30` -#set natom = `grep UNITCELL $file.output0 |awk '{print $NF}'` -set iatom = 1 -set ftest = (1 0) -grep :FOR $file.scf >test_forces.scf -while ($iatom <= $natom) #cycle over all atoms - set itest=$iatom - @ itest ++ - testinput $file.inM cont_force_test - set atest=`head -$itest $file.inM |tail -1` - set itest=`echo " $atest[1] + $atest[2] + $atest[3]"|bc` - if ( $itest == '0' ) goto skipforce - cont_force_test: - if ($iatom <= 9) then - set test = (`$bin/testconv -p :FOR00$iatom -c $fcut -f test_forces`) - else if ($iatom <= 99) then - set test = (`$bin/testconv -p :FOR0$iatom -c $fcut -f test_forces`) - else - set test = (`$bin/testconv -p :FOR$iatom -c $fcut -f test_forces`) - endif - if !($test[1]) set ftest[1] = 0 - set ftest[2] = $test[2] - set ftest = ($ftest $test[3] $test[4]) -skipforce: - @ iatom ++ -end -rm test_forces.scf -echo ":FORCE convergence:" $ftest[1-] >> $dayfile - -if ($ftest[1]) then #force convergenced - if ($nohns == '-nohns') then - set nohns - echo "NOHNS deactivated by FORCE convergence" >> $dayfile - else -# set iter = 1 - if(! $?ec_conv) goto lapw1 - if(! $?cc_conv) goto lapw1 - set fc_conv - unset f_not_conv - foreach i ($file.in2*) - TOTtoFOR $i #switch FOR-label - end - endif -else - unset fc_conv -endif - -lapw1: -testinput $file.in1$complex error_input -#generates in1-file from :EPL/EPH in case.scf2 -# if ($icycle == $in1new) rm $file.broyd1 $file.broyd2 - if ($icycle >= $in1new ) then - if (! -e $file.in1${complex}_orig ) cp $file.in1${complex} $file.in1${complex}_orig - write_in1_lapw $write_all -ql $qlimit $cmplx >> $dayfile - if($status == 0 ) cp $file.in1${complex}new $file.in1${complex} - endif -if($in1orig == '-in1orig') then - if ( -e $file.in1${complex}_orig ) mv $file.in1${complex}_orig $file.in1${complex} -# unset in1orig -endif - -set readHinv0 = $readHinv -if (-e .noHinv) then - echo " case.storeHinv files removed" - set readHinv0 = -noHinv0 - rm .noHinv -endif -if (-e .fulldiag) then - echo " full diagonalization forced" - set it0 - set readHinv0 - rm .fulldiag -endif -if ( $it0 == "-it" ) then - touch ${scratch}$file.vector.old - if( ! $?vec2pratt ) then - foreach i (${scratch}$file.vector*.old) - rm $i - end - vec2old_lapw $para >> $dayfile - else - vec2pratt_lapw $para >> $dayfile - endif -endif - -if ( $hf == "-hf" ) then - if ((-e $file.vectorhf) && !(-z $file.vectorhf)) then - mv $file.vectorhf $file.vectorhf_old - if (!(-e $file.weighhf) || (-z $file.weighhf)) mv $file.energyhf $file.tmp_energyhf - else if ((-e $file.vectorhf_old) && !(-z $file.vectorhf_old)) then - if (!(-e $file.weighhf) || (-z $file.weighhf)) mv $file.energyhf $file.tmp_energyhf - else - cp $file.kgen_fbz $file.kgen - cp $file.klist_fbz $file.klist - total_exec lapw1 $it0 $nohns $readHinv0 $cmplx - mv $file.vector $file.vectorhf_old - mv $file.energy $file.tmp_energyhf - if (-e $file.weighhf) rm $file.weighhf - endif - cp $file.kgen_ibz $file.kgen - cp $file.klist_ibz $file.klist - if (!(-e $file.vsp_old) || (-z $file.vsp_old)) then - cp $file.vsp $file.vsp_old - endif -endif - -total_exec lapw1 $it0 $para $nohns $readHinv0 $cmplx -set it0 = $it -set readHinv0 = $readHinv - -lapwso: -if ( -e $file.scfso ) rm $file.scfso -if ( "$so" == "-so" ) then - testinput $file.inso error_input - total_exec lapwso $para $cmplx -endif - -lapw2: -testinput $file.in2$complex2 error_input -if ( $hf == "-hf" ) then - if (!(-e $file.weighhf) || (-z $file.weighhf)) then - cp $file.kgen_fbz $file.kgen - cp $file.klist_fbz $file.klist - if (-e $file.vector) mv $file.vector $file.vector_save - mv $file.vectorhf_old $file.vector - if (-e $file.energy) mv $file.energy $file.energy_save - mv $file.tmp_energyhf $file.energy - total_exec lapw2 $vresp $in1orig $cmplx2 - mv $file.weigh $file.weighhf - mv $file.vector $file.vectorhf_old - if (-e $file.vector_save) mv $file.vector_save $file.vector - mv $file.energy $file.energyhf - if (-e $file.energy_save) mv $file.energy_save $file.energy - cp $file.kgen_ibz $file.kgen - cp $file.klist_ibz $file.klist - endif -endif -#QDMFT -if ( "$qdmft" == "-qdmft" ) then - total_exec lapw2 $para $vresp -almd $cmplx2 $so - dmftproj $so # please check: $so can't be here - # pytriqs call - printf "\n> ERROR: Insert a correct call of pytriqs (with mpi wrapper, if needed) in run_triqs Wien2k script\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> ERROR: Insert a correct call of pytriqs (with mpi wrapper, if needed) in run_triqs Wien2k script\n" - exit 0 - # to call pytriqs uncomment and modify the line below to adapt it to your system - # the number of core is in NSLOTS variable - #mpprun --force-mpi=openmpi/1.3.2-i110074 /home/x_leopo/TRIQS_segment/triqs_install/bin/pytriqs $file.py - total_exec lapw2 $para $vresp -qdmft $cmplx2 $so -else - total_exec lapw2 $para $vresp $in1orig $cmplx2 $so - if ( $hf == "-hf" ) then - sed 's/:SUM/:SLSUM/g' < $file.scf2 > $file.scf2_tmp - mv $file.scf2_tmp $file.scf2 - mv $file.clmval $file.clmvalsl - if ( -e $file.scfhf_1 ) rm $file.scfhf_* - endif -endif -# END QDMFT - -rm -f $file.clmsc - -if ( $hf == "-hf" ) goto hf - -lapw1s: -testinput $file.in1${complex}s lcore -total_exec lapw1 -sc $para $nohns $readHinv $cmplx - -lapw2s: -testinput $file.in2${complex2}s error_input -total_exec lapw2 -sc $para $vresp $in1orig $cmplx2 -goto lcore - -hf: -testinput $file.inhf error_input -if (!(-e $file.corewf) || (-z $file.corewf)) then - total_exec lcore -endif -total_exec hf $diaghf $nonself $noibz $newklist $redklist $para $cmplx - -lapw2hf: -testinput $file.in2$complex2 error_input -cp $file.kgen_fbz $file.kgen -cp $file.klist_fbz $file.klist -total_exec lapw2 -hf $vresp $in1orig $cmplx2 -cp $file.kgen_ibz $file.kgen -cp $file.klist_ibz $file.klist - -lcore: -testinput $file.inc scf -total_exec lcore - -coresuper: - if ( ! -e .lcore) goto scf - total_exec dstart -lcore - rm -f $file.clmcor -endif - -scf: -if ( $hf == "-hf" ) then - foreach i ( 0 0_grr 1 so 2 1s 2s c hf 2hf ) - if (-e $file.scf$i) cat $file.scf$i >> $file.scf - end -else - foreach i ( 0 1 so 2 1s 2s c ) - if (-e $file.scf$i) cat $file.scf$i >> $file.scf - end -endif -scf1: -foreach i (clmsum vsp vns vrespsum ) - if (-e $file.$i ) \ - cp $file.$i $file.${i}_old #save last cycle -end - - -mixer: -testinput $file.inm error_input -total_exec mixer -cat $file.scfm >> $file.scf - -if($?renorm) then - unset renorm - rm $file.broy* -endif - -mixer_vresp: -testinput $file.inm_vresp energytest -total_exec mixer_vresp -grep -e "CTO " -e NEC $file.outputm_vresp | sed 's/:/:VRESP/' >> $file.scf -#total_exec int16 - -energytest: -#---> output energies -#set EF = `grep 'F E R' $file.scf2 |awk '{printf("%.5f", $NF)}'` -#set ET = `grep 'AL EN' $file.outputm |awk '{printf("%.5f", $NF)}'` -#cat << theend >> $dayfile -#EF $EF -#ET $ET -#theend -#echo $ET > $file.finM - -#---> test of energy convergence -#if ($ecut == "0") goto chargetest -set etest = (`$bin/testconv -p :ENE -c $ecut`) -teststatus -echo ":ENERGY convergence: $etest[1-3]" >> $dayfile -if (! $?ec_test) goto chargetest -if ($etest[1]) then - if ($nohns == '-nohns') then - set nohns - echo "NOHNS deactivated by ENERGY convergence" >> $dayfile - else -# set iter = 1 - set ec_conv - endif -else - unset ec_conv -endif - -chargetest: -#if ($ccut == "0.0000") goto nextiter -set ctest = (`$bin/testconv -p :DIS -c $ccut`) -teststatus -echo ":CHARGE convergence: $ctest[1-3]" >> $dayfile -if (! $?cc_test) goto nextiter -if ($ctest[1]) then - if ($nohns == '-nohns') then - set nohns - echo "NOHNS deactivated by CHARGE convergence" >> $dayfile - else -# set iter = 1 - set cc_conv - endif -else - unset cc_conv -endif - -# check F-condition for MSR1a mode -if ($testmsr == 'MSR') then - set msrtest =(`grep :FRMS $file.scf |tail -1` ) - if ($#msrtest >= 13 ) then - echo msrcount $msrcount msrtest $msrtest[13] -# Trap silly early convergene with "minimum-requests" - set etest2 = (`$bin/testconv -p :ENE -c 0.001`) - if ( $etest2[1] == '0')set msrtest[13]='F' - set ctest2 = (`$bin/testconv -p :DIS -c 0.01`) - if ( $ctest2[1] == '0')set msrtest[13]='F' -# - if ($msrtest[13] == 'T') then - #change in case.inm MSR1a/MSECa to MSR1/MSEC3, rm *.bro*, unset testmsr -@ msrcount ++ - if($msrcount == 3) then - sed "1s/MSR1a/MSR1 /" $file.inm >$file.inm_tmp - sed "1s/MSECa/MSEC3/" $file.inm_tmp >$file.inm - rm *.broy* $file.inm_tmp - set a=`grep -e GREED *scfm | tail -1 | cut -c 50-55` - set b=`echo "scale=5; if( $a/2 > 0.05) $a/2 else 0.05 " |bc -l` - echo $b > .msec - echo "MSR1a/MSECa changed to MSR1/MSEC3 in $file.inm, relaxing only electrons" >> $dayfile - set testmsr - endif - else - set msrcount=0 - endif - endif -endif - -#---> output forces -#grep 'FTOT' $file.outputm|awk '{print "FT ",$2,$4,$5,$6}'\ -# >> $dayfile -#grep 'FTOT' $file.outputm|awk '{print $4,$5,$6}' \ -# >> $file.finM - -nextiter: -@ iter -- -@ riter -- -@ nohns1 -- -@ icycle ++ - -if ($icycle == 2) set newklist - -#---> nohns -if (! $nohns1 ) then - set nohns - echo "NOHNS deactivated" >> $dayfile -endif - -#---> restart -if (! $riter && -e $file.broyd1) then - echo " restart" >> $dayfile - rm $file.broyd1 $file.broyd2 - set riter=$riter_save -endif - -foreach i ($tmp) #delete temporary files - if (-e $i) rm $i -end - -#output cycle -#printf "%s\n\n" "$iter/$riter to go" >> $dayfile -if (-e .stop) goto stop1 -if ($testmsr == 'MSR' && -e .minstop) then - sed "1s/MSR1a/MSR1 /" $file.inm >$file.inm_tmp - sed "1s/MSECa/MSEC3/" $file.inm_tmp >$file.inm - rm *.broy* $file.inm_tmp - set a=`grep -e GREED *scfm | tail -1 | cut -c 50-55` - set b=`echo "scale=5; if( $a/2 > 0.05) $a/2 else 0.05 " |bc -l` - echo $b > .msec - echo "MSR1a/MSECa changed to MSR1/MSEC3 in $file.inm, relaxing only electrons" >> $dayfile - set testmsr -endif - -echo ec cc and fc_conv $?ec_conv $?cc_conv $?fc_conv -echo ec cc and fc_conv $?ec_conv $?cc_conv $?fc_conv >> $dayfile -if($?ec_conv && $?cc_conv && $?fc_conv && ($testmsr == '') ) goto stop - -if ($iter) goto cycle #end of sc-cycle - -if ( $?f_not_conv ) then - printf "\n> FORCES NOT CONVERGED\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> FORCES NOT CONVERGED\n" - exit 3 -endif -if ( ! $?ec_conv ) then - printf "\n> energy in SCF NOT CONVERGED\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> energy in SCF NOT CONVERGED\n" - exit 0 -endif -if ( ! $?cc_conv ) then - printf "\n> charge in SCF NOT CONVERGED\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> charge in SCF NOT CONVERGED\n" - exit 0 -endif - -stop: #normal exit -printf "\n> stop\n" >> $dayfile -printf "\n> stop\n" -exit 0 - -stop1: #normal exit -printf "\n> stop due to .stop file\n" >> $dayfile -rm .stop -printf "\n> stop due to .stop file\n" -exit 1 - -error_input: #error exit -printf "\n> stop error: the required input file $errin for the next step could not be found\n" >> $dayfile -printf "\n> stop error: the required input file $errin for the next step could not be found\n" -exit 9 - -error: #error exit -printf "\n> stop error\n" >> $dayfile -printf "\n> stop error\n" -exit 9 - -help: #help exit -cat << theend - -PROGRAM: $0 - -PURPOSE: running the nonmagnetic scf-cycle in WIEN - to be called within the case-subdirectory - has to be located in WIEN-executable directory - -USAGE: $name [OPTIONS] [FLAGS] - -OPTIONS: --cc LIMIT -> charge convergence LIMIT (0.0001 e) --ec LIMIT -> energy convergence LIMIT ($ecut Ry) --fc LIMIT -> force convergence LIMIT (1.0 mRy/a.u.) - default is -ec 0.0001; multiple convergence tests possible --e PROGRAM -> exit after PROGRAM ($stopafter) --i NUMBER -> max. NUMBER ($iter) of iterations --s PROGRAM -> start with PROGRAM ($next) --r NUMBER -> restart after NUMBER ($riter) iterations (rm *.broyd*) --nohns NUMBER ->do not use HNS for NUMBER iterations --in1new N -> create "new" in1 file after N iter (write_in1 using scf2 info) --ql LIMIT -> select LIMIT ($qlimit) as min.charge for E-L setting in new in1 --qdmft NP -> including DMFT from Aichhorn/Georges/Biermann running on NP proc - -FLAGS: --h/-H -> help --I -> with initialization of in2-files to "TOT" --NI -> does NOT remove case.broyd* (default: rm *.broyd* after 60 sec) --p -> run k-points in parallel (needs .machine file [speed:name]) --it -> use iterative diagonalization --it1 -> use iterative diag. with recreating H_inv (after basis change) --it2 -> use iterative diag. with reinitialization (after basis change) --noHinv -> use iterative diag. without H_inv --vec2pratt -> use vec2pratt instead of vec2old for iterative diag. --so -> run SCF including spin-orbit coupling --renorm-> start with mixer and renormalize density --in1orig-> if present, use case.in1_orig file; do not modify case.in1 --hf -> HF/hybrid-DFT calculation --diaghf -> non-selfconsistent HF with diagonal HF only (only e_i) --nonself -> non-selfconsistent HF/hybrid-DFT calculation (only E_x(HF)) --newklist -> HF/hybrid-DFT calculation starting from a different k-mesh --redklist -> HF/hybrid-DFT calculation with a reduced k-mesh for the potential - -CONTROL FILES: -.lcore runs core density superposition producing case.clmsc -.stop stop after SCF cycle -.minstop stops MSR1a minimization and changes to MSR1 -.fulldiag force full diagonalization -.noHinv remove case.storeHinv files -case.inm_vresp activates calculation of vresp files for meta-GGAs -case.in0_grr activates a second call of lapw0 (mBJ pot., or E_xc analysis) - -ENVIRONMENT VARIBLES: -SCRATCH directory where vectors and help files should go - -theend - -exit 1 - - diff --git a/fortran/dmftproj/SRC_templates/runsp_triqs b/fortran/dmftproj/SRC_templates/runsp_triqs deleted file mode 100755 index 57e150a..0000000 --- a/fortran/dmftproj/SRC_templates/runsp_triqs +++ /dev/null @@ -1,975 +0,0 @@ -#!/bin/csh -f -hup -unalias rm - -set name = $0 -set bin = $name:h #directory of WIEN-executables -if !(-d $bin) set bin = . -set name = $name:t #name of this script-file -set logfile = :log -set tmp = (:$name) #temporary files - -set scratch = # set directory for vectors and help files -if ($?SCRATCH) then #if envronment SCRATCH is set - set scratch=`echo $SCRATCH | sed -e 's/\/$//'`/ #set $scratch to that value -endif - -#---> functions & subroutines -alias testinput 'set errin="\!:1";if (! -e \!:1 || -z \!:1) goto \!:2' -alias teststatus 'if ($status) goto error' -alias testerror 'if ( -e \!:1.error && ! -z \!:1.error) goto error' -alias teststop 'if (\!:1 == $stopafter ) goto stop' -alias cleandayfile 'grep -v "\[" $dayfile >.tmp;'\ - 'mv .tmp $dayfile' -alias output 'set date = `date +"(%T)"`;'\ - 'printf "> %s\t%s " "\!:*" "$date" >> $dayfile' - -alias exec '($bin/x \!:*) >> $dayfile;'\ - 'teststatus' - -alias total_exec 'output \!:*;'\ - 'exec \!:*;'\ - 'cleandayfile;'\ - 'testerror \!:1;'\ - 'testerror up\!:1;'\ - 'testerror dn\!:1;'\ - 'teststop \!:1' -alias TOTtoFOR 'sed "s/TOT/FOR/" \!:1 > $tmp;'\ - 'mv $tmp \!:1' -alias FORtoTOT 'sed "s/FOR/TOT/" \!:1 > $tmp;'\ - 'mv $tmp \!:1' -alias IPRINT_inc 'sed "s/0 NUMBER/1 NUMBER/g" \!:1 > $tmp;'\ - 'mv $tmp \!:1' - -#---> default parameters -set ccut = 0.0000 #upper limit for charge convergence -set fcut = 0 #upper limit for force convergence -set ecut = 0.0001 #upper limit for energy convergence -unset ec_conv -set cc_conv -set fc_conv -set ec_test -unset ec_test1 -unset cc_test -unset fc_test -set iter = 40 #maximum number of iterations -set riter = 99 #restart after $riter iterations -set stopafter #stop after $stopafter -set next #set -> start cycle with $next -set qlimit = 0.05 #set -> writes E-L in new in1 when qlimit is fulfilled -set in1new = 999 -set write_all = -ef # new default: -in1ef is activated (version 10.1) -set para -set nohns -set nohns1 = 0 -set it -set readHinv -unset vec2pratt -set it0 -set itnum=0 -set itnum1=0 -set complex -set complex2 -set cmplx -set cmplx2 -set so -set orb -set broyd -set eece1 -unset eece -unset orbc -unset orbdu -unset dm -set ctest=(0 0 0) -set etest=(0 0 0) -set msrcount=0 -# QDMFT -set qdmft -set hf -set diaghf -set nonself -set noibz -set newklist -set redklist -set NSLOTS = 1 -# END QDMFT - -#---> default flags -unset renorm -set in1orig -unset force #set -> force-calculation after self-consistency -unset f_not_conv -unset help #set -> help output -#unset complex #set -> complex calculation -unset init #set -> switches initially set to total energy calc. -unset lcore #set -> core density superposition - -#---> handling of input options -echo "> ($name) options: $argv" >> $logfile -alias sb 'shift; breaksw' #definition used in switch -while ($#argv) - switch ($1) - case -[H|h]: - set help; sb - case -so: - set complex2 = c - set cmplx2 = -c - set so = -so; sb - case -nohns: - set nohns = -nohns; shift; set nohns1 = $1;sb - case -dm: - set dm; sb - case -orb: - set orb = -orb; sb - case -orbc: - set orbc - set orb = -orb; sb - case -eece: - set eece - set eece1 = -eece - set orbc - set orb = -orb; sb - case -orbdu: - set orbdu - set orb = -orb; sb - case -it: - set itnum = 99; set it = -it; set it0 = -it; sb - case -it1: - set itnum = 99; set it = -it; set it0 = -it; touch .noHinv; sb - case -it2: - set itnum = 99; set it = -it; set it0 = -it; touch .fulldiag; sb - case -noHinv: - set itnum = 99; set it = -it; set it0 = -it; set readHinv = -noHinv; sb - case -vec2pratt: - set vec2pratt; sb - case -p: - set para = -p; sb - case -I: - set init; sb - case -NI: - unset broyd; sb - case -e: - shift; set stopafter = $1; sb - case -cc: - shift; set ccut = $1; set cc_test;unset cc_conv; sb - case -ec: - shift; set ecut = $1; set ec_test1;unset ec_conv; sb - case -fc: - shift; set f_not_conv; set fcut = $1; set fc_test;unset fc_conv; sb - case -ql: - shift; set qlimit = $1; sb - case -in1ef: - set in1new = -1;set write_all = -ef; sb - case -in1new: - shift; set in1new = $1;set write_all; sb - case -in1orig: - set in1orig = -in1orig; set in1new = 999; sb - case -renorm: - set renorm; set next=scf1; sb - case -i: - shift; set iter = $1; sb - case -r: - shift; set riter = $1; sb - case -s: - shift; set next = $1; sb -# QDMFT - case -qdmft: - set qdmft=-qdmft; shift; set NSLOTS = $1; sb -# END QDMFT - case -hf: - set hf = -hf; sb - case -diaghf: - set diaghf = -diaghf; set hf = -hf; set iter = 1; sb - case -nonself: - set nonself = -nonself; set hf = -hf; set iter = 1; sb - case -noibz: - set noibz = -noibz; sb - case -newklist: - set newklist = -newklist; set hf = -hf; sb - case -redklist: - set redklist = -redklist; set hf = -hf; sb - default: - echo "ERROR: option $1 does not exist\!"; sb - endsw -end -if ($?help) goto help - -if($?cc_test) then - unset ec_test;set ec_conv -endif -if($?fc_test) then - unset ec_test;set ec_conv -endif -if($?ec_test1) then - set ec_test;unset ec_conv -endif -if(! $?ec_test) then - set ecut=0 -endif - -#---> path- and file-names -set file = `pwd` -set file = $file:t #tail of file-names -set dayfile = $file.dayfile #main output-file - -#---> starting out -printf "\nCalculating $file in `pwd`\non `hostname` with PID $$\n" > $dayfile -echo "using `cat $WIENROOT/VERSION` in $WIENROOT" >> $dayfile -printf "\n:LABEL1: Calculations in `pwd`\n:LABEL2: on `hostname` at `date`\n" >> $file.scf -echo ":LABEL3: using `cat $WIENROOT/VERSION` in $WIENROOT" >> $file.scf - -if ( "$so" == "-so" && "$hf" == "-hf") then - echo "Hartree-Fock and spin-orbit coupling not supported yet. STOP" - echo "Hartree-Fock and spin-orbit coupling not supported yet. STOP" >> $file.dayfile - exit 9 -endif - -if ( "$hf" == "-hf") then - if (-e $file.corewfup) rm $file.corewfup - if (-e $file.corewfdn) rm $file.corewfdn - IPRINT_inc $file.inc # modify IPRINT switch in case.inc - if ( ! -z $file.incup && -e $file.incup ) then - IPRINT_inc $file.incup - IPRINT_inc $file.incdn - endif -endif - -#---> complex -if ((-e $file.in1c) && !(-z $file.in1c)) then - set complex = c - set complex2 = c - set cmplx = -c - set cmplx2 = -c -endif - -set vresp -testinput $file.inm_vresp no_vresp -set vresp=-vresp -no_vresp: - -# set iter/riter to 999 when MSR1a/MSECa is used -set testmsr=`head -1 $file.inm | grep "MSR[12]a" | cut -c1-3` -set testmsr1=`head -1 $file.inm | grep "MSECa" | cut -c1-5` -if($testmsr1 == 'MSECa') set testmsr=MSR -if ($testmsr == 'MSR') then - if($riter == "99") set riter=999 - if($iter == "40") set iter=999 - foreach i ($file.in2*) - TOTtoFOR $i #switch FOR-label -echo changing $i - end - if (! -e $file.inM && ! -z $file.inM ) then - x pairhess - echo $file.inM and .minrestart have been created by pairhess >>$dayfile - endif -endif - -if ($next != "") goto start #start with optional program -set next = lapw0 #default start with lstart - -if !(-e $file.clmsum) then - if (-e $file.clmsum_old) then - cp $file.clmsum_old $file.clmsum - else - echo 'no' $file'.clmsum(_old) file found, which is necessary for lapw0 \!' - echo 'no' $file'.clmsum(_old) file found, which is necessary for lapw0 \!'\ - >>$dayfile - goto error - endif -endif - -if ($?broyd) then - if (-e $file.broyd1) then - echo "$file.broyd* files present \! You did not save_lapw a previous clculation." - echo "You have 60 seconds to kill this job ( ^C or kill $$ )" - echo "or the script will rm *.broyd* and continue (use -NI to avoid automatic rm)" - sleep 60 - rm *.broyd* - echo "$file.broyd* files removed \!" >> $dayfile - endif -endif - -start: #initalization of in2-files -if ($?init && $testmsr != 'MSR') then - foreach i ($file.in2*) - sed "1s/[A-Z]..../TOT /" $i > $tmp - mv $tmp $i - end -endif - -set icycle=1 - -set riter_save=$riter -printf "\n\n start \t(%s) " "`date`" >> $dayfile - -#goto mixer only if clmval file is present -if ($next == "scf1") then - if !(-e $file.clmvalup) then - set next = lapw0 - endif -endif - -echo "with $next ($iter/$riter to go)" >> $dayfile -goto $next - -cycle: #begin of sc-cycle -nohup echo in cycle $icycle " ETEST: $etest[3] CTEST: $ctest[3]" -hup - -if ($it == '-it' ) then - set ittest=`echo "$icycle / $itnum * $itnum "| bc` - if ( $ittest == $icycle ) touch .fulldiag -endif - -lapw0: -printf "\n cycle $icycle \t(%s) \t(%s)\n\n" "`date`" "$iter/$riter to go" >> $dayfile - -testinput $file.in0_grr cont_lapw0 -total_exec lapw0 -grr $para - -cont_lapw0: -testinput $file.in0 error_input - -#fix for NFS bug -touch $file.vspup $file.vspdn $file.vnsup $file.vnsdn -rm $file.vspup $file.vspdn $file.vnsup $file.vnsdn - -total_exec lapw0 $para - -if ($fcut == "0") goto orb -set f_exist=`grep :FHF $file.scf0` -if ($#f_exist == 0 ) then - set fcut=0 - set fc_conv - echo Force-convergence not possible. Forces not present. - echo Force-convergence not possible. Forces not present.>> $dayfile - if($?ec_test) goto orb - if($?cc_test) goto orb - goto error -endif - -#---> test of force-convergence for all forces -if !(-e $file.scf) goto orb - if(! $?ec_conv) goto orb - if(! $?cc_conv) goto orb -set natom=`head -2 $file.struct |tail -1 |cut -c28-30` -#set natom = `grep UNITCELL $file.output0 |awk '{print $NF}'` -set iatom = 1 -set ftest = (1 0) -grep :FOR $file.scf >test_forces.scf -while ($iatom <= $natom) #cycle over all atoms - set itest=$iatom - @ itest ++ - testinput $file.inM cont_force_test - set atest=`head -$itest $file.inM |tail -1` - set itest=`echo " $atest[1] + $atest[2] + $atest[3]"|bc` - if ( $itest == '0' ) goto skipforce - cont_force_test: - if ($iatom <= 9) then - set test = (`$bin/testconv -p :FOR00$iatom -c $fcut -f test_forces`) - else if ($iatom <= 99) then - set test = (`$bin/testconv -p :FOR0$iatom -c $fcut -f test_forces`) - else - set test = (`$bin/testconv -p :FOR$iatom -c $fcut -f test_forces`) - endif - if !($test[1]) set ftest[1] = 0 - set ftest[2] = $test[2] - set ftest = ($ftest $test[3] $test[4]) -skipforce: - @ iatom ++ -end -rm test_forces.scf -echo ":FORCE convergence:" $ftest[1-] >> $dayfile - -if ($ftest[1]) then #force convergenced - if ($nohns == '-nohns') then #force convergenced - set nohns - echo "NOHNS deactivated by FORCE convergence" >> $dayfile - else -# set iter = 1 - if(! $?ec_conv) goto orb - if(! $?cc_conv) goto orb - set fc_conv - unset f_not_conv - foreach i ($file.in2*) - TOTtoFOR $i #switch FOR-label - end - endif -else - unset fc_conv -endif - -orb: -foreach i (dmatup dmatdn dmatud ) - if (-e $file.$i"_old" ) rm $file.$i"_old" - if (-e $file.$i ) cp $file.$i $file.$i"_old" #save this cycle for next -end - -if ( -e $file.scforbup ) rm $file.scforbup -if ( -e $file.scforbdn ) rm $file.scforbdn -if ( -e $file.scforbdu ) rm $file.scforbdu -if ( -e $file.vorbdu ) rm $file.vorbdu - -if ( "$orb" != "-orb" ) goto lapw1 -if ( $?orbc ) goto lapw1 -if (! -e $file.dmatup || -z $file.dmatup ) then - set renorm - goto lapw1 -endif -testinput $file.inorb error_input -total_exec orb -up $para -total_exec orb -dn $para -if ( "$so" == "-so" && ! -z $file.dmatud && -e $file.dmatud ) then - if( $?orbdu ) then - total_exec orb -du $para -# vorbdu seems unphysical large, so we use it only with -orbdu switch) - endif -endif - -lapw1: -testinput $file.in1$complex error_input -set readHinv0 = $readHinv -if (-e .noHinv) then - echo " case.storeHinv files removed" - set readHinv0 = -noHinv0 - rm .noHinv -endif -if (-e .fulldiag) then - echo " full diagonalization forced" - set it0 - set readHinv0 - rm .fulldiag - touch ${scratch}$file.vector.old - rm ${scratch}$file.vector*.old -endif -if ( $it0 == "-it" ) then - touch ${scratch}$file.vector.old - if( ! $?vec2pratt ) then - foreach i (${scratch}$file.vector*.old) - rm $i - end - vec2old_lapw $para -up >> $dayfile - vec2old_lapw $para -dn >> $dayfile - else - vec2pratt_lapw $para -up >> $dayfile - vec2pratt_lapw $para -dn >> $dayfile - endif -endif - -if ( -e dnlapw1.error ) rm dnlapw1.error - -if ( $hf == "-hf" ) then - if ((-e $file.vectorhfup) && !(-z $file.vectorhfup) && \ - (-e $file.vectorhfdn) && !(-z $file.vectorhfdn)) then - mv $file.vectorhfup $file.vectorhfup_old - mv $file.vectorhfdn $file.vectorhfdn_old - if (!(-e $file.weighhfup) || (-z $file.weighhfup) || \ - !(-e $file.weighhfdn) || (-z $file.weighhfdn)) then - mv $file.energyhfup $file.tmp_energyhfup - mv $file.energyhfdn $file.tmp_energyhfdn - endif - else if ((-e $file.vectorhfup_old) && !(-z $file.vectorhfup_old) && \ - (-e $file.vectorhfdn_old) && !(-z $file.vectorhfdn_old)) then - if (!(-e $file.weighhfup) || (-z $file.weighhfup) || \ - !(-e $file.weighhfdn) || (-z $file.weighhfdn)) then - mv $file.energyhfup $file.tmp_energyhfup - mv $file.energyhfdn $file.tmp_energyhfdn - endif - else - cp $file.kgen_fbz $file.kgen - cp $file.klist_fbz $file.klist - total_exec lapw1 $it0 -up $nohns $readHinv0 $cmplx - total_exec lapw1 $it0 -dn $nohns $readHinv0 $cmplx - mv $file.vectorup $file.vectorhfup_old - mv $file.vectordn $file.vectorhfdn_old - mv $file.energyup $file.tmp_energyhfup - mv $file.energydn $file.tmp_energyhfdn - if (-e $file.weighhfup) rm $file.weighhfup - if (-e $file.weighhfdn) rm $file.weighhfdn - endif - cp $file.kgen_ibz $file.kgen - cp $file.klist_ibz $file.klist - if (!(-e $file.vspup_old) || (-z $file.vspup_old) || \ - !(-e $file.vspdn_old) || (-z $file.vspdn_old)) then - cp $file.vspup $file.vspup_old - cp $file.vspdn $file.vspdn_old - endif -endif - -#generates in1-file from :EPL/EPH in case.scf2 -# if ($icycle == $in1new) rm $file.broyd1 $file.broyd2 - if ($icycle >= $in1new ) then - if (! -e $file.in1${complex}_orig ) cp $file.in1${complex} $file.in1${complex}_orig - write_in1_lapw $write_all -up -ql $qlimit ${cmplx} >> $dayfile - if($status == 0 ) cp $file.in1${complex}new $file.in1${complex} - endif -if($?in1orig == '-in1orig') then - if ( -e $file.in1${complex}_orig ) mv $file.in1${complex}_orig $file.in1${complex} -# unset in1orig -endif -if ( "$so" == "-so" ) then - total_exec lapw1 $it0 -up $para $nohns $readHinv0 $cmplx -else - total_exec lapw1 $it0 -up $para $nohns $orb $readHinv0 $cmplx -endif - if ($icycle >= $in1new ) then - write_in1_lapw $write_all -dn -ql $qlimit ${cmplx}>> $dayfile - if($status == 0 ) cp $file.in1${complex}new $file.in1${complex} - endif -if ( "$so" == "-so" ) then - total_exec lapw1 $it0 -dn $para $nohns $readHinv0 $cmplx -else - total_exec lapw1 $it0 -dn $para $nohns $orb $readHinv0 $cmplx -endif -set it0 = $it -set readHinv0 = $readHinv - -lapwso: -if ( -e $file.scfso ) rm $file.scfso -if ( "$so" == "-so" ) then - testinput $file.inso error_input - total_exec lapwso -up $orb $para $cmplx -endif - -lapw2: -testinput $file.in2$complex2 error_input -if ( -e dnlapw2.error ) rm dnlapw2.error -if ( $hf == "-hf" ) then - if (!(-e $file.weighhfup) || (-z $file.weighhfup) || \ - !(-e $file.weighhfdn) || (-z $file.weighhfdn)) then - cp $file.kgen_fbz $file.kgen - cp $file.klist_fbz $file.klist - if (-e $file.vectorup) mv $file.vectorup $file.vectorup_save - if (-e $file.vectordn) mv $file.vectordn $file.vectordn_save - mv $file.vectorhfup_old $file.vectorup - mv $file.vectorhfdn_old $file.vectordn - if (-e $file.energyup) mv $file.energyup $file.energyup_save - if (-e $file.energydn) mv $file.energydn $file.energydn_save - mv $file.tmp_energyhfup $file.energyup - mv $file.tmp_energyhfdn $file.energydn - total_exec lapw2 -up $vresp $in1orig $cmplx2 - total_exec lapw2 -dn $vresp $in1orig $cmplx2 - mv $file.weighup $file.weighhfup - mv $file.weighdn $file.weighhfdn - mv $file.vectorup $file.vectorhfup_old - mv $file.vectordn $file.vectorhfdn_old - if (-e $file.vectorup_save) mv $file.vectorup_save $file.vectorup - if (-e $file.vectordn_save) mv $file.vectordn_save $file.vectordn - mv $file.energyup $file.energyhfup - mv $file.energydn $file.energyhfdn - if (-e $file.energyup_save) mv $file.energyup_save $file.energyup - if (-e $file.energydn_save) mv $file.energydn_save $file.energydn - cp $file.kgen_ibz $file.kgen - cp $file.klist_ibz $file.klist - endif -endif -#QDMFT -if ( "$qdmft" == "-qdmft" ) then - total_exec lapw2 -up $para $vresp -almd $cmplx2 $so - total_exec lapw2 -dn $para $vresp -almd $cmplx2 $so - dmftproj $so -sp - # pytriqs call - printf "\n> ERROR: Insert a correct call of pytriqs (with mpi wrapper, if needed) in runsp_triqs Wien2k script\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> ERROR: Insert a correct call of pytriqs (with mpi wrapper, if needed) in runsp_triqs Wien2k script\n" - exit 0 - # to call pytriqs uncomment and modify the line below to adapt it to your system - # the number of core is in NSLOTS variable - #mpprun --force-mpi=openmpi/1.3.2-i110074 /home/x_leopo/TRIQS_segment/triqs_install/bin/pytriqs $file.py - total_exec lapw2 -up $para $vresp -qdmft $cmplx2 $so - total_exec lapw2 -dn $para $vresp -qdmft $cmplx2 $so -else - total_exec lapw2 -up $para $vresp $in1orig $cmplx2 $so - total_exec lapw2 -dn $para $vresp $in1orig $cmplx2 $so - if ( $hf == "-hf" ) then - sed 's/:SUM/:SLSUM/g' < $file.scf2up > $file.scf2up_tmp - mv $file.scf2up_tmp $file.scf2up - mv $file.clmvalup $file.clmvalslup - if ( -e $file.scfhfup_1 ) rm $file.scfhfup_* - sed 's/:SUM/:SLSUM/g' < $file.scf2dn > $file.scf2dn_tmp - mv $file.scf2dn_tmp $file.scf2dn - mv $file.clmvaldn $file.clmvalsldn - if ( -e $file.scfhfdn_1 ) rm $file.scfhfdn_* - endif -endif -# END QDMFT - -rm -f $file.clmscup $file.clmscdn - -if ( $hf == "-hf" ) goto hf - -lapwdm: -if ( -e $file.scfdmup ) rm $file.scfdmup -if ( -e $file.scfdmdn ) rm $file.scfdmdn -if ( ! $?dm ) then - if ( "$orb" != "-orb" ) goto lapw1s - if ( $?orbc ) goto lapw1s -endif -#if ( "$so" == "-so" ) goto lapwdmc -testinput $file.indm$complex2 error_input -if ( -e dnlapwdm.error ) rm dnlapwdm.error -total_exec lapwdm -up $para $cmplx2 $so -if ( "$so" != "-so" ) then -total_exec lapwdm -dn $para $cmplx2 $so -endif -lapw1s: -testinput $file.in1${complex}s lcore -total_exec lapw1 -sc -up $para $nohns $orb $readHinv0 $cmplx -total_exec lapw1 -sc -dn $para $nohns $orb $readHinv0 $cmplx - -lapw2s: -testinput $file.in2${complex2}s error_input -total_exec lapw2 -sc -up $para $vresp $in1orig $cmplx2 -total_exec lapw2 -sc -dn $para $vresp $in1orig $cmplx2 -goto lcore - -hf: -testinput $file.inhf error_input -if (-e dnhf.error) rm dnhf.error -if (!(-e $file.corewfup) || (-z $file.corewfup)) then - total_exec lcore -up - total_exec lcore -dn -endif -total_exec hf -up $diaghf $nonself $noibz $newklist $redklist $para $cmplx -total_exec hf -dn $diaghf $nonself $noibz $newklist $redklist $para $cmplx - -lapw2hf: -testinput $file.in2$complex2 error_input -cp $file.kgen_fbz $file.kgen -cp $file.klist_fbz $file.klist -total_exec lapw2 -up -hf $vresp $in1orig $cmplx2 -total_exec lapw2 -dn -hf $vresp $in1orig $cmplx2 -cp $file.kgen_ibz $file.kgen -cp $file.klist_ibz $file.klist - -lcore: -testinput $file.inc scf -if ( ! -z $file.incup && -e $file.incup ) then - cp $file.incup $file.inc - echo "spinpolarized $file.incup/dn used" >> $dayfile -endif -if ( -e dnlcore.error ) rm dnlcore.error -total_exec lcore -up -if ( ! -z $file.incdn && -e $file.incdn ) then - cp $file.incdn $file.inc -endif -total_exec lcore -dn - -coresuper: - if ( ! -e .lcore) goto scf - total_exec dstart -lcore -up - total_exec dstart -lcore -dn - rm $file.clmcorup $file.clmcordn - -scf: -if ( $hf == "-hf" ) then - foreach i ( 0 0_grr orbup orbdn orbdu 1up 1dn so 2up 2dn dmup dmdn 1sup 1sdn 2sup 2sdn cup cdn hfup hfdn 2hfup 2hfdn ) - if (-e $file.scf$i) then - if ("$i" != "dmdn" || "$so" != "-so") cat $file.scf$i >> $file.scf - endif - end -else - foreach i ( 0 orbup orbdn orbdu 1up 1dn so 2up 2dn dmup dmdn 1sup 1sdn 2sup 2sdn cup cdn ) - if (-e $file.scf$i) then - if ("$i" != "dmdn" || "$so" != "-so") cat $file.scf$i >> $file.scf - endif - end -endif - -if ( $?eece ) then - mv $file.scf2up $file.scf2up-tmp - mv $file.scf2dn $file.scf2dn-tmp - if( $vresp == '-vresp' ) then - mv $file.vrespvalup $file.vrespvalup-tmp - mv $file.vrespvaldn $file.vrespvaldn-tmp - mv $file.vrespcorup $file.vrespcorup-tmp - mv $file.vrespcordn $file.vrespcordn-tmp - endif - foreach i ( vorbup vorbdn vorbdu ) - if (-e $file.$i"_old" ) rm $file.$i"_old" - if (-e $file.$i ) cp $file.$i $file.$i"_old" #save last cycle - end - runeece_lapw $so $para $vresp - teststatus - foreach i (vorbup vorbdn vorbud ) - if (-e $file.$i"_unmixed" ) rm $file.$i"_unmixed" - if (-e $file.$i ) cp $file.$i $file.$i"_unmixed" #save unmixed dmat - end - mv $file.scf2up $file.scf2upeece - mv $file.scf2dn $file.scf2dneece - mv $file.scf2up-tmp $file.scf2up - mv $file.scf2dn-tmp $file.scf2dn - if( $vresp == '-vresp' ) then - mv $file.vrespvalup $file.vrespvaleeceup - mv $file.vrespvaldn $file.vrespvaleecedn - mv $file.vrespvalup-tmp $file.vrespvalup - mv $file.vrespvaldn-tmp $file.vrespvaldn - mv $file.vrespcorup-tmp $file.vrespcorup - mv $file.vrespcordn-tmp $file.vrespcordn - endif - goto scf1 -endif - -foreach i (dmatup dmatdn dmatud ) - if (-e $file.$i"_unmixed" ) rm $file.$i"_unmixed" - if (-e $file.$i ) cp $file.$i $file.$i"_unmixed" #save the unmixed dmat -end - -scf1: -foreach i (clmsum clmup clmdn vspup vspdn vnsup vnsdn ) - if (-e $file.$i ) cp $file.$i $file.$i"_old" #save last cycle -end - - -mixer: -testinput $file.inm error_input -if ( $?orbc ) then - total_exec mixer -else - total_exec mixer $eece1 $orb -endif -cat $file.scfm >> $file.scf - -if($?renorm) then - unset renorm - rm $file.broy* -endif - -mixer_vresp: -testinput $file.inm_vresp energytest -total_exec mixer_vresp -grep -e "CTO " -e NEC $file.outputm_vresp | sed 's/:/:VRESP/' >> $file.scf -#total_exec int16 - -energytest: -#---> output energies -#set EF = `grep 'F E R' $file.scf2 |awk '{printf("%.5f", $NF)}'` -#set ET = `grep 'AL EN' $file.outputm |awk '{printf("%.5f", $NF)}'` -#cat << theend >> $dayfile -#EF $EF -#ET $ET -#theend -#echo $ET > $file.finM - -#---> test of energy convergence -#if ($ecut == "0") goto chargetest -set etest = (`$bin/testconv -p :ENE -c $ecut`) -teststatus -echo ":ENERGY convergence: $etest[1-3]" >> $dayfile -if (! $?ec_test) goto chargetest -if ($etest[1]) then - if ($nohns == '-nohns') then - set nohns - echo "NOHNS deactivated by ENERGY convergence" >> $dayfile - else -# set iter = 1 - set ec_conv - endif -else - unset ec_conv -endif - -chargetest: -#if ($ccut == "0") goto nextiter -set ctest = (`$bin/testconv -p :DIS -c $ccut`) -teststatus -echo ":CHARGE convergence: $ctest[1-3]" >> $dayfile -if (! $?cc_test) goto nextiter -if ($ctest[1]) then - if ($nohns == '-nohns') then - set nohns - echo "NOHNS deactivated by CHARGE convergence" >> $dayfile - else -# set iter = 1 - set cc_conv - endif -else - unset cc_conv -endif - -# check F-condition for MSR1a mode -if ($testmsr == 'MSR') then - set msrtest =(`grep :FRMS $file.scf |tail -1` ) - if ($#msrtest >= 13 ) then - echo msrcount $msrcount msrtest $msrtest[13] -# Trap silly early convergene with "minimum-requests" - set etest2 = (`$bin/testconv -p :ENE -c 0.001`) - if ( $etest2[1] == '0')set msrtest[13]='F' - set ctest2 = (`$bin/testconv -p :DIS -c 0.01`) - if ( $ctest2[1] == '0')set msrtest[13]='F' -# - if ($msrtest[13] == 'T') then - #change in case.inm MSR1a/MSECa to MSR1/MSEC3, rm *.bro*, unset testmsr -@ msrcount ++ - if($msrcount == 3) then - sed "1s/MSR1a/MSR1 /" $file.inm >$file.inm_tmp - sed "1s/MSECa/MSEC3/" $file.inm_tmp >$file.inm - rm *.broy* $file.inm_tmp - set a=`grep -e GREED *scfm | tail -1 | cut -c 50-55` - set b=`echo "scale=5; if( $a/2 > 0.05) $a/2 else 0.05 " |bc -l` - echo $b > .msec - echo "MSR1a/MSECa changed to MSR1/MSEC3 in $file.inm, relaxing only electrons" >> $dayfile - set testmsr - endif - else - set msrcount=0 - endif - endif -endif - -#---> output forces -#grep 'FTOT' $file.outputm|awk '{print "FT ",$2,$4,$5,$6}'\ -# >> $dayfile -#grep 'FTOT' $file.outputm|awk '{print $4,$5,$6}' \ -# >> $file.finM - -nextiter: -@ iter -- -@ riter -- -@ nohns1 -- -@ icycle ++ - -if ($icycle == 2) set newklist - -#---> nohns -if (! $nohns1 ) then - set nohns - echo "NOHNS deactivated" >> $dayfile -endif - -#---> restart -if (! $riter && -e $file.broyd1) then - echo " restart" >> $dayfile - rm $file.broyd1 $file.broyd2 - set riter=$riter_save -endif - -foreach i ($tmp) #delete temporary files - if (-e $i) rm $i -end - -#output cycle -#printf "%s\n\n" "$iter/$riter to go" >> $dayfile -if (-e .stop) goto stop1 -if ($testmsr == 'MSR' && -e .minstop) then - sed "1s/MSR1a/MSR1 /" $file.inm >$file.inm_tmp - sed "1s/MSECa/MSEC3/" $file.inm_tmp >$file.inm - rm *.broy* $file.inm_tmp - set a=`grep -e GREED *scfm | tail -1 | cut -c 50-55` - set b=`echo "scale=5; if( $a/2 > 0.05) $a/2 else 0.05 " |bc -l` - echo $b > .msec - echo "MSR1a/MSECa changed to MSR1/MSEC3 in $file.inm, relaxing only electrons" >> $dayfile - set testmsr -endif - - -if($?ec_conv && $?cc_conv && $?fc_conv && ($testmsr == '')) goto stop - -if ($iter) goto cycle #end of sc-cycle - -if ( $?f_not_conv ) then - printf "\n> FORCES NOT CONVERGED\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> FORCES NOT CONVERGED\n" - exit 3 -endif -if ( ! $?ec_conv ) then - printf "\n> energy in SCF NOT CONVERGED\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> energy in SCF NOT CONVERGED\n" - exit 0 -endif -if ( ! $?cc_conv ) then - printf "\n> charge in SCF NOT CONVERGED\n" >> $dayfile - printf "\n> stop\n" >> $dayfile - printf "\n> charge in SCF NOT CONVERGED\n" - exit 0 -endif - -stop: #normal exit -printf "\n> stop\n" >> $dayfile -printf "\n> stop\n" -exit 0 - -stop1: #normal exit -printf "\n> stop due to .stop file\n" >> $dayfile -if (-e .stop) rm .stop -printf "\n> stop due to .stop file\n" -exit 1 - -error_input: #error exit -printf "\n> stop error: the required input file $errin for the next step could not be found\n" >> $dayfile -printf "\n> stop error: the required input file $errin for the next step could not be found\n" -exit 9 - -error: #error exit -printf "\n> stop error\n" >> $dayfile -printf "\n> stop error\n" -exit 9 - -help: #help exit -cat << theend - -PROGRAM: $0 - -PURPOSE: running the spinpolarized scf-cycle in WIEN - to be called within the case-directory - has to be located in '$WIENROOT' directory - -USAGE: $name [OPTIONS] [FLAGS] - -OPTIONS: --cc LIMIT -> charge convergence LIMIT (0.0001 e) --ec LIMIT -> energy convergence LIMIT ($ecut Ry) --fc LIMIT -> force convergence LIMIT (1.0 mRy/a.u.) - default is -ec 0.0001; multiple convergence tests possible --e PROGRAM -> exit after PROGRAM ($stopafter) --i NUMBER -> max. NUMBER ($iter) of iterations --s PROGRAM -> start with PROGRAM ($next) --r NUMBER -> restart after NUMBER ($riter) iterations (rm *.broyd*) --nohns NUMBER ->do not use HNS for NUMBER iterations --in1new N -> create "new" in1 file after N iter (write_in1 using scf2 info) --ql LIMIT -> select LIMIT ($qlimit) as min.charge for E-L setting in new in1 --qdmft NP -> including DMFT from Aichhorn/Georges/Biermann running on NP proc - -FLAGS: --h/-H -> help --I -> with initialization of in2-files to "TOT" --NI -> does NOT remove case.broyd* (default: rm *.broyd* after 60 sec) --p -> run k-points in parallel (needs .machine file [speed:name]) --it -> use iterative diagonalization --it1 -> use iterative diag. with recreating H_inv (after basis change) --it2 -> use iterative diag. with reinitialization (after basis change) --noHinv -> use iterative diag. without H_inv --vec2pratt -> use vec2pratt instead of vec2old for iterative diag. --so -> run SCF including spin-orbit coupling --dm -> calculate the density matrix (when -so is set, but -orb is not) --eece -> use "ecact exchange+hybrid" methods --orb -> use LDA+U, OP or B-ext correction --orbc -> use LDA+U correction, but with constant V-matrix --orbdu -> use LDA+U with crossterms up-dn (needs also -so) --renorm-> start with mixer and renormalize density --in1orig-> if present, use case.in1_orig file; do not modify case.in1 --hf -> HF/hybrid-DFT calculation --diaghf -> non-selfconsistent HF with diagonal HF only (only e_i) --nonself -> non-selfconsistent HF/hybrid-DFT calculation (only E_x(HF)) --newklist -> HF/hybrid-DFT calculation starting from a different k-mesh --redklist -> HF/hybrid-DFT calculation with a reduced k-mesh for the potential - -CONTROL FILES: -.lcore runs core density superposition producing case.clmsc -.stop stop after SCF cycle -.minstop stops MSR1a minimization and changes to MSR1 -.fulldiag force full diagonalization -.noHinv remove case.storeHinv files -case.inm_vresp activates calculation of vresp files for meta-GGAs -case.in0_grr activates a second call of lapw0 (mBJ pot., or E_xc analysis) - -ENVIRONMENT VARIBLES: -SCRATCH directory where vectors and help files should go - -theend - -exit 1 - - diff --git a/fortran/dmftproj/density.f b/fortran/dmftproj/density.f deleted file mode 100644 index 3440a5b..0000000 --- a/fortran/dmftproj/density.f +++ /dev/null @@ -1,1109 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE density(tetr,only_corr,qtot,ifprnt) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine computes the density matrices for all the %% -C %% inlcuded orbitals and the corresponding total charge, within %% -C %% the energy window for which the projectors were previously %% -C %% defined. %% -C %% %% -C %% If tetr = .TRUE., the tetrahedron weights are used. %% -C %% = .FALSE., a simple point integration is used. %% -C %% %% -C %% If only_corr = .TRUE., the calculation is performed for the %% -C %% correlated orbitals only. %% -C %% %% -C %% If ifprnt = .TRUE., the density matrices are written in the %% -C %% file case.outdmftpr. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ---------------------------- - USE almblm_data - USE common_data - USE prnt - USE projections - USE reps - USE symm - IMPLICIT NONE - LOGICAL :: tetr, only_corr, ifprnt - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: D - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: conj_mat, mat - INTEGER :: is, is1, ik, iorb, l, nbnd, iss - INTEGER :: lm, i, icrorb, m1, m2, m, ib - INTEGER :: iatom, jatom, jorb, imu, isrt, isym - INTEGER :: istart, istart1 - INTEGER :: nbbot, nbtop - REAL(KIND=8) :: q, qtot -C - WRITE(buf,'(a)')'Evaluation of the density matrices...' - CALL printout(0) - CALL printout(0) -C -C Initialization of the variable nsp and of the table crdensmat -C nsp describes the number of block necessary to describe the complete density matrix. - nsp=ns - IF(ifSO) nsp=4 -C The only possible cases are therefore : -C nsp=1 for a computation without spin-polarized input files, without SO [block (up/up+dn/dn)] -C nsp=2 for a computation with spin-polarized input files (but without SO) [blocks up/up and dn/dn] -C nsp=4 for a computation (with spin-polarized input files) with SO [all the blocks] -C -C -C ============================================================= -C Computation of the density matrices for correlated orbitals : -C ============================================================= -C -C These computations are performed only if there are correlated orbitals in the system. - IF(ncrorb.NE.0) THEN -C crdensmat is a table of size nsp*ncrorb. -C For each correlated orbital icrorb, crdensmat(:,icrorb) is the corresponding density matrix. - IF(.NOT.ALLOCATED(crdensmat)) THEN - ALLOCATE(crdensmat(nsp,ncrorb)) - ENDIF - DO icrorb=1,ncrorb - DO is=1,nsp - IF(ALLOCATED(crdensmat(is,icrorb)%mat)) - & DEALLOCATE(crdensmat(is,icrorb)%mat) - ALLOCATE(crdensmat(is,icrorb)%mat(1,1)) - crdensmat(is,icrorb)%mat(1,1)=0.d0 - ENDDO - ENDDO -C -C Loop on the correlated orbitals icrorb -C - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C -C ----------------------------------------------------------------------------------- -C The s-orbitals are a particular case of a "non-mixing" basis and are treated here : -C ----------------------------------------------------------------------------------- - IF (l==0) THEN -C The field mat of crdensmat has already the good size (1 scalar element). -C There's no need of a basis change since the representation of an s-orbital is Identity whatever the basis is. - DO ik=1,nk - DO iss=1,nsp -C -C Determination of the block indices : -C ------------------------------------ - IF(iss.LE.2) THEN - is=iss - is1=iss -C If iss=1 (up), is=1 and is1=1 -> Description of the up/up block -C If iss=2 (down), is=2 and is1=2 -> Description of the dn/dn block - ELSE - is=iss-2 - is1=3-is -C If iss=3, is=1 (up) and is1=2 (down) -> Description of the up/dn block -C If iss=4, is=2 (down) and is1=1 (up) -> Description of the dn/up block - ENDIF -C Only the k-points with included bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - IF(.NOT.kp(ik,is1)%included) CYCLE - nbnd=kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1 - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top -C for the diagonal blocks, is=is1 ; thus nbtop and nbtop are the same for is and is1. -C for the off-diagonal blocks (calculated only when SO is considered), -C it was checked that nbtop(up)=nbtop(dn) and nbbot(up)=nbbot(dn) [in set_projections.f] -C thus nbtop and nbtop fit again for is and is1. -C -C Computation of the density matrix using the tetrahedron weights for the integration : -C ------------------------------------------------------------------------------------- - IF(tetr) THEN -C The field pr_crorb%mat_rep is used to perform the computation (well defined for s-orbitals) - ALLOCATE(mat(1,nbbot:nbtop),conj_mat(1,nbbot:nbtop)) - mat(1,nbbot:nbtop)= - & pr_crorb(icrorb,ik,is)%mat_rep(1,nbbot:nbtop)* - & SQRT(kp(ik,is)%tetrweight(nbbot:nbtop)) - conj_mat(1,nbbot:nbtop)=CONJG( - & pr_crorb(icrorb,ik,is1)%mat_rep(1,nbbot:nbtop))* - & SQRT(kp(ik,is1)%tetrweight(nbbot:nbtop)) -C mat = P(icrorb,ik,is)*sqrt(tetrahedron-weight(ik,is)) -C conj_mat = conjugate[ P(icrorb,ik,is1)) ]*sqrt(tetrahedron-weight(ik,is1)) - DO ib = nbbot,nbtop - crdensmat(iss,icrorb)%mat(1,1)= - = crdensmat(iss,icrorb)%mat(1,1)+ - + mat(1,ib)*conj_mat(1,ib) - ENDDO -C crdensmat = mat*transpose(conj_mat) which is a matrix of size 1 -C The summation over the k-points is done with the do loop ; -C crdensmat(iss,icrorb) is therefore the block "iss" of the density matrix for the orbital icrorb. - DEALLOCATE(conj_mat,mat) -C -C Computation of the density matrix using a simple point integration : -C -------------------------------------------------------------------- - ELSE - DO ib = nbbot, nbtop - crdensmat(iss,icrorb)%mat(1,1)= - = crdensmat(iss,icrorb)%mat(1,1)+ - + pr_crorb(icrorb,ik,is)%mat_rep(1,ib)* - * CONJG(pr_crorb(icrorb,ik,is1)%mat_rep(1,ib))* - * kp(ik,is)%weight - ENDDO -C crdensmat = P(icrorb,ik,is)*transpose(conjugate(P(icrorb,ik,is1)))*weight(ik,is) which is a matrix of size 1. -C The weight used is a geometric factor associated to k and does not depend on the variable is. -C That's why we merely multiply by the "weight" each term while summing over the k-points. - ENDIF - ENDDO ! End of the iss loop - ENDDO ! End of the ik loop -C -C ----------------------------------------------------------------------------------------------------- -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) : -C ----------------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C If this option is used, then ifSO=.TRUE. (because of the restriction in set_ang_trans.f) -C Moreover ifSP=.TRUE. (since ifSO => ifSP, in this version) -C As a result, we know that nb_bot(up)=nb_bot(dn) and nb_top(up)=nb_top(dn) -C -C The field mat of crdensmat must be resized. -C As the complete spinor rotation approach is used, only one matrix is necessary (with is=1). - DEALLOCATE(crdensmat(1,icrorb)%mat) - ALLOCATE(crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1))) - crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1))=0.d0 - ALLOCATE(D(1:2*(2*l+1),1:2*(2*l+1))) -C -C Computation of the density matrix using the tetrahedron weights for the integration : -C ------------------------------------------------------------------------------------- - IF(tetr) THEN - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE - nbnd=kp(ik,1)%nb_top-kp(ik,1)%nb_bot+1 - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top -C A distinction between up and dn states is necessary in order to use the tetrahedron weight. -C As a result, we will transform the projectors back in spherical harmonics basis -C to perform the calculation and then put the resulting density matrix in the desired basis. -C - ALLOCATE(mat(1:2*(2*l+1),nbbot:nbtop)) - ALLOCATE(conj_mat(1:2*(2*l+1),nbbot:nbtop)) -C The representation of the projectors is put back in the spherical harmonics basis - mat(1:2*(2*l+1),nbbot:nbtop)=MATMUL(TRANSPOSE(CONJG( - = reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)))),pr_crorb(icrorb,ik,1)% - & mat_rep(1:2*(2*l+1),nbbot:nbtop)) -C mat = inverse(reptrans)*pr_crorb%mat_rep = *proj_{new_i} = proj_{lm} [temporarily] - conj_mat(1:2*(2*l+1),nbbot:nbtop)=MATMUL( - & TRANSPOSE(CONJG(reptrans(l,isrt)% - & transmat(1:2*(2*l+1),1:2*(2*l+1)) )), - & pr_crorb(icrorb,ik,1)%mat_rep - & (1:2*(2*l+1),nbbot:nbtop)) -C conj_mat = inverse(reptrans)*pr_crorb%mat_rep = *proj_{new_i} = proj_{lm} [temporarily] - DO m=1,2*l+1 - mat(m,nbbot:nbtop)=mat(m,nbbot:nbtop)* - & SQRT(kp(ik,1)%tetrweight(nbbot:nbtop)) -C The first (2*l+1) lines are associated to up states. Hence a multiplication by tetrweight(up) - mat((2*l+1)+m,nbbot:nbtop)= - = mat((2*l+1)+m,nbbot:nbtop)* - & SQRT(kp(ik,2)%tetrweight(nbbot:nbtop)) -C The last (2*l+1) lines are associated to dn states. Hence a multiplication by tetrweight(dn) -C mat = P(icrorb,ik,is)*sqrt(tetrahedron-weight(ik,is)) - conj_mat(m,nbbot:nbtop)= - = CONJG(conj_mat(m,nbbot:nbtop))* - & SQRT(kp(ik,1)%tetrweight(nbbot:nbtop)) -C The first (2*l+1) lines are associated to up states. Hence a multiplication by tetrweight(up) - conj_mat((2*l+1)+m,nbbot:nbtop)= - & CONJG(conj_mat((2*l+1)+m,nbbot:nbtop))* - & SQRT(kp(ik,2)%tetrweight(nbbot:nbtop)) -C The last (2*l+1) lines are associated to dn states. Hence a multiplication by tetrweight(dn) -C conj_mat = conjugate[ P(icrorb,ik,is1))*sqrt(tetrahedron-weight(ik,is1)) ] - ENDDO - CALL zgemm('N','T',2*(2*l+1),2*(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,2*(2*l+1),conj_mat,2*(2*l+1), - & DCMPLX(0.D0,0.D0),D,2*(2*l+1)) - DEALLOCATE(conj_mat,mat) -C D = mat*transpose(conj_mat) is a matrix of size 2*(2*l+1)* 2*(2*l+1) -C - crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - & crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1)) - & +D(1:2*(2*l+1),1:2*(2*l+1)) - END DO ! End of the ik loop -C The summation over the k-points is done. -C crdensmat(icrorb) is therefore the complete density matrix in spherical harmonic basis. -C -C The density matrix is then put into the desired basis, using reptrans(l,isrt)%transmat - crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)),crdensmat(1,icrorb)%mat - & (1:2*(2*l+1),1:2*(2*l+1)) ) - crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(crdensmat(1,icrorb)%mat - & (1:2*(2*l+1),1:2*(2*l+1)),TRANSPOSE( CONJG( - & reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1))))) -C crdensmat = (reptrans)*crdensmat_l*inverse(reptrans) -C or crdensmat = crdensmat_{lm} -C crdensmat(icrorb) is now the complete density matrix in the desired basis. -C -C Computation of the density matrix using a simple point integration : -C -------------------------------------------------------------------- - ELSE -C No distinction between up and dn states is necessary because we use a -C geometric factor which depends only of the k-point. -C We can then use directly the projectors in the desired basis. - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE - nbnd=kp(ik,1)%nb_top-kp(ik,1)%nb_bot+1 - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top - ALLOCATE(mat(1:2*(2*l+1),nbbot:nbtop)) - mat(1:2*(2*l+1),nbbot:nbtop)= - = pr_crorb(icrorb,ik,1)%mat_rep(1:2*(2*l+1), - & nbbot:nbtop) - CALL zgemm('N','C',2*(2*l+1),2*(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,2*(2*l+1),mat,2*(2*l+1), - & DCMPLX(0.D0,0.D0),D,2*(2*l+1)) - DEALLOCATE(mat) -C D = P(icrorb,ik,is)*transpose(conjugate(P(icrorb,ik,is))) is a matrix of size 2*(2*l+1) * 2*(2*l+1) - crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = crdensmat(1,icrorb)%mat(1:2*(2*l+1),1:2*(2*l+1)) - + +D(1:2*(2*l+1),1:2*(2*l+1))*kp(ik,1)%weight - ENDDO ! End of the ik loop -C The summation over the k-points is done in the do loop. -C The weight used is a geometric factor associated to k and does not depend on the variable is. -C That's why we merely multiply by the "weight" each term while summing over the k-points. - ENDIF - DEALLOCATE(D) -C -C ---------------------------------------------------------------------------------------------- -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) : -C ---------------------------------------------------------------------------------------------- - ELSE -C The field mat of crdensmat must be resized. -C nsp matrices of size (2*l+1) are necessary to represent the whole density matrix. - DO is=1,nsp - DEALLOCATE(crdensmat(is,icrorb)%mat) - ALLOCATE(crdensmat(is,icrorb)%mat(-l:l,-l:l)) - crdensmat(is,icrorb)%mat(-l:l,-l:l)=0.d0 - ENDDO - ALLOCATE(D(-l:l,-l:l)) -C All the computations can be performed in the new basis (using the field pr_crorb%mat_rep) - DO ik=1,nk - DO iss=1,nsp -C -C Determination of the block indices : -C ------------------------------------ - IF(iss.LE.2) THEN - is=iss - is1=iss -C If iss=1 (up), is=1 and is1=1 -> Description of the up/up block -C If iss=2 (down), is=2 and is1=2 -> Description of the dn/dn block - ELSE - is=iss-2 - is1=3-is -C If iss=3, is=1 (up) and is1=2 (down) -> Description of the up/dn block -C If iss=4, is=2 (down) and is1=1 (up) -> Description of the dn/up block - ENDIF -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - IF(.NOT.kp(ik,is1)%included) CYCLE - nbnd=kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1 - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top -C for the diagonal blocks, is=is1 ; thus nbtop and nbtop are the same for is and is1. -C for the off-diagonal blocks (calculated only when SO is considered), -C it was checked that nbtop(up)=nbtop(dn) and nbbot(up)=nbbot(dn) [in set_projections.f] -C thus nbtop and nbtop fit again for is and is1. -C -C Computation of the density matrix using the tetrahedron weights for the integration : -C ------------------------------------------------------------------------------------- - IF(tetr) THEN -C The representation of the projectors in the desired basis is used (field pr_crorb%mat_rep) - ALLOCATE(mat(-l:l,nbbot:nbtop)) - ALLOCATE(conj_mat(-l:l,nbbot:nbtop)) - DO m=-l,l - mat(m,nbbot:nbtop)= - = pr_crorb(icrorb,ik,is)%mat_rep(m,nbbot:nbtop)* - & SQRT(kp(ik,is)%tetrweight(nbbot:nbtop)) - conj_mat(m,nbbot:nbtop)=CONJG( - & pr_crorb(icrorb,ik,is1)%mat_rep(m,nbbot:nbtop)) - & *SQRT(kp(ik,is1)%tetrweight(nbbot:nbtop)) -C mat = P(icrorb,ik,is)*sqrt(tetrahedron-weight(ik,is)) -C conj_mat = conjugate[ P(icrorb,ik,is1))*sqrt(tetrahedron-weight(ik,is1)) ] - ENDDO - CALL zgemm('N','T',(2*l+1),(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,(2*l+1),conj_mat,(2*l+1), - & DCMPLX(0.D0,0.D0),D(-l:l,-l:l),(2*l+1)) - DEALLOCATE(conj_mat,mat) -C D = mat*transpose(conj_mat) is a matrix of size (2*l+1)*(2*l+1) - crdensmat(iss,icrorb)%mat(-l:l,-l:l)= - = crdensmat(iss,icrorb)%mat(-l:l,-l:l)+D(-l:l,-l:l) -C The summation over the k-points is done. -C crdensmat(icrorb) is therefore the complete density matrix of the orbital icrorb. -C -C Computation of the density matrix using a simple point integration : -C -------------------------------------------------------------------- - ELSE - ALLOCATE(mat(-l:l,nbbot:nbtop)) - ALLOCATE(conj_mat(-l:l,nbbot:nbtop)) - mat(-l:l,nbbot:nbtop)=pr_crorb(icrorb,ik,is) - & %mat_rep(-l:l,nbbot:nbtop) - conj_mat(-l:l,nbbot:nbtop)=pr_crorb(icrorb,ik,is1) - & %mat_rep(-l:l,nbbot:nbtop) - CALL zgemm('N','C',(2*l+1),(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,(2*l+1),conj_mat,(2*l+1), - & DCMPLX(0.D0,0.D0),D(-l:l,-l:l),(2*l+1)) - DEALLOCATE(mat,conj_mat) -C D = P(icrorb,ik,is)*transpose(conjugate(P(icrorb,ik,is))) is a matrix of size (2*l+1)*(2*l+1) - crdensmat(iss,icrorb)%mat(-l:l,-l:l)= - = crdensmat(iss,icrorb)%mat(-l:l,-l:l) - + +D(-l:l,-l:l)*kp(ik,is)%weight -C The weight used is a geometric factor asoociated to k and does not depend on the variable is. -C That's why we merely multiply by the "weight" each term while summing over the k-points. - ENDIF - ENDDO ! End of the iss loop - ENDDO ! End of the ik loop - DEALLOCATE(D) - ENDIF ! End of the basis if-then-else -C - ENDDO ! End of the icrorb loop -C -C -C =============================== -C Symmetrization to the full BZ : -C =============================== - CALL symmetrize_mat(crdensmat,crorb,ncrorb) -C -C -C ============================================================================ -C Application of the Rloc transformation to go back to the local coordinates : -C ============================================================================ - CALL rotdens_mat(crdensmat,crorb,ncrorb) -C -C -C ================================================================= -C Printing the density matrices and the charge in the output file : -C ================================================================= - IF(ifprnt) THEN - CALL printout(0) - WRITE(buf,'(a)') '-------------------------------------' - CALL printout(0) - WRITE(buf,'(a)') - & 'Density Matrices for the Correlated States : ' - CALL printout(0) -C The density matrices and charge are printed for all the corrrelated orbitals - DO icrorb=1,ncrorb - CALL printout(0) - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C Description of the correlated orbital - WRITE(buf,'(3(a,i3))') - & ' Sort = ',isrt,' Atom = ',crorb(icrorb)%atom, - & ' and Orbital l = ',l - CALL printout(0) - q=0d0 -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For a calculation spin-polarized with SO : - IF (nsp==4) THEN - WRITE(buf,'(2(2F12.6,2x))') - & crdensmat(1,icrorb)%mat(1,1), - & crdensmat(3,icrorb)%mat(1,1) - CALL printout(0) - WRITE(buf,'(2(2F12.6,2x))') - & crdensmat(4,icrorb)%mat(1,1), - & crdensmat(2,icrorb)%mat(1,1) - CALL printout(0) - q=q+crdensmat(1,icrorb)%mat(1,1)+ - + crdensmat(2,icrorb)%mat(1,1) -C For a calculation spin-polarized without SO : - ELSE IF (nsp==2) THEN - WRITE(buf,'(2(2F12.6,2x))') - & crdensmat(1,icrorb)%mat(1,1),DCMPLX(0.D0,0.D0) - CALL printout(0) - WRITE(buf,'(2(2F12.6,2x))') - & DCMPLX(0.D0,0.D0),crdensmat(2,icrorb)%mat(1,1) - CALL printout(0) - q=q+crdensmat(1,icrorb)%mat(1,1)+ - + crdensmat(2,icrorb)%mat(1,1) -C For a paramagnetic calculation without SO : - ELSE - WRITE(buf,'(2F12.6,2x)') crdensmat(1,icrorb)%mat(1,1) - CALL printout(0) - q=q+crdensmat(1,icrorb)%mat(1,1) - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO : - WRITE(buf,'(a,a)') 'Writing the matrix as : ', - & '[ block 1 | block 2 ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ block 3 | block 4 ]' - CALL printout(0) -C Printing the different blocks - ALLOCATE(D(1,1:2*l+1)) - WRITE(buf,'(a,i2,a)') ' # For the block 1 :' - CALL printout(0) - DO m=1,2*l+1 - D(1,1:2*l+1)=crdensmat(1,icrorb)%mat(m,1:(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') ' # For the block 2 :' - CALL printout(0) - DO m=1,2*l+1 - D(1,1:2*l+1)= - & crdensmat(1,icrorb)%mat(m,2*l+2:2*(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') ' # For the block 3 :' - CALL printout(0) - DO m=2*l+2,2*(2*l+1) - D(1,1:2*l+1)= - & crdensmat(1,icrorb)%mat(m,1:(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') ' # For the block 4 :' - CALL printout(0) - DO m=2*l+2,2*(2*l+1) - D(1,1:2*l+1)= - & crdensmat(1,icrorb)%mat(m,2*l+2:2*(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - DEALLOCATE(D) - DO m1=1,2*(2*l+1) - q=q+crdensmat(1,icrorb)%mat(m1,m1) - ENDDO -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF(nsp==4) THEN - WRITE(buf,'(a,a)') 'Writing the matrix as : ', - & '[ block up/up | block up/dn ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ block dn/up | block dn/dn ]' - CALL printout(0) - ELSEIF(nsp==2) THEN - WRITE(buf,'(a,a)') 'Writing the matrix as : ', - & '[ block up/up | 0 ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ 0 | block dn/dn ]' - CALL printout(0) - ENDIF - DO iss=1,nsp - IF(iss.LE.2) THEN - is=iss - is1=iss -C If iss=1 (up), is=1 and is1=1 -> Description of the up/up block -C If iss=2 (down), is=2 and is1=2 -> Description of the down/down block - IF (is==1) THEN - IF ( ifSP.or.ifSO ) THEN - WRITE(buf,'(a)') ' # For the Up/Up block :' - ENDIF - CALL printout(0) - ELSE - WRITE(buf,'(a)') ' # For the Down/Down block :' - CALL printout(0) - ENDIF - ELSE - is=iss-2 - is1=3-is -C If iss=3, is=1 (up) and is1=2 (down) -> Description of the up/down block -C If iss=4, is=2 (down) and is1=1 (up) -> Description of the down/up block - IF (is==1) THEN - WRITE(buf,'(a)') ' # For the Up/Down block :' - CALL printout(0) - ELSE - WRITE(buf,'(a)') ' # For the Down/Up block :' - CALL printout(0) - ENDIF - ENDIF - ALLOCATE(D(1,-l:l)) - DO m=-l,l - D(1,-l:l)=crdensmat(iss,icrorb)%mat(m,-l:l) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - IF(is==is1) q=q+crdensmat(iss,icrorb)%mat(m,m) - ENDDO - DEALLOCATE(D) - ENDDO - ENDIF -C Displaying the charge q of the orbital - CALL printout(0) - WRITE(buf,'(a,f10.5)')'The charge of the orbital is : ',q - CALL printout(0) - ENDDO - ENDIF -C - ENDIF ! End of the if ncrorb=0 if-then-else -C The calculation is stopped here if the flag only_corr is .TRUE. - IF (.not.only_corr) THEN -C -C ========================================= -C Computation of the total charge density : -C ========================================= -C The charge is stored in the variable qtot given in argument. - qtot=0d0 - do is=1,ns - DO ik=1,nk - if (kp(ik,is)%included) then - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - IF(tetr) THEN - qtot=qtot+kp(ik,is)%tetrweight(ib) - ELSE - qtot=qtot+kp(ik,is)%weight - ENDIF - ENDDO - endif - ENDDO - if (ifSO) exit - enddo -C -C ================================================================= -C Computation of the density matrix for all the included orbitals : -C ================================================================= -C The computations are performed with the Theta projectors (pr_orb) -C -C densmat is a table of size nsp*norb. -C For each included orbital iorb, densmat(:,iorb) is the corresponding density matrix. - IF(.NOT.ALLOCATED(densmat)) THEN - ALLOCATE(densmat(nsp,norb)) - ENDIF - DO iorb=1,norb - DO is=1,nsp - IF(ALLOCATED(densmat(is,iorb)%mat)) - & DEALLOCATE(densmat(is,iorb)%mat) - ALLOCATE(densmat(is,iorb)%mat(1,1)) - densmat(is,iorb)%mat(1,1)=0.d0 - ENDDO - ENDDO -C -C Loop on the included orbitals iorb -C - DO iorb=1,norb - isrt=orb(iorb)%sort - l=orb(iorb)%l -C -C ----------------------------------------------------------------------------------- -C The s-orbitals are a particular case of a "non-mixing" basis and are treated here : -C ----------------------------------------------------------------------------------- - IF (l==0) THEN -C The field mat of densmat has already the good size (1 scalar element). -C There's no need of a basis change since the representation of an s-orbital is Identity whatever the basis is. - DO ik=1,nk - DO iss=1,nsp -C -C Determination of the block indices : -C ------------------------------------ - IF(iss.LE.2) THEN - is=iss - is1=iss -C If iss=1 (up), is=1 and is1=1 -> Description of the up/up block -C If iss=2 (down), is=2 and is1=2 -> Description of the dn/dn block - ELSE - is=iss-2 - is1=3-is -C If iss=3, is=1 (up) and is1=2 (down) -> Description of the up/dn block -C If iss=4, is=2 (down) and is1=1 (up) -> Description of the dn/up block - ENDIF -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - IF(.NOT.kp(ik,is1)%included) CYCLE - nbnd=kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1 - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top -C for the diagonal blocks, is=is1 ; thus nbtop and nbtop are the same for is and is1. -C for the off-diagonal blocks (calculated only when SO is considered), -C it was checked that nbtop(up)=nbtop(dn) and nbbot(up)=nbbot(dn) [in set_projections.f] -C thus nbtop and nbtop fit again for is and is1. -C -C Computation of the density matrix using the tetrahedron weights for the integration : -C ------------------------------------------------------------------------------------- - IF(tetr) THEN -C The field pr_orb%matn_rep is used to perform the computation (well defined for s-orbitals) - DO i=1,norm_radf(iorb)%n - ALLOCATE(mat(1,nbbot:nbtop)) - ALLOCATE(conj_mat(1,nbbot:nbtop)) - mat(1,nbbot:nbtop)= - & pr_orb(iorb,ik,is)%matn_rep(1,nbbot:nbtop,i)* - & SQRT(kp(ik,is)%tetrweight(nbbot:nbtop)) - conj_mat(1,nbbot:nbtop)=CONJG( - & pr_orb(iorb,ik,is1)%matn_rep(1,nbbot:nbtop,i))* - & SQRT(kp(ik,is1)%tetrweight(nbbot:nbtop)) -C mat = Theta(iorb,ik,is)*sqrt(tetrahedron-weight(ik,is)) -C conj_mat = conjugate[ Theta(iorb,ik,is1))*sqrt(tetrahedron-weight(ik,is1)) ] - DO ib = nbbot,nbtop - densmat(iss,iorb)%mat(1,1)= - = densmat(iss,iorb)%mat(1,1) - & +mat(1,ib)*conj_mat(1,ib) - ENDDO -C densmat = mat*transpose(conj_mat) which is a matrix of size 1 - DEALLOCATE(conj_mat,mat) - ENDDO -C The summation over the k-points is done with the do loop ; -C The summation over the |phi_j> basis is done with the do loop ; -C densmat(iss,iorb) is therefore the block "iss" of the density matrix for the orbital iorb. -C -C Computation of the density matrix using a simple point integration : -C -------------------------------------------------------------------- - ELSE - DO i=1,norm_radf(iorb)%n - DO ib = nbbot,nbtop - densmat(iss,iorb)%mat(1,1)= - = densmat(iss,iorb)%mat(1,1)+ - + pr_orb(iorb,ik,is)%matn_rep(1,ib,i)* - * CONJG(pr_orb(iorb,ik,is1)%matn_rep(1,ib,i))* - * kp(ik,is)%weight - ENDDO - ENDDO -C densmat = Theta(iorb,ik,is)*transpose(conjugate(Theta(iorb,ik,is1))) which is a matrix of size 1 -C The weight used is a geometric factor associated to k and does not depend on the variable is. -C That's why we merely multiply by the "weight" each term while summing over the k-points. - ENDIF - ENDDO ! End of the iss loop - ENDDO ! End of the ik loop -C -C ----------------------------------------------------------------------------------------------------- -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) : -C ----------------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C If this option is used, then ifSO=.TRUE. (because of the restriction in set_ang_trans.f) -C Moreover ifSP=.TRUE. (since ifSO => ifSP, in this version) -C As a result, we know that nb_bot(up)=nb_bot(dn) and nb_top(up)=nb_top(dn) -C -C The field mat of densmat must be resized. -C As the complete spinor rotation approach is used, only one matrix is necessary (with is=1). - DEALLOCATE(densmat(1,iorb)%mat) - ALLOCATE(densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1))) - densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1))=0.d0 - ALLOCATE(D(1:2*(2*l+1),1:2*(2*l+1))) -C -C Computation of the density matrix using the tetrahedron weights for the integration : -C ------------------------------------------------------------------------------------- - IF(tetr) THEN - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE - nbnd=kp(ik,1)%nb_top-kp(ik,1)%nb_bot+1 - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top -C A distinction between up and dn states is necessary in order to use the tetrahedron weight. -C As a result, we will transform the projectors back in spherical harmonics basis -C to perform the calculation and then put the resulting density matrix in the desired basis. -C -C Loop on the |phi_j> basis - DO i=1,norm_radf(iorb)%n - ALLOCATE(mat(1:2*(2*l+1),nbbot:nbtop)) - ALLOCATE(conj_mat(1:2*(2*l+1),nbbot:nbtop)) -C The representation of the projectors is put back in the spherical harmonics basis - mat(1:2*(2*l+1),nbbot:nbtop)=MATMUL( - & TRANSPOSE(CONJG(reptrans(l,isrt)% - & transmat(1:2*(2*l+1),1:2*(2*l+1)) )), - & pr_orb(iorb,ik,1)%matn_rep - & (1:2*(2*l+1),nbbot:nbtop,i) ) -C mat = inverse(reptrans)*pr_orb%mat_rep = *theta_{new_i} = theta_{lm} [temporarily] - conj_mat(1:2*(2*l+1),nbbot:nbtop)=MATMUL( - & TRANSPOSE(CONJG(reptrans(l,isrt)% - & transmat(1:2*(2*l+1),1:2*(2*l+1)) )), - & pr_orb(iorb,ik,1)%matn_rep - & (1:2*(2*l+1),nbbot:nbtop,i) ) -C conj_mat = inverse(reptrans)*pr_orb%mat_rep = *theta_{new_i} = theta_{lm} [temporarily] - DO m=1,2*l+1 - mat(m,nbbot:nbtop)=mat(m,nbbot:nbtop)* - & SQRT(kp(ik,1)%tetrweight(nbbot:nbtop)) -C The first (2*l+1) lines are associated to up states. Hence a multiplication by tetrweight(up) - mat((2*l+1)+m,nbbot:nbtop)= - = mat((2*l+1)+m,nbbot:nbtop)* - & SQRT(kp(ik,2)%tetrweight(nbbot:nbtop)) -C The last (2*l+1) lines are associated to dn states. Hence a multiplication by tetrweight(dn) -C mat = Theta(icrorb,ik,is)*sqrt(tetrahedron-weight(ik,is)) - conj_mat(m,nbbot:nbtop)=CONJG( - & conj_mat(m,nbbot:nbtop) )* - & SQRT(kp(ik,1)%tetrweight(nbbot:nbtop)) -C The first (2*l+1) lines are associated to up states. Hence a multiplication by tetrweight(up) - conj_mat((2*l+1)+m,nbbot:nbtop)= - & CONJG(conj_mat((2*l+1)+m,nbbot:nbtop))* - & SQRT(kp(ik,2)%tetrweight(nbbot:nbtop)) -C The last (2*l+1) lines are associated to dn states. Hence a multiplication by tetrweight(dn) -C conj_mat = conjugate[ Theta(icrorb,ik,is1))*sqrt(tetrahedron-weight(ik,is1)) ] - ENDDO - CALL zgemm('N','T',2*(2*l+1),2*(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,2*(2*l+1),conj_mat,2*(2*l+1), - & DCMPLX(0.D0,0.D0),D,2*(2*l+1)) - DEALLOCATE(conj_mat,mat) -C D = mat*transpose(conj_mat) is a matrix of size 2*(2*l+1)* 2*(2*l+1) -C - densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - & densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1)) - & +D(1:2*(2*l+1),1:2*(2*l+1)) - END DO ! End of the |phi_j> basis loop - END DO ! End of the ik loop -C The summation over the k-points is done ; -C The summation over the |phi_j> basis is done ; -C crdensmat(icrorb) is therefore the complete density matrix in spherical harmonic basis. -C -C The density matrix is then put into the desired basis, using reptrans(l,isrt)%transmat - densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)),densmat(1,iorb)%mat - & (1:2*(2*l+1),1:2*(2*l+1)) ) - densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(densmat(1,iorb)%mat - & (1:2*(2*l+1),1:2*(2*l+1)),TRANSPOSE( CONJG( - & reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1))))) -C densmat = (reptrans)*densmat_l*inverse(reptrans) -C or densmat = densmat_{lm} -C densmat(iorb) is now the complete density matrix in the desired basis. -C -C Computation of the density matrix using a simple point integration : -C -------------------------------------------------------------------- - ELSE -C No distinction between up and dn states is necessary because we use a -C geometric factor which depends only of the k-point. -C We can then use directly the projectors in the desired basis. - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE -C Loop on the |phi_j> basis - DO i=1,norm_radf(iorb)%n - nbnd=kp(ik,1)%nb_top-kp(ik,1)%nb_bot+1 - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top - ALLOCATE(mat(1:2*(2*l+1),nbbot:nbtop)) - mat(1:2*(2*l+1),nbbot:nbtop)= - = pr_orb(iorb,ik,1)%matn_rep - & (1:2*(2*l+1),nbbot:nbtop,i) - CALL zgemm('N','C',2*(2*l+1),2*(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,2*(2*l+1),mat, - & 2*(2*l+1),DCMPLX(0.D0,0.D0),D,2*(2*l+1)) - DEALLOCATE(mat) -C D = Theta(iorb,ik,is)*transpose(conjugate(Theta(iorb,ik,is))) is a matrix of size 2*(2*l+1) * 2*(2*l+1) - densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = densmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1)) - + +D(1:2*(2*l+1),1:2*(2*l+1))*kp(ik,1)%weight - END DO ! End of the |phi_j > basis loop - ENDDO ! End of the ik loop -C The summation over the k-points is done ; -C The summation over the |phi_j> basis is done ; -C The weight used is a geometric factor associated to k and does not depend on the variable is. -C That's why we merely multiply by the "weight" each term while summing over the k-points. - ENDIF - DEALLOCATE(D) -C -C ---------------------------------------------------------------------------------------------- -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) : -C ---------------------------------------------------------------------------------------------- - ELSE -C The field mat of densmat must be resized. -C nsp matrices of size (2*l+1) are necessary to represent the whole density matrix. - DO is=1,nsp - DEALLOCATE(densmat(is,iorb)%mat) - ALLOCATE(densmat(is,iorb)%mat(-l:l,-l:l)) - densmat(is,iorb)%mat(-l:l,-l:l)=0.d0 - ENDDO - ALLOCATE(D(-l:l,-l:l)) -C All the computations can be performed in the new basis (using the field pr_orb%matn_rep) - DO ik=1,nk - DO iss=1,nsp -C -C Determination of the block indices : -C ------------------------------------ - IF(iss.LE.2) THEN - is=iss - is1=iss -C If iss=1 (up), is=1 and is1=1 -> Description of the up/up block -C If iss=2 (down), is=2 and is1=2 -> Description of the dn/dn block - ELSE - is=iss-2 - is1=3-is -C If iss=3, is=1 (up) and is1=2 (down) -> Description of the up/dn block -C If iss=4, is=2 (down) and is1=1 (up) -> Description of the dn/up block - ENDIF -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - IF(.NOT.kp(ik,is1)%included) CYCLE - nbnd=kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1 - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top -C for the diagonal blocks, is=is1 ; thus nbtop and nbtop are the same for is and is1. -C for the off-diagonal blocks (calculated only when SO is considered), -C it was checked that nbtop(up)=nbtop(dn) and nbbot(up)=nbbot(dn) [in set_projections.f] -C thus nbtop and nbtop fit again for is and is1. -C -C Computation of the density matrix using the tetrahedron weights for the integration : -C ------------------------------------------------------------------------------------- - IF(tetr) THEN -C The representation of the projectors in the desired basis is used (field pr_orb%mat_rep) - DO i=1,norm_radf(iorb)%n - ALLOCATE(mat(-l:l,nbbot:nbtop)) - ALLOCATE(conj_mat(-l:l,nbbot:nbtop)) - DO m=-l,l - mat(m,nbbot:nbtop)=pr_orb(iorb,ik,is)%matn_rep - & (m,nbbot:nbtop,i)*SQRT(kp(ik,is)% - & tetrweight(nbbot:nbtop)) - conj_mat(m,nbbot:nbtop)=CONJG( - = pr_orb(iorb,ik,is1)%matn_rep(m,nbbot:nbtop,i)) - & *SQRT(kp(ik,is1)%tetrweight(nbbot:nbtop)) -C mat = Theta(iorb,ik,is)*sqrt(tetrahedron-weight(ik,is)) -C conj_mat = conjugate[ Theta(iorb,ik,is1))*sqrt(tetrahedron-weight(ik,is1)) ] - ENDDO - CALL zgemm('N','T',(2*l+1),(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,(2*l+1),conj_mat,(2*l+1), - & DCMPLX(0.D0,0.D0),D(-l:l,-l:l),(2*l+1)) - DEALLOCATE(conj_mat,mat) -C D = mat*transpose(conj_mat) is a matrix of size (2*l+1)*(2*l+1) - densmat(iss,iorb)%mat(-l:l,-l:l)= - = densmat(iss,iorb)%mat(-l:l,-l:l)+D(-l:l,-l:l) - ENDDO -C The summation over the |phi_j > basis is done. -C The summation over the k-points is done. -C densmat(iorb) is therefore the complete density matrix of the orbital iorb. -C -C Computation of the density matrix using a simple point integration : -C -------------------------------------------------------------------- - ELSE - DO i=1,norm_radf(iorb)%n - ALLOCATE(mat(-l:l,nbbot:nbtop)) - ALLOCATE(conj_mat(-l:l,nbbot:nbtop)) - mat(-l:l,nbbot:nbtop)= - = pr_orb(iorb,ik,is)%matn_rep(-l:l,nbbot:nbtop,i) - conj_mat(-l:l,nbbot:nbtop)= - = pr_orb(iorb,ik,is1)%matn_rep(-l:l,nbbot:nbtop,i) - CALL zgemm('N','C',(2*l+1),(2*l+1),nbnd, - & DCMPLX(1.D0,0.D0),mat,(2*l+1),conj_mat,(2*l+1), - & DCMPLX(0.D0,0.D0),D(-l:l,-l:l),(2*l+1)) - DEALLOCATE(mat,conj_mat) -C D = Theta(iorb,ik,is)*transpose(conjugate(Theta(iorb,ik,is))) is a matrix of size (2*l+1)*(2*l+1) - densmat(iss,iorb)%mat(-l:l,-l:l)= - = densmat(iss,iorb)%mat(-l:l,-l:l) - + +D(-l:l,-l:l)*kp(ik,is)%weight -C The weight used is a geometric factor asoociated to k and does not depend on the variable is. -C That's why we merely multiply by the "weight" each term while summing over the k-points and the |phi_j> basis. - ENDDO ! End of the |phi_j > basis loop - ENDIF - ENDDO ! End of the iss loop - ENDDO ! End of the ik loop - DEALLOCATE(D) -C - ENDIF ! End of the basis if-then-else -C - ENDDO ! End of the iorb loop -C -C -C =============================== -C Symmetrization to the full BZ : -C =============================== - CALL symmetrize_mat(densmat,orb,norb) -C -C -C ============================================================================ -C Application of the Rloc transformation to go back to the local coordinates : -C ============================================================================ - CALL rotdens_mat(densmat,orb,norb) -C -C -C ================================================================= -C Printing the density matrices and the charge in the output file : -C ================================================================= - IF(ifprnt) THEN - CALL printout(0) - WRITE(buf,'(a)') '-------------------------------------' - CALL printout(0) - WRITE(buf,'(a)') - & 'Density Matrices for all the States of the System : ' - CALL printout(0) -C The density matrices and charge are printed for all the included orbitals - DO iorb=1,norb - CALL printout(0) - isrt=orb(iorb)%sort - l= orb(iorb)%l -C Description of the correlated orbital - WRITE(buf,'(3(a,i3))') - & ' Sort = ',isrt,' Atom = ',orb(iorb)%atom, - & ' and Orbital l = ',l - CALL printout(0) - q=0d0 -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For a calculation spin-polarized with SO : - IF (nsp==4) THEN - WRITE(buf,'(2(2F12.6,2x))') - & densmat(1,iorb)%mat(1,1), - & densmat(3,iorb)%mat(1,1) - CALL printout(0) - WRITE(buf,'(2(2F12.6,2x))') - & densmat(4,iorb)%mat(1,1), - & densmat(2,iorb)%mat(1,1) - CALL printout(0) - q=q+densmat(1,iorb)%mat(1,1)+ - + densmat(2,iorb)%mat(1,1) -C For a calculation spin-polarized without SO : - ELSE IF (nsp==2) THEN - WRITE(buf,'(2(2F12.6,2x))') - & densmat(1,iorb)%mat(1,1),DCMPLX(0.D0,0.D0) - CALL printout(0) - WRITE(buf,'(2(2F12.6,2x))') - & DCMPLX(0.D0,0.D0),densmat(2,iorb)%mat(1,1) - CALL printout(0) - q=q+densmat(1,iorb)%mat(1,1)+ - + densmat(2,iorb)%mat(1,1) -C For a paramagnetic calculation without SO : - ELSE - WRITE(buf,'(2F12.6,2x)') densmat(1,iorb)%mat(1,1) - q=q+densmat(1,iorb)%mat(1,1) - CALL printout(0) - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO : - WRITE(buf,'(a,a)') 'Writing the matrix as : ', - & '[ block 1 | block 2 ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ block 3 | block 4 ]' - CALL printout(0) -C Printing the different blocks - ALLOCATE(D(1,1:2*l+1)) - WRITE(buf,'(a,i2,a)') ' # For the block 1 :' - CALL printout(0) - DO m=1,2*l+1 - D(1,1:2*l+1)=densmat(1,iorb)%mat(m,1:(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') ' # For the block 2 :' - CALL printout(0) - DO m=1,2*l+1 - D(1,1:2*l+1)= - & densmat(1,iorb)%mat(m,2*l+2:2*(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') ' # For the block 3 :' - CALL printout(0) - DO m=2*l+2,2*(2*l+1) - D(1,1:2*l+1)= - & densmat(1,iorb)%mat(m,1:(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') ' # For the block 4 :' - CALL printout(0) - DO m=2*l+2,2*(2*l+1) - D(1,1:2*l+1)= - & densmat(1,iorb)%mat(m,2*l+2:2*(2*l+1)) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - ENDDO - DEALLOCATE(D) - DO m1=1,2*(2*l+1) - q=q+densmat(1,iorb)%mat(m1,m1) - ENDDO -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF(nsp==4) THEN - WRITE(buf,'(a,a)') 'Writing the matrix as : ', - & '[ block up/up | block up/dn ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ block dn/up | block dn/dn ]' - CALL printout(0) - ELSEIF(nsp==2) THEN - WRITE(buf,'(a,a)') 'Writing the matrix as : ', - & '[ block up/up | 0 ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ 0 | block dn/dn ]' - CALL printout(0) - ENDIF - DO iss=1,nsp - IF(iss.LE.2) THEN - is=iss - is1=iss -C If iss=1 (up), is=1 and is1=1 -> Description of the up/up block -C If iss=2 (down), is=2 and is1=2 -> Description of the down/down block - IF (is==1) THEN - IF ( ifSP.or.ifSO ) THEN - WRITE(buf,'(a)') ' # For the Up/Up block :' - ENDIF - CALL printout(0) - ELSE - WRITE(buf,'(a)') ' # For the Down/Down block :' - CALL printout(0) - ENDIF - ELSE - is=iss-2 - is1=3-is -C If iss=3, is=1 (up) and is1=2 (down) -> Description of the up/down block -C If iss=4, is=2 (down) and is1=1 (up) -> Description of the down/up block - IF (is==1) THEN - WRITE(buf,'(a)') ' # For the Up/Down block :' - CALL printout(0) - ELSE - WRITE(buf,'(a)') ' # For the Down/Up block :' - CALL printout(0) - ENDIF - ENDIF - ALLOCATE(D(1,-l:l)) - DO m=-l,l - D(1,-l:l)=densmat(iss,iorb)%mat(m,-l:l) - WRITE(buf,'(7(2F12.6),x)') D(:,:) - CALL printout(0) - IF(is==is1) q=q+densmat(iss,iorb)%mat(m,m) - ENDDO - DEALLOCATE(D) - ENDDO - ENDIF -C Displaying the charge q of the orbital - CALL printout(0) - WRITE(buf,'(a,f10.5)')'The charge of the orbital is : ',q - CALL printout(0) - ENDDO - ENDIF -C -C ========================================================================== -C Printing the total charge in the output file (only if only_corr =.FALSE.): -C ========================================================================== - WRITE(buf,'(a,f11.5)')'TOTAL CHARGE = ',qtot - CALL printout(1) -C - ENDIF ! End of the .not.only_corr if-then-else - RETURN - END - - - - - - diff --git a/fortran/dmftproj/dmftproj.f b/fortran/dmftproj/dmftproj.f deleted file mode 100644 index 7106526..0000000 --- a/fortran/dmftproj/dmftproj.f +++ /dev/null @@ -1,884 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - PROGRAM dmftproj -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This prgm computes projections to a local (correlated) set of %% -C %% orbitals from the set of eigenfunctions obtained with Wien2k. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE almblm_data - USE common_data - USE file_names - USE prnt - USE symm - USE reps - IMPLICIT NONE -C - REAL(KIND=8) :: e_win, e_sum, elecn, qtot, qdum - REAL(KIND=8), DIMENSION(:,:), ALLOCATABLE :: Alm_sum, Qlm_sum - COMPLEX(KIND=8), DIMENSION(:,:,:,:), ALLOCATABLE :: occ_mat - COMPLEX(KIND=8), DIMENSION(:,:,:,:), ALLOCATABLE :: occ_mat_sym -C - COMPLEX(KIND=8) :: coff - COMPLEX(KIND=8),DIMENSION(-3:3,-3:3) :: tmpmat - INTEGER, DIMENSION(:,:), ALLOCATABLE :: lnreps - INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: correps - INTEGER :: isrt, ie, l, m, isym, jatom - INTEGER :: lm, ik, ilo, ib, iatom, imu, io - INTEGER :: idum, i1, i2 - INTEGER :: m1, m2, lm1, lm2 - INTEGER :: is, irep, nbrep - INTEGER :: iorb, icrorb, nmaxrep - INTEGER :: paramflag, lcorr - LOGICAL :: ifcorr - REAL(KIND=8) :: fdum, rtetr - REAL(KIND=8),PARAMETER :: Elarge=1d6 - character(len=120) line -C ================================ -C Processing of the command line : -C ================================ - CALL readcomline -C ==================================================== -C Initialization of the variable ns (number of spin) : -C ==================================================== -C If the computation uses spin-polarized input files, ns=2 - ns=1 - IF(ifSP) ns=2 -C =================================== -C Opening of the input/output files : -C =================================== - CALL openfiles -C ========================================= -C Reading of the input file case.indmftpr : -C ========================================= - READ(iuinp,*)nsort -C nsort = number of sorts of atom - ALLOCATE(nmult(0:nsort)) - nmult(0)=0 - READ(iuinp,*)nmult(1:nsort) -C nmult = multiplicity for each sort of atom, table from 1 to nsort - natom=SUM(nmult(1:nsort)) -C natom = total number of atoms in the unit cell - ALLOCATE(isort(natom)) - iatom=0 - DO isrt=1,nsort - DO imu=1,nmult(isrt) - iatom=iatom+1 - isort(iatom)=isrt - ENDDO - ENDDO -C isort = table of correspondance iatom -> isort (from 1 to natom) - READ(iuinp,*)lmax -C lmax = maximal orbital number l for all the atoms - IF(ifSO) THEN - nlm=(lmax+1)*(lmax+1)*2 - ELSE - nlm=(lmax+1)*(lmax+1) - ENDIF -C nlm = maximal number of matrix elements for an l-orbital -C only doubled when SO because of the up and down independent parts... - ALLOCATE(lsort(0:lmax,nsort)) - ALLOCATE(defbasis(nsort)) - ALLOCATE(lnreps(0:lmax,nsort)) - IF(.not.ifSO) THEN -C Spin is a good quantum number and ireps are considered in orbital space only. - ALLOCATE(correps(2*lmax+1,0:lmax,nsort)) - ELSE -C Spin is not a good quantum number anymore (possibility of basis which mixes up and dn states) -C the ireps are considered in spin+orbital space. - ALLOCATE(correps(2*(2*lmax+1),0:lmax,nsort)) - ENDIF - ALLOCATE(ifSOflag(nsort)) - DO isrt=1,nsort - READ(iuinp,*) defbasis(isrt)%typebasis - IF (defbasis(isrt)%typebasis(1:8)=='fromfile') THEN - READ(iuinp,*) defbasis(isrt)%sourcefile - ELSE - defbasis(isrt)%sourcefile = 'null' - ENDIF -C defbasis = table of correspondance isort -> "basistrans" element, table from 1 to nsort -C defbasis(isrt)%typebasis = "cubic", "complex" or "fromfile" -C defbasis(isrt)%sourcefile = the name of the file to read if typebasis="fromfile" - READ(iuinp,*)lsort(0:lmax,isrt) - READ(iuinp,*)lnreps(0:lmax,isrt) -C ifcorr is a flag who states if the atomic sort isrt has correlated orbitals. - ifcorr=.FALSE. - DO l=0,lmax - IF (lsort(l,isrt)==2) THEN - ifcorr=.TRUE. -C If lnreps(l,isrt)=1, the treatment is the same as a 0 value. -C because if the number of irep is 1, this irep will be the correlated one. -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the number of irep is not correct. -C ------------------------- -C - IF (ifSO) THEN -C With SO, the number of ireps must not exceed 2*(2*l+1). - IF(lnreps(l,isrt).gt.(2*(2*l+1))) THEN - WRITE(buf,'(a,a,i2,a,i2,a)')' The number of ireps ', - & 'considered for l=',l,' and isrt=',isrt, - & ' is not possible.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - ELSE -C Without SO, the number of ireps must not exceed (2*l+1). - IF(lnreps(l,isrt).gt.(2*l+1)) THEN - WRITE(buf,'(a,a,i2,a,i2,a)')' The number of ireps ', - & 'considered for l=',l,' and isrt=',isrt, - & ' is not possible.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - ENDIF -C --------------------------------------------------------------------------------------- -C -C The description of the different ireps is considered only if there are more than 1 irep. -C that is to say if lnreps(l,isrt)=2, 3,... - IF(lnreps(l,isrt)>0) THEN - READ(iuinp,'(14i1)') correps(1:lnreps(l,isrt),l,isrt) - ENDIF - ENDIF - ENDDO -C The ifSO_flag is read only if there is a correlated orbital for the sort isrt. - IF (ifcorr) THEN - READ(iuinp,'(i1)') ifSOflag(isrt) - ENDIF - ENDDO -C lsort = index for each orbital (0 : not include / 1 : include / 2 : correlated), table from 0 to lmax, from 1 to nsort -C lnreps = number of irreducible representations for each orbital, table from 0 to lmax, from 1 to nsort (temporary variables) -C correps = index for each irreducible representations of the correlated orbital, table from 1 to lnreps(l,isrt), from 0 to lmax, from 1 to nsort (temporary variable) -C ifSOflag = table of correspondance isort -> optionSO (1 or 0). Only used for isort with correlated orbitals - - READ(iuinp,'(A)',iostat=io) line -C Try reading the energies/bandindices and the proj_mode - READ(line,*,iostat=io) e_bot, e_top, proj_mode -C If it fails we know that we are dealing with an older version of the indmftpr file -C with only 2 values on the window line. proj_mode = 0. - IF(io.ne.0) THEN - proj_mode = 0 - READ(line,*,iostat=io) e_bot, e_top - IF(io.ne.0) THEN - WRITE(buf,'(a,a)')' The energy window line', - & ' is ill-defined.' - CALL printout(0) - STOP - WRITE(buf,'(a)')'END OF THE PRGM' - ENDIF - ENDIF - -C --------------------------------------------------------------------------------------- -C proj_mode: -C 0: use energy window for projection -C 1: use all band indices present in the given energy window -C (same number of bands at all kpoints) -C 2: use given band indices (same number of bands at all kpoints) -C --------------------------------------------------------------------------------------- - -C --------------------------------------------------------------------------------------- -C e_bot, e_top : lower/upper energy limits of window (used in mode 0) -C b_bot, b_top : lower/upper band index of window (used in mode 2) -C In mode 1 e_bot/e_top are provided in the input file and then -C translated into b_bot/b_top -C --------------------------------------------------------------------------------------- -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the energy/band window or proj_mode is not well-defined. -C --------------------------------------------------------------------------------------- -C - IF((proj_mode.lt.0) .or. (proj_mode.gt.2)) THEN - WRITE(buf,'(a,a)')' The energy window mode (3rd value)', - & ' must be 0,1 or 2.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - - IF(proj_mode==0) THEN - b_bot = 0 - b_top = 0 - ELSEIF(proj_mode==1) THEN - b_bot = 1e3 - b_top = 1 - ELSEIF(proj_mode==2) THEN - b_bot = INT(e_bot) - b_top = INT(e_top) - e_bot = 0.0 - e_top = 0.0 - ENDIF - - IF((proj_mode.lt.2) .and. (e_bot.gt.e_top)) THEN - WRITE(buf,'(a,a)')' The energy window ', - & ' is ill-defined.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - - IF((proj_mode==2) .and. (b_bot.gt.b_top)) THEN - WRITE(buf,'(a,a)')' The k-point index window ', - & ' is ill-defined.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - -C Writing in the output file case.outdmftpr the previous informations : -C ===================================================================== - WRITE(buf,'(a,a)')'Welcome in DMFTPROJ: ', - & 'PROJECTION TO LOCALIZED BASIS' - CALL printout(1) - WRITE(buf,'(a,a)')'This prgm will build', - & ' the Wannier projectors to the' - CALL printout(0) - WRITE(buf,'(a,a)')'localized orbitals of an atom', - & ' onto which DMFT will be applied.' - CALL printout(1) - WRITE(buf,'(a)')'You are performing a computation' - CALL printout(0) -C Spin orbit option - IF(ifSO) THEN - WRITE(buf,'(a)')'in which Spin-Orbit is included.' - ELSE - WRITE(buf,'(a)')'without Spin-Orbit.' - ENDIF - CALL printout(0) -C Spin polarized option - IF(ifSP) THEN - WRITE(buf,'(a)')'using Spin-Polarized Wien2k input files.' - ELSE - WRITE(buf,'(a)')'using Paramagnetic Wien2k input files.' - ENDIF - CALL printout(0) - IF (ifSO.AND.(.not.ifSP)) THEN - WRITE(buf,'(a,a)')'You must use Spin-Polarized input files', - & ' to perform Spin-Orbit computation, with this version.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C Printing nsort, nmult - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - WRITE(buf,'(a,i3)')'Sorts of atoms = ',nsort - CALL printout(0) - WRITE(buf,'(a,50i2)')'Equivalent sites per each sort:', - & nmult(1:nsort) - CALL printout(1) -C - norb=0 - ncrorb=0 - ALLOCATE(notinclude(1:nsort)) - DO isrt=1,nsort - WRITE(buf,'(a)')'-------------------------------------' - CALL printout(0) - WRITE(buf,'(a,i2,a)')'For the sort ',isrt,' :' - CALL printout(0) - notinclude(isrt)=.TRUE. -C Printing the name of the included orbitals for each sort - DO l=0,lmax - IF(lsort(l,isrt).NE.0) THEN - WRITE(buf,'(a,i2,a)')'The orbital l=',l,' is included.' - CALL printout(0) - norb=norb+nmult(isrt) - notinclude(isrt)=.FALSE. - ENDIF - ENDDO -C The variable notinclude(isrt) is a boolean which precises whether the sort isrt -C is considered in the pbm. (whether there is at least one lsort(l,isrt) not 0.) - IF (notinclude(isrt)) THEN - WRITE(buf,'(a)')'No orbital is included.' - CALL printout(0) - CALL printout(0) - cycle -C If no orbital of isrt is included, they can't be correlated orbitals. - END IF - CALL printout(0) -C Determination of the total number of correlated orbitals for each sort - DO l=0,lmax - IF(lsort(l,isrt)==2) THEN - ncrorb=ncrorb+nmult(isrt) - ENDIF ! End of the lsort=2 if-then-else - ENDDO ! End of the l loop - ENDDO ! End of the isrt loop -C norb = total number of included orbitals in the system -C ncrorb = total number of correlated orbitals in the system -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if no orbital is included. -C ------------------------- -C - IF (norb==0) THEN - WRITE(buf,'(a,a)')'You must include at least one orbital.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C --------------------------------------------------------------------------------------- -C -C =========================================================================================== -C Initialization of the "orbital-type" tables orb and crorb, tables of size norb and ncrorb : -C =========================================================================================== - ALLOCATE(orb(norb),crorb(ncrorb)) - iorb=0 - icrorb=0 - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO l=0,lmax - IF(lsort(l,isrt).NE.0) THEN -C ------------------------------- -C For all the included orbitals : -C ------------------------------- - DO imu=1,nmult(isrt) - iatom=SUM(nmult(0:isrt-1))+imu - iorb=iorb+1 - orb(iorb)%atom=iatom -C the field orb%atom = number of the atom when classified in the order (isort,imult) - orb(iorb)%sort=isrt -C the field orb%sort = sort of the associated atom - orb(iorb)%l=l -C the field orb%l = the orbital number l - IF(imu==1) THEN - orb(iorb)%first=.TRUE. - ELSE - orb(iorb)%first=.FALSE. - ENDIF -C the field orb%first = boolean (if first_atom of the sort isort or not) - IF(lnreps(l,isrt).NE.0) THEN - orb(iorb)%ifsplit=.TRUE. - ELSE - orb(iorb)%ifsplit=.FALSE. - ENDIF -C the field orb%ifsplit = boolean (if ireps are used or not) - ENDDO -C - IF(lsort(l,isrt)==2) THEN -C --------------------------------- -C For all the correlated orbitals : -C --------------------------------- - DO imu=1,nmult(isrt) - iatom=SUM(nmult(0:isrt-1))+imu - icrorb=icrorb+1 - crorb(icrorb)%atom=iatom -C the field crorb%atom = number of the atom when classified in the order (isort,imult) - crorb(icrorb)%sort=isrt -C the field crorb%sort = sort of the associated atom - crorb(icrorb)%l=l -C the field crorb%l = the orbital number l - IF(imu==1) THEN - crorb(icrorb)%first=.TRUE. - ELSE - crorb(icrorb)%first=.FALSE. - ENDIF -C the field orb%first = boolean (if first_atom of the sort isort or not) - IF(lnreps(l,isrt).NE.0) THEN - crorb(icrorb)%ifsplit=.TRUE. - ALLOCATE(crorb(icrorb)%correp(lnreps(l,isrt))) - crorb(icrorb)%correp=.FALSE. - DO irep=1,lnreps(l,isrt) - IF(correps(irep,l,isrt)==1) - & crorb(icrorb)%correp(irep)=.TRUE. - ENDDO -C the field crorb%correp is defined only when crorb%ifsplit= true -C the field orb%correp = boolean table of size lnreps(l,isrt) : True if the ireps is correlated, False otherwise - ELSE - crorb(icrorb)%ifsplit=.FALSE. - ENDIF -C the field orb%ifsplit = boolean (if ireps are used or not) - IF (ifSOflag(isrt)==1) THEN - crorb(icrorb)%ifSOat=1 - ELSE - crorb(icrorb)%ifSOat=0 - ENDIF -C the field crorb%ifSOflag = boolean (if SO are used or not) - ENDDO - ENDIF ! End of the lsort=2 if-then-else - ENDIF ! End of the lsort>0 if-then-else - ENDDO ! End of the l loop - ENDDO ! End of the isrt loop -C -C ======================================================================================= -C Reading of the transformation matrices from the complex to the required angular basis : -C ======================================================================================= - CALL set_ang_trans -C -C ====================================================================================== -C Comparing data about correlated ireps and the description of transformation matrices : -C ====================================================================================== -C - CALL printout(0) - CALL printout(0) - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - WRITE(buf,'(a)')'Precisions about correlated orbitals.' - CALL printout(0) - CALL printout(0) - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - WRITE(buf,'(a)')'-------------------------------------' - CALL printout(0) - WRITE(buf,'(a,i2,a)')'For the sort ',isrt,' :' - CALL printout(0) - lcorr=0 - DO l=0,lmax -C Only correlated orbital l of isrt are considered here. - IF (lsort(l,isrt)==2) THEN - lcorr=lcorr+1 -C If the whole orbital is correlated (lnreps=0 in this case) - IF (lnreps(l,isrt)==0) THEN - WRITE(buf,'(a,i2,a)')'The whole orbital l=',l, - & ' is included as correlated.' - CALL printout(0) -C If only one particular irep of the orbital is correlated - ELSE -C -C For a computation without spin-orbit or a computation with SO and with a basis which mixes up and dn states. -C ------------------------------------------------------------------------------------------------------------ - IF ((.not.ifSO).OR. - & (ifSO.AND.(l.NE.0).AND.reptrans(l,isrt)%ifmixing)) - & THEN -C without SO, the case l=0 can not occur since lnreps(0,isrt)=0. -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the data about ireps are conflicting. -C ------------------------- -C - IF (lnreps(l,isrt).NE.reptrans(l,isrt)%nreps) THEN - WRITE(buf,'(a,a,i2,a)') - & 'The number of ireps considered ', - & 'for the orbital l= ', l ,' is wrong.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP -C --------------------------------------------------------------------------------------- -C -C Writing in the output file case.outdmftpr the irep considered as correlated. - ELSE - nbrep=0 - DO irep=1,lnreps(l,isrt) - IF (correps(irep,l,isrt)==1) THEN - WRITE(buf,'(a,i2,a,i2,a)') - & 'The irep ',irep,' of orbital l= ', l, - & ' is considered as correlated.' - CALL printout(0) - nbrep=nbrep+1 - ENDIF - ENDDO -C --------------------------------------------------------------------------------------- -C Printing a Warning if more than one irep for one value of l is considered. -C ------------------- -C - IF (nbrep.gt.1) THEN - CALL printout(0) - WRITE(buf,'(a,a)') 'WARNING : ', - & 'more than 1 irep is included as correlated.' - CALL printout(0) - WRITE(buf,'(a,a,a)') ' ', - & 'The calculation may not be correct ', - & 'in this case.' - CALL printout(1) - ENDIF - ENDIF ! End of the data-conflict if-then-else -C -C For a computation with spin-orbit with basis which doesn't mix up and dn states. -C -------------------------------------------------------------------------------- - ELSE - WRITE(buf,'(a,i2,a)')'The whole orbital l=',l, - & ' is included as correlated.' - CALL printout(0) - WRITE(buf,'(a,a)')'because this computation ', - & 'includes Spin-Orbit coupling.' - CALL printout(0) - ENDIF ! End of the ifSo if-then-else - ENDIF ! End of the lnreps=0 if-then-else - ENDIF ! End of the lsort=2 if-then-else -C In the case of no correlated orbitals are considered for the atomic sort isrt : - ENDDO ! End of the l loop - IF (lcorr==0) THEN - WRITE(buf,'(a,a)')'No orbital is included as correlated.' - CALL printout(0) - ENDIF ! End of the lcorr=0 if-then-else - ENDDO ! End of the isrt loop - CALL printout(0) - DEALLOCATE(lnreps,correps) -C lnreps and correps can not be used anymore... -C -C ================================== -C Setting of the symmetry matrices : -C ================================== - CALL setsym -C -C ========================================================================================= -C Reading of the Wien2k informations in the case.almblm file (generated by x lapw2 -almd) : -C ========================================================================================= -C - CALL printout(0) - CALL printout(0) - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - CALL printout(0) - WRITE(buf,'(a,a)')'Reading of the file ',almblm_file - CALL printout(0) -C Reading of the klist_band file if the computation if band oriented (option -band) - IF(ifBAND) CALL read_k_list - DO is=1,ns -C If the computation is spin-polarized, there are two differents file (up and down) - IF(is==2) THEN - CLOSE(iualmblm) - OPEN(iualmblm,file=almblm_file_sp2,status='old') - WRITE(buf,'(a,a)')'Reading of the file ',almblm_file_sp2 - CALL printout(0) - ENDIF -C ------------------------------------------------------------- -C Reading of the general informations in the case.almblm file : -C ------------------------------------------------------------- - READ(iualmblm,*)elecn - READ(iualmblm,*)nk - READ(iualmblm,*)nloat -C elecn = total number of semicore+valence electrons in the system -C nk = total number of k_points -C nloat = maximal number of LO (local orbitals in LAPW expansion) - IF(ifBAND) THEN - IF (is==1) READ(iuinp,*)eferm - READ(iualmblm,*) - ELSE - READ(iualmblm,*)eferm - ENDIF -C eferm = fermi level (if the computation is band-oriented, it is read in case.indmftpr) - IF(is==1) THEN - ALLOCATE(kp(nk,ns),u_dot_norm(0:lmax,nsort,ns)) - ALLOCATE(ovl_LO_u(nloat,0:lmax,nsort,ns)) - ALLOCATE(ovl_LO_udot(nloat,0:lmax,nsort,ns)) - ALLOCATE(nLO(0:lmax,nsort)) - ENDIF - nLO=0 - DO isrt=1,nsort -C Beginning of the loop on the sort of atoms (isort) - - DO l=0,lmax - READ(iualmblm,*)u_dot_norm(l,isrt,is) - READ(iualmblm,*)nLO(l,isrt) -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if nLO is more than 1. -C ------------------------- -C - IF (nLO(l,isrt) > 1) THEN - WRITE(buf,'(a,a)')'The current version of DMFTproj ', - & ' cannot be used with more than 1 LO orbital by atom. ' - CALL printout(0) - WRITE(buf,'(a,i2,a,i2)') - & ' This is not the case for the orbital l= ',l, - & ' of the atomic sort ',isrt - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C --------------------------------------------------------------------------------------- -C -C It is assumed in the following that nLO is 0 or 1. - DO ilo=1,nLO(l,isrt) - READ(iualmblm,*)ovl_LO_u(ilo,l,isrt,is), - & ovl_LO_udot(ilo,l,isrt,is) - ENDDO - ENDDO -C kp = table of "kp_data" elements. It ranges from 1 to nk and from 1 to ns. -C u_dot_norm(isort,l) = norm for the orbital -C nLO(isort,l) = number of LO (local orbitals) for each orbital of each sort (its value is assumed to be 0 or 1) -C ovl_LO_u(isort, l) = overlap element for the LO orbitals -C ovl_LO_udot(isort, l) = overlap element for the LO orbitals -C These informations are relative to the basis set for the atomic eigenstates (LAPW-APW expansion) -C -C -------------------------------------------------------------- -C For each kpoints and isrt, the "kp_data" elements are filled : -C -------------------------------------------------------------- - DO ik=1,nk - READ(iualmblm,'()') - READ(iualmblm,'()') - READ(iualmblm,*)idum,kp(ik,is)%nbmin,kp(ik,is)%nbmax -C idum = useless variable in case.almblm -C kp(ik,is)%nbmin = index of the lowest band -C kp(ik,is)%nbmzx = index of the uppest band - IF(.NOT.ALLOCATED(kp(ik,is)%Alm)) THEN - ALLOCATE(kp(ik,is)%eband(kp(ik,is) - & %nbmin:kp(ik,is)%nbmax)) - ALLOCATE(kp(ik,is)%Alm(nlm,natom, - & kp(ik,is)%nbmin:kp(ik,is)%nbmax)) - ALLOCATE(kp(ik,is)%Blm(nlm,natom, - & kp(ik,is)%nbmin:kp(ik,is)%nbmax)) - ALLOCATE(kp(ik,is)%Clm(nloat,nlm,natom, - & kp(ik,is)%nbmin:kp(ik,is)%nbmax)) - ALLOCATE(kp(ik,is)%tetrweight(kp(ik,is)%nbmin: - & kp(ik,is)%nbmax)) - ENDIF - DO ib=kp(ik,is)%nbmin,kp(ik,is)%nbmax - READ(iualmblm,*)rtetr,kp(ik,is)%eband(ib) - kp(ik,is)%tetrweight(ib)=CMPLX(rtetr,0d0) - ENDDO -C rtetr = tetrahedron weights of the band ib at this kpoint -C the field kp(ik,is)%eband(ib) = eigenvalues of the ib band at this kpoint -C the field kp(ik,is)%tetrweight(ib) = the tetrahedron weights are set as complex number to avoid problems with SQRT(tetrweight) - kp(ik,is)%weight=REAL(kp(ik,is)%tetrweight - & (kp(ik,is)%nbmin)) -C the field kp(ik,is)%weight = value of the tetrahedron weight of the lowest band (fully occupied) at this kpoint -> "a geometric factor" - kp(ik,is)%eband=kp(ik,is)%eband-eferm -C the eigenvalues kp(ik,is)%eband are shifted with respect to the fermi level. -C -C Reading of the Alm, Blm and Clm coefficient - DO imu=1,nmult(isrt) - iatom=SUM(nmult(0:isrt-1))+imu - READ(iualmblm,'()') - READ(iualmblm,*)idum - DO ib=kp(ik,is)%nbmin,kp(ik,is)%nbmax - lm=0 - DO l=0,lmax - DO m=-l,l - lm=lm+1 - READ(iualmblm,*)kp(ik,is)%Alm(lm,iatom,ib), - & kp(ik,is)%Blm(lm,iatom,ib) - DO ilo=1,nLO(l,isrt) - READ(iualmblm,*)kp(ik,is)%Clm(ilo,lm,iatom,ib) - ENDDO - ENDDO ! End of the m loop - ENDDO ! End of the l loop - ENDDO ! End of the ib loop - ENDDO ! End of the imu loop -C the field kp(ik,is)%Alm = coefficient A_(lm,ib,iatom)(ik,is) as defined in equation (2.34) of my thesis (equation (??) of the tutorial) -C the field kp(ik,is)%Blm = coefficient B_(lm,ib,iatom)(ik,is) as defined in equation (2.34) of my thesis (equation (??) of the tutorial) -C the field kp(ik,is)%Clm = coefficient C_(ilo,lm,ib,iatom)(ik,is) as defined in equation (2.34) of my thesis (equation (??) of the tutorial) -C Their explicit expression depends of the representation (LAPW or APW). They enable to compute the projectors. -C These values are given for all the orbitals (even those which are not included in the study) - ENDDO ! End of the loop on kp - ENDDO ! End of the loop on isort - ENDDO ! End of the loop on ns (spin) -C End of reading the case.almblm.file -C Printing in the file case.outdmftpr the fermi level (in Rydberg) - CALL printout(0) - WRITE(buf,'(a,f10.5,a)')'The value of the Fermi Energy is ', - & eferm,' Ry.' - CALL printout(0) - WRITE(buf,'(a,a)')'All the considered energies are now given ', - & 'with respect to this value. (E_Fermi is now 0 Ry)' - CALL printout(1) -C -C --------------------------------------------------------------------------------------- -C If proj_mode=1 find now the lowest and highes band index -C --------------------------------------------------------------------------------------- -C - IF(proj_mode==1) THEN - DO is=1,ns - DO ik=1,nk - DO ib=kp(ik,is)%nbmin,kp(ik,is)%nbmax - IF(kp(ik,is)%eband(ib) > e_bot.AND. - & kp(ik,is)%eband(ib).LE.e_top) THEN - IF(ib.gt.b_top) THEN - b_top = ib - ENDIF - IF(ib.lt.b_bot) THEN - b_bot = ib - ENDIF - ENDIF - ENDDO ! End of the ib loop - ENDDO ! End of the ik loop - ENDDO ! End of the is loop - e_top = 0.0 - e_bot = 0.0 - ENDIF - -C --------------------------------------------------------------------------------------- -C Printing the size of the Energy window -C --------------------------------------------------------------------------------------- - - CALL printout(0) - IF(proj_mode==0) THEN - WRITE(buf,'(2(a,f10.5),a)') - & 'The Eigenstates are projected in an energy window from ', - & e_bot,' Ry to ',e_top,' Ry around the Fermi level.' - ELSEIF(proj_mode==1) THEN - WRITE(buf,'(a,2(a,i3),a)') - & 'The Eigenstates are projected for the band indices from ', - & 'band Nr. ', b_bot,' to ',b_top,'.' - ELSEIF(proj_mode==2) THEN - WRITE(buf,'(a,2(a,i3),a)') - & 'The Eigenstates are projected for the band indices from ', - & 'band Nr. ',b_bot,' to ',b_top,'.' - ENDIF - CALL printout(1) -C -C ============================================================== -C Computation of the density matrices up to the Fermi level Ef : -C ============================================================== -C - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - WRITE(buf,'(a,a)')'Computation of the Occupancies ', - & 'and Density Matrices up to E_Fermi' - CALL printout(1) -C ---------------------------------------- -C Setting up the projections for all bands -C ---------------------------------------- - IF(proj_mode==0) THEN - CALL set_projections(-Elarge,Elarge) - ELSE - CALL set_projections(1d0,1d6) - ENDIF - - -C Elarge is an energy variable equal to 1.d6 Rydberg (very large !!!) -C -C --------------------------------------------------------- -C Computation of the density matrices and the total charges -C --------------------------------------------------------- -C - IF(.NOT.ifBAND) CALL density(.TRUE.,.FALSE.,qdum,.TRUE.) -C For the integration, tetrahedron weights are used. -C The computation is performed for all the included orbitals -C and the density matrices are printed in the file case.outdmftpr -C qdum is the total charge density. (unused variable) -C -C The calculation of Wannier projectors is performed only if correlated orbitals are included. - IF(ncrorb.NE.0) THEN -C -C ========================================================================== -C Computation of the charge below the lower limit e_bot/b_bot of the window : -C ========================================================================== -C - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - IF(proj_mode==0) THEN - WRITE(buf,'(a,a,f10.5,a)')'Computation of the total ', - & 'Charge below the lower limit of the energy window :', - & e_bot,' Ry' - ELSE - WRITE(buf,'(a,a,i3)')'Computation of the total ', - & 'Charge below the lower band index Nr. ', b_bot - ENDIF - CALL printout(1) -C -C ---------------------------------------- -C Setting up the projections for all bands -C ---------------------------------------- - IF(proj_mode==0) THEN - CALL set_projections(-Elarge,e_bot) - ELSE -C set_projections expects REAL(8) - CALL set_projections(1d0,REAL(b_bot-1,8)) - ENDIF -C -C --------------------------------------------------------- -C Computation of the density matrices and the total charges -C --------------------------------------------------------- -C - IF(.NOT.ifBAND) CALL density(.FAlSE.,.FALSE.,qtot,.FALSE.) -C A simple point integration is used. -C The computation is performed for all the included orbitals. -C qtot is the total charge density below e_bot/b_bot. -C Nothing will be printed in the file case.outdmftpr apart from the total charge qtot. -C -C -C ============================================================ -C Computation of the Wannier projectors in the energy window : -C ============================================================ -C - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - IF(proj_mode==0) THEN - WRITE(buf,'(a,a,a,f10.5,a,f10.5,a)')'Computation of the ', - & 'Occupancies and Density Matrices in the desired ', - & 'energy window [ ',e_bot,'; ',e_top,']' - ELSE - WRITE(buf,'(a,a,a,i3,a,i3,a)')'Computation of the ', - & 'Occupancies and Density Matrices in the desired ', - & 'band range [ ',b_bot,'; ',b_top,']' - ENDIF - CALL printout(1) -C -C ---------------------------------------- -C Setting up the projections for all bands -C ---------------------------------------- - IF(proj_mode==0) THEN - CALL set_projections(e_bot,e_top) - ELSE - CALL set_projections(REAL(b_bot,8),REAL(b_top,8)) - ENDIF -C -C ------------------------------------------------------------------------------ -C Orthonormalization of the projectors for correlated orbitals P(icrorb,ik,is) : -C ------------------------------------------------------------------------------ - IF(ifSO) THEN -C In this case, up and dn states must be orthogonalized together -C because the spin is not a good quantum number anymore. - CALL orthogonal_wannier_SO - ELSE -C In this case, up and dn states can be orthogonalized separately - CALL orthogonal_wannier - ENDIF -C -C --------------------------------------------------------- -C Computation of the density matrices and the total charges -C --------------------------------------------------------- -C Tetrahedron weights are used, the computation are done for correlated orbitals only and are printed in the outputfile. - IF(.NOT.ifBAND) CALL density(.TRUE.,.TRUE.,qdum,.TRUE.) -C For the integration, tetrahedron weights are used. -C The computation is performed for the correlated orbitals only -C and the density matrices are printed in the file case.outdmftpr -C qdum is the total charge density in the energy window. (unused variable) -C -C -C Writing the output files for DMFT computations : -C ------------------------------------------------ - IF(.NOT.ifBAND) THEN - CALL outqmc(elecn,qtot) - CALL outbwin - ELSE - CALL outband - ENDIF - ENDIF -C End of the prgm - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) -C - END - - - - - - diff --git a/fortran/dmftproj/modules.f b/fortran/dmftproj/modules.f deleted file mode 100644 index 434887a..0000000 --- a/fortran/dmftproj/modules.f +++ /dev/null @@ -1,412 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - -C-------------------- -C MODULE almblm_data -C-------------------- - MODULE almblm_data - INTEGER :: nk, nloat - INTEGER, DIMENSION(:,:), ALLOCATABLE :: nLO - REAL(KIND=8), DIMENSION(:,:,:), ALLOCATABLE :: u_dot_norm - REAL(KIND=8), DIMENSION(:,:,:,:), ALLOCATABLE :: ovl_LO_u - REAL(KIND=8), DIMENSION(:,:,:,:), ALLOCATABLE :: ovl_LO_udot - TYPE kp_data - LOGICAL :: included - INTEGER :: nb_bot, nb_top - INTEGER :: nbmin,nbmax - REAL(KIND=8) :: weight - COMPLEX(KIND=8), DIMENSION(:), ALLOCATABLE :: tetrweight - REAL(KIND=8),DIMENSION(:), ALLOCATABLE :: eband - COMPLEX(KIND=8),DIMENSION(:,:,:), ALLOCATABLE :: Alm, Blm - COMPLEX(KIND=8),DIMENSION(:,:,:,:), ALLOCATABLE :: Clm - ENDTYPE - TYPE(kp_data), DIMENSION(:,:), ALLOCATABLE :: kp - ENDMODULE almblm_data -C -C-------------- -C MODULE bands -C-------------- - MODULE bands - INTEGER :: nlab, nkband - TYPE label - CHARACTER(len=20) :: kname - INTEGER :: pos - ENDTYPE - TYPE(label), DIMENSION(:), ALLOCATABLE :: labels - ENDMODULE -C -C-------------------- -C MODULE common_data -C-------------------- - MODULE common_data -C 11/03/10 : Modification of the fullpath for myDMFTproj-2 -C CHARACTER(len=*), PARAMETER :: wien_path= -C & '/workpmc/martins/DMFTprojectors/newDMFTproj' - CHARACTER(len=250) :: wien_path - INTEGER :: natom, nsort, lmax, nlm, ns, nsp - INTEGER, DIMENSION(:), ALLOCATABLE :: isort - INTEGER, DIMENSION(:), ALLOCATABLE :: nmult - INTEGER, DIMENSION(:,:), ALLOCATABLE :: lsort - INTEGER, DIMENSION(:), ALLOCATABLE :: ifSOflag - INTEGER, DIMENSION(:), ALLOCATABLE :: timeflag - INTEGER :: b_bot, b_top, proj_mode - LOGICAL :: ifSO, ifSP, ifBAND - LOGICAL, DIMENSION(:), ALLOCATABLE :: notinclude - REAL(KIND=8) :: eferm - REAL(KIND=8) :: e_bot, e_top - - REAL(KIND=8), PARAMETER :: PI=3.1415926535898d0 -C New type structure basistrans - TYPE deftrans - CHARACTER(len=8) :: typebasis -C The size of typebasis is limited to 8 characters ! - CHARACTER(len=25) :: sourcefile -C The size of sourcefile is limited to 25 characters ! - ENDTYPE - TYPE(deftrans), DIMENSION(:), ALLOCATABLE :: defbasis -C Type structure orbital - TYPE orbital - INTEGER :: atom - INTEGER :: sort - INTEGER :: l - LOGICAL :: first - LOGICAL :: ifsplit - INTEGER :: ifSOat - LOGICAL,DIMENSION(:), ALLOCATABLE :: correp - ENDTYPE - TYPE(orbital), DIMENSION(:), ALLOCATABLE :: orb, crorb - INTEGER :: norb, ncrorb - ENDMODULE common_data -C -C------------------ -C MODULE factorial -C------------------ - MODULE factorial - REAL(KIND=8), DIMENSION(:), ALLOCATABLE :: fac - INTEGER :: nfctrl - CONTAINS - SUBROUTINE setfact(n) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets the factorial array %% -C %% FAC(I+1) = I! for I=0,...,N-1 %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - IMPLICIT NONE - INTEGER :: n, i -C - nfctrl=n - ALLOCATE(fac(nfctrl)) -C I! = FAC(I+1) - fac(1)=1.0d00 - DO i=1,nfctrl-1 - fac(i+1)=i*fac(i) - ENDDO - RETURN - END SUBROUTINE setfact - END MODULE factorial -C -C------------------- -C MODULE file_names -C------------------- - MODULE file_names - INTEGER :: iudef, iuinp, iusym, iualmblm, iumatfile, iuradwf - INTEGER :: iuklist - INTEGER :: ouproj, ouprn, ouctqmc, oupartial,ousymqmc, ousympar - INTEGER :: ouband, oubwinup, oubwindn, oubwin - INTEGER :: outw2kpath - CHARACTER(len=25) :: jobname - CHARACTER(len=35) :: inp_file, sym_file, almblm_file - CHARACTER(len=35) :: almblm_file_sp2 - CHARACTER(len=35) :: radwf_file, radwf_file_sp2 - CHARACTER(len=35) :: prn_file, ctqmc_file, partial_file - CHARACTER(len=35) :: klist_file - CHARACTER(len=35) :: symqmc_file, sympar_file, outband_file - CHARACTER(len=35) :: oubwin_file, oubwinup_file, oubwindn_file - CHARACTER(len=8), PARAMETER :: inp_ext='indmftpr' - CHARACTER(len=7), PARAMETER :: sym_ext='dmftsym' - CHARACTER(len=6), PARAMETER :: almblm_ext='almblm' - CHARACTER(len=8), PARAMETER :: almblmup_ext='almblmup' - CHARACTER(len=8), PARAMETER :: almblmdn_ext='almblmdn' - CHARACTER(len=9), PARAMETER :: prn_ext='outdmftpr' - CHARACTER(len=8), PARAMETER :: ctqmc_ext='ctqmcout' - CHARACTER(len=7), PARAMETER :: partial_ext='parproj' - CHARACTER(len=6), PARAMETER :: symqmc_ext='symqmc' - CHARACTER(len=6), PARAMETER :: sympar_ext='sympar' - CHARACTER(len=7), PARAMETER :: radwfup_ext='radwfup' - CHARACTER(len=7), PARAMETER :: radwfdn_ext='radwfdn' - CHARACTER(len=10), PARAMETER :: klist_ext='klist_band' - CHARACTER(len=7), PARAMETER :: outband_ext='outband' - CHARACTER(len=6), PARAMETER :: oubwin_ext='oubwin' - CHARACTER(len=8), PARAMETER :: oubwinup_ext='oubwinup' - CHARACTER(len=8), PARAMETER :: oubwindn_ext='oubwindn' - CONTAINS - SUBROUTINE set_file_name(filename,exten) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets the file name %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - IMPLICIT NONE - CHARACTER(len=*) :: filename, exten - INTEGER :: i1, i2, i - i1=LEN_TRIM(jobname) - i2=LEN(exten) - i=i1+i2+1 - IF(LEN(filename) < i) THEN - WRITE(*,'(i3,3a)') - & i,' characters required for the $case.',exten, - & ' filename, too long' - STOP - ENDIF - filename=' ' - filename(1:i)=jobname(1:i1)//'.'//exten(1:i2) - END SUBROUTINE set_file_name -C - SUBROUTINE openfiles -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine opens the input and output units for dmftproj %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data, ONLY: ifSP, ifSO, ifBAND, wien_path - IMPLICIT NONE - CHARACTER(len=120) :: buf - INTEGER :: i1, i2 -C initialize input/output channels - CALL setchannels -C Get working directory name: - CALL system('pwd > dir_name.tmp') - OPEN(outw2kpath,file='dir_name.tmp',status='old') - READ(outw2kpath,'(a)')buf - CLOSE(outw2kpath,status='delete') - i1=INDEX(buf,'/',.TRUE.) - i2=LEN_TRIM(buf) - jobname(1:i2-i1)=buf(i1+1:i2) - jobname(i2-i1+1:)=' ' -C Construct file names - CALL set_file_name(inp_file,inp_ext) - CALL set_file_name(sym_file,sym_ext) - IF(.NOT.ifSP) THEN - CALL set_file_name(almblm_file,almblm_ext) - ELSE - CALL set_file_name(almblm_file,almblmup_ext) - CALL set_file_name(almblm_file_sp2,almblmdn_ext) - ENDIF - CALL set_file_name(prn_file,prn_ext) - CALL set_file_name(ctqmc_file,ctqmc_ext) - CALL set_file_name(partial_file,partial_ext) - CALL set_file_name(symqmc_file,symqmc_ext) - CALL set_file_name(sympar_file,sympar_ext) - IF(ifSP.AND.ifSO) THEN - CALL set_file_name(radwf_file,radwfup_ext) - CALL set_file_name(radwf_file_sp2,radwfdn_ext) - ENDIF - IF(ifBAND) THEN - CALL set_file_name(klist_file,klist_ext) - CALL set_file_name(outband_file,outband_ext) - ENDIF - IF(ifSP) THEN - CALL set_file_name(oubwinup_file,oubwinup_ext) - CALL set_file_name(oubwindn_file,oubwindn_ext) - ELSE - CALL set_file_name(oubwin_file,oubwin_ext) - ENDIF -C Open units - OPEN(iuinp,file=inp_file,status='old') - OPEN(iusym,file=sym_file,status='old') - OPEN(iualmblm,file=almblm_file,status='old') - OPEN(ouprn,file=prn_file) - OPEN(ouctqmc,file=ctqmc_file) - OPEN(oupartial,file=partial_file) - OPEN(ousymqmc,file=symqmc_file) - OPEN(ousympar,file=sympar_file) - IF(ifBAND) THEN - OPEN(iuklist,file=klist_file,status='old') - OPEN(ouband,file=outband_file) - ENDIF - IF(ifSP) THEN - OPEN(oubwinup,file=oubwinup_file) - OPEN(oubwindn,file=oubwindn_file) - ELSE - OPEN(oubwin,file=oubwin_file) - ENDIF -C -C Set path to Wien2k - CALL system('echo $WIENROOT > path_wienroot.tmp') - OPEN(outw2kpath,file='path_wienroot.tmp',status='old') - READ(outw2kpath,'(a)')wien_path - CLOSE(outw2kpath,status='delete') -C - RETURN - END SUBROUTINE -C - SUBROUTINE setchannels -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine opens the input and output channels %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data, ONLY: ifSP - IMPLICIT NONE -C Channels -C input - iudef=5 ! def-file - iuinp=7 ! input data - iusym=8 ! symmetries - iualmblm=9 ! almblm matrices from Wien - iumatfile=15 !transformation matrices between different angular basises - iuradwf=16 !radial mesh and wave functions - iuklist=20 !bands -C output - ouprn=10 ! print-out file - ouproj=11 ! projection matrices and other data for DMFT run - ouctqmc=12 ! output for ctqmc - oupartial=13 ! output for partial charges projectors for ctqmc - ousymqmc=14 ! output for permutations and rotation matrices - ousympar=19 ! output for permutations and rotation matrices - ! for partial charges analisis - ouband=21 ! bands - IF(ifSP) THEN - oubwinup=22 ! included bands information for lapw2(up) - oubwindn=23 ! included bands information for lapw2(dn) - ELSE - oubwin=22 ! included bands information for lapw2 - ENDIF -C - RETURN - END SUBROUTINE -C -C - ENDMODULE file_names -C - MODULE prnt - CHARACTER(len=250) :: buf - CONTAINS - SUBROUTINE printout(newline) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine prints the string in buf to the screen %% -C %% and to the output file and renitializes buf %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE file_names - IMPLICIT NONE - INTEGER :: newline, i - i=LEN_TRIM(buf) - WRITE(ouprn,'(a)')buf(1:i) - WRITE(*,'(a)')buf(1:i) - buf=' ' - IF(newline==1) THEN - WRITE(ouprn,'(/)') - WRITE(*,'(/)') - ENDIF - RETURN - END subroutine - ENDMODULE prnt -C -C-------------------- -C MODULE projections -C-------------------- - MODULE projections - TYPE proj_mat - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: mat - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: mat_rep - ENDTYPE - TYPE(proj_mat), DIMENSION(:,:,:), ALLOCATABLE :: pr_crorb -C - TYPE proj_mat_n - COMPLEX(KIND=8), DIMENSION(:,:,:), ALLOCATABLE :: matn - COMPLEX(KIND=8), DIMENSION(:,:,:), ALLOCATABLE :: matn_rep - ENDTYPE - TYPE(proj_mat_n), DIMENSION(:,:,:), ALLOCATABLE :: pr_orb -C - TYPE ortfunc - INTEGER :: n - REAL(KIND=8), DIMENSION(:,:,:), ALLOCATABLE :: s12 - ENDTYPE - TYPE(ortfunc), DIMENSION(:), ALLOCATABLE :: norm_radf - ENDMODULE projections -C -C------------- -C MODULE reps -C------------- - MODULE reps - TYPE ang_bas - INTEGER :: nreps - INTEGER, DIMENSION(:), ALLOCATABLE :: dreps - LOGICAL :: ifmixing - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: transmat - ENDTYPE - TYPE(ang_bas), DIMENSION(:,:), ALLOCATABLE :: reptrans - ENDMODULE -C -C------------- -C MODULE symm -C------------- - MODULE symm - TYPE matrix - COMPLEX(KIND=8),DIMENSION(:,:),ALLOCATABLE :: mat - ENDTYPE - TYPE symop - LOGICAL :: timeinv - INTEGER, DIMENSION(:), ALLOCATABLE :: perm - INTEGER :: iprop - REAL(KIND=8) :: a, b, g - REAL(KIND=8) :: phase - REAL(KIND=8) :: krotm(3,3) - COMPLEX(KIND=8),DIMENSION(:,:,:),ALLOCATABLE ::rotl - TYPE(matrix),DIMENSION(:,:),ALLOCATABLE ::rotrep - ENDTYPE - TYPE symoploc - LOGICAL :: timeinv - INTEGER :: iprop - INTEGER :: srotnum - REAL(KIND=8) :: a, b, g - REAL(KIND=8) :: phase - REAL(KIND=8) :: krotm(3,3) - COMPLEX(KIND=8),DIMENSION(:,:,:),ALLOCATABLE ::rotl - TYPE(matrix),DIMENSION(:),ALLOCATABLE ::rotrep - ENDTYPE - INTEGER :: nsym - INTEGER :: lsym, nlmsym - TYPE(symop), DIMENSION(:), ALLOCATABLE :: srot - TYPE(symoploc), DIMENSION(:), ALLOCATABLE :: rotloc - TYPE(matrix), DIMENSION(:,:), ALLOCATABLE :: densmat - TYPE(matrix), DIMENSION(:,:), ALLOCATABLE :: crdensmat - END MODULE symm - diff --git a/fortran/dmftproj/orthogonal.f b/fortran/dmftproj/orthogonal.f deleted file mode 100644 index 7d24858..0000000 --- a/fortran/dmftproj/orthogonal.f +++ /dev/null @@ -1,225 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE orthogonal_h(s1,ndim,inv) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine computes : %% -C %% - if inv = .FALSE. the square root of the Hermitian matrix s1 %% -C %% - if inv = .TRUE. the inverse of the square root of the %% -C %% Hermitian matrix s1 %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE prnt - IMPLICIT NONE - INTEGER :: ndim, INFO, lm, lm1 - COMPLEX(KIND=8), DIMENSION(ndim) :: WORK - COMPLEX(KIND=8), DIMENSION(ndim,ndim) :: s1 - INTEGER, DIMENSION(ndim,ndim) :: IPIV - LOGICAL :: inv -C -C Calculation of S1^(1/2) or S1^(-1/2): -C ------------------------------------- - CALL sqrtm(s1,ndim,inv) -C The resulting matrix is stored in s1. - RETURN - END - - SUBROUTINE orthogonal_r(s2,ndim,inv) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine computes : %% -C %% - if inv = .FALSE. the square root of s1 %% -C %% - if inv = .TRUE. the inverse of the square root of s2 %% -C %% where s2 is a real symmetric matrix. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE prnt - IMPLICIT NONE - INTEGER :: ndim, INFO, lm, lm1 - COMPLEX(KIND=8), DIMENSION(ndim) :: WORK - COMPLEX(KIND=8), DIMENSION(ndim,ndim) :: s1 - REAL(KIND=8), DIMENSION(ndim,ndim) :: s2 - INTEGER, DIMENSION(ndim,ndim) :: IPIV - LOGICAL :: inv -C -C Calculation of S2^(1/2) or S2^(-1/2): -C ------------------------------------- - s1=s2 - CALL sqrtm(s1,ndim,inv) - s2=REAL(s1) -C The resulting matrix is stored in s2. - RETURN - END - - - SUBROUTINE sqrtm(cmat,m,inv) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine calculates the square root of a positively %% -C %% defined Hermitian matrix A=cmat using the decomposition %% -C %% A=Z*D*Z^H %% -C %% where D is a diagonal matrix of eigenvalues of A, %% -C %% Z is matrix of orthonormal eigenvectors of A, %% -C %% Z^H is its Hermitian conjugate. %% -C %% Then A^(1/2)=Z*D^(1/2)*Z^H. %% -C %% Correction: the matrix A is allowed to be negatively defined. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - IMPLICIT NONE - INTEGER :: m - COMPLEX(KIND=8), DIMENSION(m,m):: cmat, D, D1 - LOGICAL :: inv -C Calculation of Z*D^(1/2): -C ------------------------- - CALL sqrt_eigenvec(cmat,D1,m,inv) - WRITE(95,*) cmat - WRITE(95,*) ' ' - WRITE(95,*) D1 - WRITE(95,*) ' ' -C Calculation of A^(1/2)=Z*D^(1/2)*Z^H: -C ------------------------------------- - D=CONJG(cmat) - call ZGEMM('N','T',m,m,m,DCMPLX(1.D0,0.D0),D1, - & m,D,m,DCMPLX(0.D0,0.D0),cmat,m) -C The resulting matrix is stored in cmat. - RETURN - END - - - SUBROUTINE sqrt_eigenvec(cmat,D1,m,inv) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine computes : %% -C %% - if inv = .FALSE. Z*D^(1/2) %% -C %% - if inv = .TRUE. Z*D^(-1/2) %% -C %% where Z is a matrix of orthonormal eigenvectors of cmat and %% -C %% D is the diagonal matrix of cmat's eigenvalues. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE prnt - IMPLICIT NONE - LOGICAL :: inv, ifwrite - INTEGER :: m, INFO, i, j - INTEGER, PARAMETER :: nwork=40 -C - COMPLEX(KIND=8), allocatable, DIMENSION(:) :: WORK - COMPLEX(KIND=8), DIMENSION(m,m) :: cmat, D1 - REAL(KIND=8), DIMENSION(m) :: W - COMPLEX(KIND=8), DIMENSION(m) :: W_comp - REAL(KIND=8), allocatable, DIMENSION(:) :: RWORK -C -C Finding the eigenvalues and the eigenvectors of cmat : -C ------------------------------------------------------ - ALLOCATE(rwork(3*m-2)) - ALLOCATE(work(2*m-1)) - CALL ZHEEV('V', 'U', m, cmat, m, W, WORK,2*m-1,RWORK,INFO) - IF (info.ne.0) THEN - WRITE(buf,'(a)') - & 'The subroutine zheev ends with info = ',info - CALL printout(0) - WRITE(buf,'(a)')'In sqrt_eigenvec, a pbm occurs in zheev.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C W contains the eigenvalues of cmat. - W_comp=CMPLX(W,0d0) -C -C Checking of the validity of the computation : -C --------------------------------------------- - ifwrite=.FALSE. - DO j=1,m -C The warning is written only once in the file case.outdmftpr - IF (ifwrite) EXIT -C Checking if the eigenvalues are not negative. - IF (W(j).lt.0.d0) THEN - WRITE(buf,'(a,i2,a,a)') - & 'WARNING : An eigenvalue (',j,') of the ', - & 'overlap matrix is negative.' - CALL printout(0) - WRITE(buf,'(a,a)')' The result ', - & 'of the calculation may thus be wrong.' - CALL printout(1) - ifwrite=.TRUE. - ENDIF - IF (ABS(W(j)).lt.1.d-12) THEN - WRITE(buf,'(a,i2,a,a)') - & 'WARNING : An eigenvalue (',j,') of the ', - & 'overlap matrix is almost zero.' - CALL printout(0) - WRITE(buf,'(a,a)')' The result ', - & 'of the calculation may thus be wrong.' - CALL printout(1) - ifwrite=.TRUE. - ENDIF - ENDDO -C -C Calculation of Z*D^(1/2) : -C -------------------------- -C The result is stored in D1. - IF(.NOT.inv) THEN - DO i=1,m - DO j=1,m - D1(i,j)=cmat(i,j)*SQRT(W_comp(j)) - ENDDO - ENDDO - ELSE -C Calculation of Z*D^(-1/2) : -C --------------------------- -C The result is stored in D1. - DO i=1,m - DO j=1,m - IF (ABS(W(j))==0.d0) THEN - WRITE(buf,'(a,i2,a)') - & 'An eigenvalue (',j,') of the ', - & 'overlap matrix has the value 0.' - CALL printout(0) - WRITE(buf,'(a)') - & 'The calculation can not be performed further.' - CALL printout(0) - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - D1(i,j)=cmat(i,j)/SQRT(W_comp(j)) - ENDDO - ENDDO - ENDIF -C The resulting matrix is stored in D1 and cmat is now Z. - RETURN - END - diff --git a/fortran/dmftproj/orthogonal_wannier.f b/fortran/dmftproj/orthogonal_wannier.f deleted file mode 100644 index 171c754..0000000 --- a/fortran/dmftproj/orthogonal_wannier.f +++ /dev/null @@ -1,593 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE orthogonal_wannier -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine orthonormalizes the Wannier-like functions %% -C %% obtained with the projectors P(icrorb,ik,is), in order to %% -C %% get a set of "true" Wannier orbitals. %% -C %% %% -C %% Only the correlated orbitals are treated here. %% -C %% %% -C %% THIS VERSION CAN NOT BE USED WITH SPIN-ORBIT %% -C %% (since the calculation is made independently for up/dn states) %% -C %% THIS VERSION CAN BE USED WITH SPIN-POLARIZED INPUT FILES. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE almblm_data - USE common_data - USE prnt - USE projections - USE reps - IMPLICIT NONE - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: Dmat, D_orth, D - INTEGER :: is, ik, l, nbnd, ndim, isrt, nbbot, nbtop - INTEGER :: icrorb, ind1, ind2, ib, iatom - INTEGER :: m1, m2, irep -C - WRITE(buf,'(a)')'Orthonormalization of the projectors...' - CALL printout(0) - CALL printout(0) -C - IF(ncrorb==0) RETURN -C -C ===================================== -C Creation of the overlap matrix Dmat : -C ===================================== -C -C ----------------------------------------------------------- -C Determination of the dimension ndim of the overlap matrix : -C ----------------------------------------------------------- - ndim=0 -C Loop on the correlated orbitals - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C Since this subroutine is used only in the case without SO, -C the correlated ireps can be considered if there are any. (ifsplit=.TRUE.) - IF(crorb(icrorb)%ifsplit) THEN -C the value of l can not be 0 here, because ifsplit is necessary .FALSE. -C for s-orbital (restriction in dmftproj.f) - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) - & ndim=ndim+reptrans(l,isrt)%dreps(irep) -C The dimension of the irep is added to ndim. - ENDDO - ELSE -C If no particular irep is considered (ifsplit=.FALSE.), -C The whole matrix of the representation is considered. - ndim=ndim+2*l+1 - ENDIF - ENDDO -C ------------------ -C Creation of Dmat : -C ------------------ - ALLOCATE(Dmat(1:ndim,1:ndim)) -C -C ===================================================================== -C Computation of the orthonormalized Wannier functions and projectors : -C ===================================================================== -C The computation is performed for each k_point and each spin-value independently -C because they are good quantum numbers. - DO ik=1,nk - DO is=1,ns -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - nbnd=kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1 - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top - ALLOCATE(D(1:ndim,1:nbnd)) -C -C -------------------------------- -C Initialization of the D matrix : -C -------------------------------- -C This D matrix of size ndim*nbnd is the complete "projector matrix" -C which enables to go from the Wannier-like basis |u_orb> to the Bloch states |ik,ib>. - ind1=0 - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C If l=0, there only possible irep is the whole matrix itself. - IF (l==0) THEN - D(ind1+1,1:nbnd)=pr_crorb(icrorb,ik,is)% - & mat_rep(1,nbbot:nbtop) - ind1=ind1+1 - ELSE -C the projectors of the correlated ireps are considered if there are any. (ifsplit=.TRUE.) - IF(crorb(icrorb)%ifsplit) THEN -C the value of l can not be 0 here, because ifsplit is necessary .FALSE. -C for s-orbital (restriction in dmftproj.f) - m1=-l-1 - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - m2=m1+reptrans(l,isrt)%dreps(irep) - ind2=ind1+reptrans(l,isrt)%dreps(irep) -C Since there is no SO, prcrorb%matrep is of size 2*l+1, from -l to l -C (the basis which mix up/dn states are not possible here.) -C The states range from m1+1 to m2 in the irep. -C The corresponding projector is stored from the line (ind1+1) to the line ind2, in the D matrix. - D(ind1+1:ind2,1:nbnd)=pr_crorb(icrorb,ik,is)% - & mat_rep(m1+1:m2,nbbot:nbtop) - ind1=ind2 - ENDIF - m1=m1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C The projectors of the whole correlated representation is considered. (ifsplit=.FALSE.) - ind2=ind1+2*l+1 -C Since there is no SO, prcrorb%matrep is of size 2*l+1, from -l to l. -C (the basis which mix up/dn states are not possible here.) -C The corresponding projection matrix is stored from the line (ind1+1) to the line ind2, in the D matrix. - D(ind1+1:ind2,1:nbnd)=pr_crorb(icrorb,ik,is)% - & mat_rep(-l:l,nbbot:nbtop) - ind1=ind2 - ENDIF ! End of the ifsplit if-then-else - ENDIF ! End of the l=0 if-then-else - ENDDO ! End of the icrorb loop -C -C ---------------------------------------- -C Computation of the overlap matrix Dmat : -C ---------------------------------------- -C The overlap matrix is stored in Dmat = D*transpose(conjugate(D)) - CALL ZGEMM('N','C',ndim,ndim,nbnd,DCMPLX(1.D0,0.D0), - & D,ndim,D,ndim,DCMPLX(0.D0,0.D0),Dmat,ndim) -C -C ------------------------------------------- -C Computation of the matrix S = Dmat^{-1/2} : -C ------------------------------------------- - CALL orthogonal_h(Dmat,ndim,.TRUE.) -C This matrix is stored in Dmat. -C -C ----------------------------------------------- -C Computation of the orthonormalized projectors : -C ----------------------------------------------- -C The calculation performed is the following : P=O^(-1/2)*P_tilde. -C Its value is stored in the matrix D_orth (of size ndim*nbnd) - - ALLOCATE(D_orth(1:ndim,1:nbnd)) - CALL ZGEMM('N','N',ndim,nbnd,ndim,DCMPLX(1.D0,0.D0), - & Dmat,ndim,D,ndim,DCMPLX(0.D0,0.D0),D_orth,ndim) - DEALLOCATE(D) -C -C -------------------------------------------------------------------------------- -C Storing the value of the orthonormalized projectors in the pr_crorb structures : -C -------------------------------------------------------------------------------- - ind1=0 - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C If l=0, there only possible irep is the whole matrix itself. - IF (l==0) THEN - pr_crorb(icrorb,ik,is)%mat_rep - & (1,nbbot:nbtop)=D_orth(ind1+1,1:nbnd) - ind1=ind1+1 - ELSE -C the projectors of the correlated ireps are considered if there are any. (ifsplit=.TRUE.) - IF(crorb(icrorb)%ifsplit) THEN -C the value of l can not be 0 here, because ifsplit is necessary .FALSE. -C for s-orbital (restriction in dmftproj.f) - m1=-l-1 - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - m2=m1+reptrans(l,isrt)%dreps(irep) - ind2=ind1+reptrans(l,isrt)%dreps(irep) -C prcrorb%matrep is of size 2*l+1, from -l to l (the basis which mix up/dn states are not possible here.) -C In the D_orth matrix, the corresponding part of the projection matrix ranges from the line (ind1+1) to the line ind2. -C The projector associated to the ireps is stored in the prcrorb%matrep from m1+1 to m2. - pr_crorb(icrorb,ik,is)% - & mat_rep(m1+1:m2,nbbot:nbtop)= - & D_orth(ind1+1:ind2,1:nbnd) - ind1=ind2 - ENDIF - m1=m1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C The projectors of the whole correlated representation is considered. (ifsplit=.FALSE.) - ind2=ind1+2*l+1 -C Since there is no SO, prcrorb%matrep is of size 2*l+1, from -l to l. -C (the basis which mix up/dn states are not possible here.) -C In the D_orth matrix, the projection matrix ranges from the line (ind1+1) to the line ind2. -C The projector is stored in the pr_crorb%matrep (from -l to l). - pr_crorb(icrorb,ik,is)%mat_rep - & (-l:l,nbbot:nbtop)=D_orth(ind1+1:ind2,1:nbnd) - ind1=ind2 - ENDIF ! End of the ifsplit if-then-else - ENDIF ! End of the l=0 if-then-else - ENDDO ! End of the icrorb loop -C prcrorb%matrep contains now the orthonormalized projectors. - DEALLOCATE(D_orth) - ENDDO ! End of the loop on is - ENDDO ! End of the loop on ik - DEALLOCATE(Dmat) -C -C ============================================================================= -C Printing the projectors with k-points 1 and nk in the file fort.18 for test : -C ============================================================================= - DO icrorb=1,ncrorb - iatom=crorb(icrorb)%atom - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l - WRITE(18,'()') - WRITE(18,'(a)') 'apres othonormalizsation' - WRITE(18,'(a,i4)') 'icrorb = ', icrorb - WRITE(18,'(a,i4,a,i4)') 'isrt = ', isrt, ' l = ', l - IF (l==0) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,1,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,nk,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ELSEIF (reptrans(l,isrt)%ifmixing) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ELSE - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,1,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,nk,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ENDIF - ENDDO -C - RETURN - END - - - - SUBROUTINE orthogonal_wannier_SO -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine orthonormalizes the Wannier-like functions %% -C %% obtained with the projectors P(icrorb,ik,is), in order to %% -C %% get a set of "true" Wannier orbitals. %% -C %% %% -C %% Only the correlated orbitals are treated here. %% -C %% %% -C %% THIS VERSION MUST BE USED WITH SPIN-ORBIT %% -C %% (since the calculation for up/dn states is made simultaneously) %% -C %% THIS VERSION CAN NOT BE USED WITHOUT SPIN-POLARIZED INPUT FILES.%% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE almblm_data - USE common_data - USE prnt - USE projections - USE reps - IMPLICIT NONE - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: Dmat, D_orth, D - INTEGER :: is, ik, l, nbnd, ndim, isrt, nbbot, nbtop - INTEGER :: icrorb, ind1, ind2, iatom, ib - INTEGER :: m1, m2, irep -C - WRITE(buf,'(a)')'Orthonormalization of the projectors...' - CALL printout(0) - CALL printout(0) -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if there is no dn part of pr_crorb. -C ------------------------- -C - IF(.not.ifSP) THEN - WRITE(buf,'(a,a,i2,a)')'The projectors on ', - & 'the dn states are required for isrt = ',isrt, - & ' but there is no spin-polarized input files.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C --------------------------------------------------------------------------------------- -C -C ===================================== -C Creation of the overlap matrix Dmat : -C ===================================== -C -C ----------------------------------------------------------- -C Determination of the dimension ndim of the overlap matrix : -C ----------------------------------------------------------- - ndim=0 -C Loop on the correlated orbitals - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C Since this subroutine is used only in the case with SO, -C the only irep possible for s-orbital is the matrix itself. - ndim=ndim+2 -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C the projectors of the correlated ireps are considered if there are any. (ifsplit=.TRUE.) - IF(crorb(icrorb)%ifsplit) THEN - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ndim=ndim+reptrans(l,isrt)%dreps(irep) - ENDIF -C The dimension of the irep is added to ndim. - ENDDO - ELSE -C If no particular irep is considered (ifsplit=.FALSE.), -C The whole matrix of the representation is considered. - ndim=ndim+2*(2*l+1) - ENDIF -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE -C Since this subroutine is used only in the case with SO, -C the only irep possible for this orbital is the matrix itself. - ndim=ndim+2*(2*l+1) - ENDIF - ENDDO -C ------------------ -C Creation of Dmat : -C ------------------ - ALLOCATE(Dmat(1:ndim,1:ndim)) -C -C ===================================================================== -C Computation of the orthonormalized Wannier functions and projectors : -C ===================================================================== -C The computation is performed for each k_point independently -C because they are still good quantum numbers. - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE - nbnd=kp(ik,1)%nb_top-kp(ik,1)%nb_bot+1 - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top -C it was checked that nbtop(up)=nbtop(dn) and nbbot(up)=nbbot(dn) -C for a computation with SO [in set_projections.f] - ALLOCATE(D(1:ndim,1:nbnd)) -C -C -------------------------------- -C Initialization of the D matrix : -C -------------------------------- -C This D matrix of size ndim*nbnd is the complete "projector matrix" -C which enables to go from the Wannier-like basis |u_orb> to the Bloch states |ik,ib>. - ind1=0 - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C the only irep possible for s-orbital is the matrix itself. - DO is=1,ns -C D(ind1,1:nbnd)= -C Bug correction 8.11.2012 - D(ind1+1,1:nbnd)= - & pr_crorb(icrorb,ik,is)%mat_rep(1,nbbot:nbtop) - ind1=ind1+1 - ENDDO -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the projection matrix is stored in prcrorb%matrep with is=1. -C the projectors of the correlated ireps are considered if there are any. (ifsplit=.TRUE.) - IF (crorb(icrorb)%ifsplit) THEN - m1=0 - DO irep=1,reptrans(l,isrt)%nreps - IF (crorb(icrorb)%correp(irep)) THEN - m2=m1+reptrans(l,isrt)%dreps(irep) - ind2=ind1+reptrans(l,isrt)%dreps(irep) -C The states range from m1+1 to m2 in the irep. -C The corresponding projector is stored from the line (ind1+1) to the line ind2, in the D matrix. - D(ind1+1:ind2,1:nbnd)=pr_crorb(icrorb,ik,1)% - & mat_rep(m1+1:m2,nbbot:nbtop) - ind1=ind2 - ENDIF - m1=m1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C The projectors of the whole correlated representation is considered. (ifsplit=.FALSE.) - ind2=ind1+2*(2*l+1) -C The corresponding projection matrix is stored from the line (ind1+1) to the line ind2, in the D matrix. - D(ind1+1:ind2,1:nbnd)=pr_crorb(icrorb,ik,1)% - & mat_rep(1:2*(2*l+1),nbbot:nbtop) - ind1=ind2 - ENDIF ! End of the ifsplit if-then-else -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE -C the only irep possible for such an orbital is the matrix itself. - DO is=1,ns - ind2=ind1+2*l+1 - D(ind1+1:ind2,1:nbnd)= - & pr_crorb(icrorb,ik,is)%mat_rep(-l:l,nbbot:nbtop) - ind1=ind2 - ENDDO - ENDIF ! End of the ifmixing if-then-else - ENDDO ! End of the icrorb loop -C -C ---------------------------------------- -C Computation of the overlap matrix Dmat : -C ---------------------------------------- -C The overlap matrix is stored in Dmat = D*transpose(conjugate(D)) - CALL ZGEMM('N','C',ndim,ndim,nbnd,DCMPLX(1.D0,0.D0), - & D,ndim,D,ndim,DCMPLX(0.D0,0.D0),Dmat,ndim) -C -C ------------------------------------------- -C Computation of the matrix S = Dmat^{-1/2} : -C ------------------------------------------- - CALL orthogonal_h(Dmat,ndim,.TRUE.) -C This matrix is stored in Dmat. -C -C ----------------------------------------------- -C Computation of the orthonormalized projectors : -C ----------------------------------------------- -C The calculation performed is the following : P=O^(-1/2)*P_tilde. -C Its value is stored in the matrix D_orth (of size ndim*nbnd) - ALLOCATE(D_orth(1:ndim,1:nbnd)) - CALL ZGEMM('N','N',ndim,nbnd,ndim,DCMPLX(1.D0,0.D0), - & Dmat,ndim,D,ndim,DCMPLX(0.D0,0.D0),D_orth,ndim) - DEALLOCATE(D) -C -C -------------------------------------------------------------------------------- -C Storing the value of the orthonormalized projectors in the pr_crorb structures : -C -------------------------------------------------------------------------------- - ind1=0 - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C the only irep possible for s-orbital is the matrix itself. - DO is=1,ns - pr_crorb(icrorb,ik,is)%mat_rep(1,nbbot:nbtop)= - & D_orth(ind1+1,1:nbnd) - ind1=ind1+1 - ENDDO -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C the projectors of the correlated ireps are considered if there are any. (ifsplit=.TRUE.) - IF(crorb(icrorb)%ifsplit) THEN - m1=0 - DO irep=1,reptrans(l,isrt)%nreps - IF (crorb(icrorb)%correp(irep)) THEN - m2=m1+reptrans(l,isrt)%dreps(irep) - ind2=ind1+reptrans(l,isrt)%dreps(irep) -C In the D_orth matrix, the corresponding part of the projection matrix ranges from the line (ind1+1) to the line ind2. -C The projector associated to the ireps is stored in the prcrorb%matrep from m1+1 to m2. - pr_crorb(icrorb,ik,1)%mat_rep(m1+1:m2,nbbot:nbtop) - & =D_orth(ind1+1:ind2,1:nbnd) - ind1=ind2 - ENDIF - m1=m1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C The projectors of the whole correlated representation is considered. (ifsplit=.FALSE.) - ind2=ind1+2*(2*l+1) -C The corresponding projection matrix is stored from the line (ind1+1) to the line ind2, in the D matrix. - pr_crorb(icrorb,ik,1)%mat_rep(1:2*(2*l+1),nbbot:nbtop) - & =D_orth(ind1+1:ind2,1:nbnd) - ind1=ind2 - ENDIF ! End of the ifsplit if-then-else -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE -C the only irep possible for this orbital is the matrix itself. - DO is=1,ns - ind2=ind1+2*l+1 - pr_crorb(icrorb,ik,is)%mat_rep(-l:l,nbbot:nbtop) - & =D_orth(ind1+1:ind2,1:nbnd) - ind1=ind2 - ENDDO - ENDIF ! End of the ifmixing if-then-else - ENDDO ! End of the icrorb loop - DEALLOCATE(D_orth) - ENDDO ! End of the loop on ik - DEALLOCATE(Dmat) -C -C ============================================================================= -C Printing the projectors with k-points 1 and nk in the file fort.18 for test : -C ============================================================================= - DO icrorb=1,ncrorb - iatom=crorb(icrorb)%atom - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l - WRITE(18,'()') - WRITE(18,'(a)') 'apres othonormalizsation' - WRITE(18,'(a,i4)') 'icrorb = ', icrorb - WRITE(18,'(a,i4,a,i4)') 'isrt = ', isrt, ' l = ', l - IF (l==0) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,1,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,nk,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ELSEIF (reptrans(l,isrt)%ifmixing) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ELSE - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,1,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,nk,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ENDIF - ENDDO -C - RETURN - END - - diff --git a/fortran/dmftproj/outband.f b/fortran/dmftproj/outband.f deleted file mode 100644 index 625992e..0000000 --- a/fortran/dmftproj/outband.f +++ /dev/null @@ -1,287 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE outband -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine creates the output file case.outband, with all %% -C %% the informations necessary for the computation of the spectral %% -C %% function of the system. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ----------------------------- - USE almblm_data - USE bands - USE common_data - USE file_names - USE prnt - USE projections - USE reps - IMPLICIT NONE -C - INTEGER :: iorb, icrorb, irep, isrt - INTEGER :: l, m, is, i1, i2, i - INTEGER :: ik, il, ib, ir, n - INTEGER :: ind1, ind2, iatom -C - WRITE(buf,'(a)')'Writing the file case.outband...' - CALL printout(0) -C -C ====================================== -C Informations about the chosen k-path : -C ====================================== -C -C Number of k-points along the chosen k-path - WRITE(ouband,'(i6)') nkband -C Description of the number of bands in the energy window at each k_point -C - DO is=1,ns -C If SO is considered, the number of up and dn bands are the same. - IF ((ifSP.AND.ifSO).and.(is.eq.2)) cycle - DO ik=1,nk - WRITE(ouband,'(i6)') - & ABS(kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1) - ENDDO ! End of the ik loop - ENDDO ! End of the is loop -C for each k-point, the number of band included in the energy window is written. -C =========================================================== -C Description of the projectors for the correlated orbitals : -C =========================================================== - DO ik=1,nk - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - isrt=crorb(icrorb)%sort -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. - DO is=1,ns - WRITE(ouband,*) - & REAL(pr_crorb(icrorb,ik,is)%mat_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - DO is=1,ns - WRITE(ouband,*) - & AIMAG(pr_crorb(icrorb,ik,is)%mat_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the SO is necessary considered, spinor rotation matrices are used. - IF(crorb(icrorb)%ifsplit) THEN -C If only 1 irep is correlated - ind1=1 - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ouband,*) - & REAL(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - DO m=ind1,ind2 - WRITE(ouband,*) - & AIMAG(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=1,2*(2*l+1) - WRITE(ouband,*) - & REAL(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouband,*) - & AIMAG(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - ENDIF -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF ((.not.(ifSP.AND.ifSO)).AND.crorb(icrorb)%ifsplit) THEN -C If only 1 irep is correlated (case without SO) - ind1=-l - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO is=1,ns - DO m=ind1,ind2 - WRITE(ouband,*) - & REAL(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - DO is=1,ns - DO m=ind1,ind2 - WRITE(ouband,*) - & AIMAG(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated (case with and without SO) - DO is=1,ns - DO m=-l,l - WRITE(ouband,*) - & REAL(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - DO is=1,ns - DO m=-l,l - WRITE(ouband,*) - & AIMAG(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - END IF ! End of the ifsplit if-then-else - END IF ! End of the ifmixing if-then-else - END DO ! End of the icrorb loop - END DO ! End of the ik loop -C for each k-point and each correlated orbital, the corresponding projector is described by : -C - the real part of the "correlated" submatrix -C - the imaginary part of the "correlated" submatrix -C -C ====================================================== -C Description of the Hamiltonian H(k) at each k_point : -C ====================================================== - DO is=1,ns - DO ik=1,nk -C If SO is considered, the numbers of up and dn bands are the same. - IF (ifSO.and.is.eq.2) cycle - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - WRITE(ouband,*) kp(ik,is)%eband(ib) - ENDDO - ENDDO ! End of the ik loop - ENDDO ! End of the is loop -C for each spin value is and each k-point, -C - the energies of the band with spin is at point k -C -C ================================================================ -C Description of the size of the basis for each included orbital : -C ================================================================ - DO iorb=1,norb - WRITE(ouband,'(3(i6))') norm_radf(iorb)%n - ENDDO -C There is not more than 1 LO for each orbital (hence n < 4 ) -C -C ==================================== -C Description of the Theta projector : -C ==================================== - DO iorb=1,norb - l=orb(iorb)%l - isrt=orb(iorb)%sort -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN - DO ik=1,nk - DO ir=1,norm_radf(iorb)%n - DO is=1,ns - WRITE(ouband,*) - & REAL(pr_orb(iorb,ik,is)%matn_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - DO is=1,ns - WRITE(ouband,*) - & AIMAG(pr_orb(iorb,ik,is)%matn_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - ENDDO ! End of the ir loop - ENDDO ! End of the ik loop -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO, spinor rotation matrices are used. - DO ik=1,nk - DO ir=1,norm_radf(iorb)%n - DO m=1,2*(2*l+1) - WRITE(ouband,*) - & REAL(pr_orb(iorb,ik,1)%matn_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top,ir)) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouband,*) - & AIMAG(pr_orb(iorb,ik,1)%matn_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top,ir)) - ENDDO - ENDDO ! End of the ir loop - ENDDO ! End of the ik loop -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - DO ik=1,nk - DO ir=1,norm_radf(iorb)%n - DO is=1,ns - DO m=-l,l - WRITE(ouband,*) - & REAL(pr_orb(iorb,ik,is)%matn_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - ENDDO ! End of the is loop - DO is=1,ns - DO m=-l,l - WRITE(ouband,*) - & AIMAG(pr_orb(iorb,ik,is)%matn_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - ENDDO ! End of the is loop - ENDDO ! End of the ir loop - ENDDO ! End of the ik loop - ENDIF ! End of the ifmixing if-then-else - ENDDO ! End of the iorb loop -C for each included orbital, for each k-point and each |phi_j> elmt, -C the corresponding Thetaprojector is described by : -C - the real part of the matrix -C - the imaginary part of the matrix -C -C ============================= -C Description of the k-labels : -C ============================= - DO i=1,nlab - WRITE(ouband,'(2i6,a)') i,labels(i)%pos,labels(i)%kname - ENDDO -C for each label, are written : -C - the number of the corresponding k-point in the k-path -C - the name associated to this label -C - RETURN - END - - - diff --git a/fortran/dmftproj/outbwin.f b/fortran/dmftproj/outbwin.f deleted file mode 100644 index 25d1f03..0000000 --- a/fortran/dmftproj/outbwin.f +++ /dev/null @@ -1,92 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE outbwin -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine creates the output file case.oubwin %% -C %% which contains all the informations for the charge density %% -C %% self-consistency. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ---------------------------- - USE almblm_data - USE common_data - USE file_names - USE prnt - IMPLICIT NONE - INTEGER :: is, ik, ou -C - WRITE(buf,'(a)')'Writing the file case.outbwin...' - CALL printout(0) -C - DO is=1,ns -C ==================================== -C Definition of the file case.oubwin : -C ==================================== -C If the computations is spin-polarized, the output file is divided -C in two files : case.oubwinup and case.oubwindn - IF(ifSP.AND.is==1) THEN - ou=oubwinup - ELSEIF(ifSP.AND.is==2) THEN - ou=oubwindn - ELSE - ou=oubwin - ENDIF -C ======================================= -C General informations about the system : -C ======================================= -C -C Number of k-points in the I-BZ - WRITE(ou,'(i6)') nk -C Definition of the Spin-orbit flag ifSO - IF(ifSO) THEN - WRITE(ou,'(i6)') 1 - ELSE - WRITE(ou,'(i6)') 0 - ENDIF -C ==================================================== -C Description of the main properties of each k-point : -C ==================================================== - DO ik=1,nk -C Description of the if-included flag - IF(kp(ik,is)%included) THEN - WRITE(ou,'(i6)') 1 - ELSE - WRITE(ou,'(i6)') 0 - ENDIF - IF(kp(ik,is)%included) THEN -C Range of bands included at each k-point - WRITE(ou,'(2(i6))') kp(ik,is)%nb_bot,kp(ik,is)%nb_top -C Weight associated to each k-point (for the simple point integration) - WRITE(ou,*) kp(ik,is)%weight - ENDIF - ENDDO ! End of the ik loop - ENDDO ! End of the is loop -C - RETURN - END - - - diff --git a/fortran/dmftproj/outputqmc.f b/fortran/dmftproj/outputqmc.f deleted file mode 100644 index f0df75d..0000000 --- a/fortran/dmftproj/outputqmc.f +++ /dev/null @@ -1,1405 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE outqmc(elecn,qbbot) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine creates the output files : %% -C %% - case.ctqmcout, with all the informations necessary for a %% -C %% CTQMC computation. %% -C %% - case.symqmc, describing all the symmetries of the system %% -c %% (necessary for CTQMC computation too). %% -C %% - case.parproj which gives the partial charge projectors for %% -C %% orbitals and for all atoms. %% -C %% - case.sympar which contains the symmetry matrices for all %% -C %% the included orbitals (for partial charge analysis) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ----------------------------- - USE almblm_data - USE common_data - USE file_names - USE prnt - USE reps - USE symm - USE projections - IMPLICIT NONE -C - INTEGER :: iorb, icrorb, irep, isrt - INTEGER :: l, m, is, i1, i2, isym - INTEGER :: ik, il, ib, ir, n - INTEGER :: ind1, ind2, iatom - INTEGER :: timeinvflag - REAL(KIND=8) :: qbbot, elecn, factor - COMPLEX(KIND=8) :: ephase - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: hk - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: spinrot - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: densprint - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: time_op -C -C -C ======================================= -C Writing the file case.ctqmcout : -C ======================================= -C - WRITE(buf,'(a)')'Writing the file case.ctqmcout...' - CALL printout(0) -C -C Definition of 1 electron-Volt - WRITE(ouctqmc,'(a)') '13.605698' -C -C --------------------------------------- -C General informations about the system : -C --------------------------------------- -C -C Number of k-points in the I-BZ - WRITE(ouctqmc,'(i6)') nk -C Definition of the spin-polarized flag ifSP - IF (ifSP) THEN - WRITE(ouctqmc,'(i6)') 1 - ELSE - WRITE(ouctqmc,'(i6)') 0 - ENDIF -C Definition of the Spin-orbit flag ifSO - IF (ifSO) THEN - WRITE(ouctqmc,'(i6)') 1 - ELSE - WRITE(ouctqmc,'(i6)') 0 - ENDIF -C The only possible combinations are : -C - (0,0) which stands for a paramagnetic computation without SO. -C - (1,0) which stands for computation without SO using spin-polarized input files. -C - (1,1) which stands for computation with SO using spin-polarized input files. -C -C Writing the total charge below the lower limit of the energy window (variable "qbbot") - WRITE(ouctqmc,*) qbbot -C Writing the total number of electrons (valence band+semicore) (variable "elecn"). -C It is also the charge upto the Fermi level. - WRITE(ouctqmc,*) elecn -C -C ------------------------------------------ -C Description of all the included orbitals : -C ------------------------------------------ -C -C Definition of the number of included orbitals "norb" - WRITE(ouctqmc,'(i6)') norb -C Description of each orbital "iorb" - DO iorb=1,norb - IF (ifSO) THEN - WRITE(ouctqmc,'(4(i6,x))') orb(iorb)%atom, orb(iorb)%sort, - & orb(iorb)%l, 2*(2*orb(iorb)%l+1) - ELSE - WRITE(ouctqmc,'(4(i6,x))') orb(iorb)%atom, orb(iorb)%sort, - & orb(iorb)%l, 2*orb(iorb)%l+1 - ENDIF - ENDDO -C an orbital "iorb" is described by : -C - the associated atom -C - the corresponding atomic sort -C - the considered orbital number l -C - the size of the corresponding matrices : 2*l+1 without SO ; 2*(2*l+1) with SO -C -C ---------------------------------------- -C Description of the correlated orbitals : -C ---------------------------------------- -C -C Definition of the number of correlated orbitals "ncrorb" - WRITE(ouctqmc,'(i6)') ncrorb -C Description of each correlated orbital "icrorb" - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - isrt=crorb(icrorb)%sort -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrix is considered. -C The spin is not a good quantum number, so the whole representation is used. - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, isrt, 0, - & 2, crorb(icrorb)%ifSOat, 1 - ELSE -C Without SO, only the rotation matrix in orbital space is necessary. - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, isrt, 0, - & 1, crorb(icrorb)%ifSOat, 1 - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF(reptrans(l,isrt)%ifmixing) THEN -C In this case, the SO is necessary considered, spinor rotation matrices are used. - IF (crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - DO irep=1,reptrans(l,isrt)%nreps - IF (crorb(icrorb)%correp(irep)) THEN - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, - & isrt, l, reptrans(l,isrt)%dreps(irep), - & crorb(icrorb)%ifSOat, irep - ENDIF - ENDDO - ELSE -C If no particular irep is correlated - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, isrt, l, - & 2*(2*l+1), crorb(icrorb)%ifSOat, 1 - ENDIF -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrices are considered. -C The spin is not a good quantum number, so the whole representation is used. - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, isrt, l, - & 2*(2*l+1), crorb(icrorb)%ifSOat, 1 - ELSE -C Without SO, only the rotation matrix in orbital space is necessary. - IF (crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - DO irep=1,reptrans(l,isrt)%nreps - IF (crorb(icrorb)%correp(irep)) THEN - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, - & isrt, l, reptrans(l,isrt)%dreps(irep), - & crorb(icrorb)%ifSOat, irep - ENDIF - ENDDO - ELSE -C If no particular irep is correlated - WRITE(ouctqmc,'(6(i6,x))') crorb(icrorb)%atom, isrt, l, - & (2*l+1), crorb(icrorb)%ifSOat, 1 - END IF ! End of the ifsplit if-then-else - END IF ! End of the ifSO if-then-else - END IF ! End of the ifmixing if-then-else - END DO ! End of the icrorb loop -C an orbital "iorb" is described by : -C - the associated atom -C - the corresponding atomic sort -C - the considered orbital number l -C - the size of the "correlated" submatrix (can be the whole matrix) -C - the flag ifSOat which states that SO is considered for this orbital -C - the number of the irep -C -C ------------------------------------------------------------------------------------------------ -C Description of the global to local coordinates transformation Rloc for each correlated orbital : -C ------------------------------------------------------------------------------------------------ -C Description of each transformation Rloc - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - isrt=crorb(icrorb)%sort - iatom=crorb(icrorb)%atom -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF(l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrix must be considered. - ALLOCATE(spinrot(1:2,1:2)) - spinrot(:,:)=0.d0 -C The spinor-rotation matrix is directly calculated from the Euler angles a,b and c. - IF (rotloc(iatom)%timeinv) THEN - factor=(rotloc(iatom)%a+rotloc(iatom)%g)/2.d0 - spinrot(2,1)=EXP(CMPLX(0.d0,factor))* - & DCOS(rotloc(iatom)%b/2.d0) - spinrot(1,2)=-CONJG(spinrot(2,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatom)%a-rotloc(iatom)%g)/2.d0 - spinrot(2,2)=-EXP(CMPLX(0.d0,factor))* - & DSIN(rotloc(iatom)%b/2.d0) - spinrot(1,1)=CONJG(spinrot(2,2)) - ELSE - factor=(rotloc(iatom)%a+rotloc(iatom)%g)/2.d0 - spinrot(1,1)=EXP(CMPLX(0.d0,factor))* - & DCOS(rotloc(iatom)%b/2.d0) - spinrot(2,2)=CONJG(spinrot(1,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatom)%a-rotloc(iatom)%g)/2.d0 - spinrot(1,2)=EXP(CMPLX(0.d0,factor))* - & DSIN(rotloc(iatom)%b/2.d0) - spinrot(2,1)=-CONJG(spinrot(1,2)) - ENDIF -C Printing the transformation informations - DO m=1,2 - WRITE(ouctqmc,*) REAL(spinrot(m,1:2)) - ENDDO - DO m=1,2 - WRITE(ouctqmc,*) AIMAG(spinrot(m,1:2)) - ENDDO - DEALLOCATE(spinrot) -C Without SO, only the rotation matrix in orbital space is necessary. - ELSE -C In this case, the Rloc matrix is merely identity. - WRITE(ouctqmc,*) 1.d0 - WRITE(ouctqmc,*) 0.d0 - ENDIF -C Printing the time inversion flag if the calculation is spin-polarized (ifSP=1) - IF (ifSP) THEN - timeinvflag=0 - IF (rotloc(iatom)%timeinv) timeinvflag=1 - WRITE(ouctqmc,'(i6)') timeinvflag - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO, spinor rotation matrices are used. - IF(crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - ind1=1 - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ouctqmc,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,ind1:ind2)) - ENDDO - DO m=ind1,ind2 - WRITE(ouctqmc,*)AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,ind1:ind2)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - ENDIF -C Printing if the transformation included a time-reversal operation. - timeinvflag =0 - IF (rotloc(iatom)%timeinv) timeinvflag=1 - WRITE(ouctqmc,'(i6)') timeinvflag -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrices are considered. -C The spin is not a good quantum number, so the whole representation is used. - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - ELSE -C The calculation is either spin-polarized without SO or paramagnetic. -C The spin is a good quantum number and irep are possible. - IF(crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - ind1=-l - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ouctqmc,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,ind1:ind2)) - ENDDO - DO m=ind1,ind2 - WRITE(ouctqmc,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,ind1:ind2)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=-l,l - WRITE(ouctqmc,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,-l:l)) - ENDDO - DO m=-l,l - WRITE(ouctqmc,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,-l:l)) - ENDDO - END IF ! End of the ifsplit if-then-else - END IF ! End of the ifSO if-then-else -C Printing if the transformation included a time-reversal operation. - IF (ifSP) THEN - timeinvflag =0 - IF (rotloc(iatom)%timeinv) timeinvflag=1 - WRITE(ouctqmc,'(i6)') timeinvflag - END IF - END IF ! End of the ifmixing if-then-else - END DO ! End of the icrorb loop -C for each correlated orbital icrorb, the transformation Rloc is described by : -C - the real part of the submatrix associated to "icrorb" -C - the imaginary part of the submatrix associated to "icrorb" -C - a flag which states if a time reversal operation is included in the transformation (if SP only ) -C -C ------------------------------------------------------------------------------------------------------------- -C Description of the transformation from complex harmonics to the basis associated to each correlated orbital : -C ------------------------------------------------------------------------------------------------------------- -C - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - isrt=crorb(icrorb)%sort -C The transformation is printed only for the first (representative) atom of each sort. - IF (crorb(icrorb)%first) THEN -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s-orbitals, the only basis considered is the complex basis. - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, orbital+spin space is considered. - ALLOCATE(spinrot(1:2,1:2)) - spinrot(:,:)=0.d0 - spinrot(1,1)=1.d0 - spinrot(2,2)=1.d0 -C Printing the number of irep in the considered basis and the size of each irep -C in the considered basis (in this case, it's 1 and 2.) - WRITE(ouctqmc,*) 1, 2 -C Printing the transformation matrix - DO m=1,2 - WRITE(ouctqmc,*) REAL(spinrot(m,1:2)) - ENDDO - DO m=1,2 - WRITE(ouctqmc,*) AIMAG(spinrot(m,1:2)) - ENDDO -C - DEALLOCATE(spinrot) - ELSE -C Without SO, only the matrix in orbital space is necessary. -C Printing the number of irep in the considered basis and the size of each irep -C in the considered basis (in this case, it's 1 and 1.) - WRITE(ouctqmc,'(2(i6,x))') 1, 1 -C Printing the transformation matrix - WRITE(ouctqmc,*) 1.d0 - WRITE(ouctqmc,*) 0.d0 - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the SO is necessary considered, spinor rotation matrices are used. - IF (crorb(icrorb)%ifsplit) THEN - WRITE(ouctqmc,'(15(i6,x))') reptrans(l,isrt)%nreps, - & reptrans(l,isrt)%dreps(1:reptrans(l,isrt)%nreps) - ELSE - WRITE(ouctqmc,'(2(i6,x))') 1, 2*(2*l+1) - ENDIF - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) REAL(reptrans(l,isrt)% - & transmat(m,1:2*(2*l+1)) ) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) AIMAG(reptrans(l,isrt)% - & transmat(m,1:2*(2*l+1)) ) - ENDDO -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, orbital+spin space is considered. - ALLOCATE(spinrot(1:2*(2*l+1),1:2*(2*l+1))) - spinrot(:,:)=0.d0 - spinrot(1:2*l+1,1:2*l+1)= - & reptrans(l,isrt)%transmat(-l:l,-l:l) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - & reptrans(l,isrt)%transmat(-l:l,-l:l) -C Printing the number of irep in the considered basis and the size of each irep -C in the considered basis (in this case, it's 1 and 2*(2*l+1).) - WRITE(ouctqmc,*) 1, 2*(2*l+1) -C Printing the transformation matrix - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) REAL(spinrot(m,1:2*(2*l+1)) ) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) AIMAG(spinrot(m,1:2*(2*l+1)) ) - ENDDO -C - DEALLOCATE(spinrot) -C Without SO, only the rotation matrix in orbital space is necessary. - ELSE - IF (crorb(icrorb)%ifsplit) THEN - WRITE(ouctqmc,'(8(i6,x))') reptrans(l,isrt)%nreps, - & reptrans(l,isrt)%dreps(1:reptrans(l,isrt)%nreps) - ELSE - WRITE(ouctqmc,'(2(i6,x))') 1, 2*l+1 - ENDIF - DO m=-l,l - WRITE(ouctqmc,*) REAL(reptrans(l,isrt)% - & transmat(m,-l:l) ) - ENDDO - DO m=-l,l - WRITE(ouctqmc,*) AIMAG(reptrans(l,isrt)% - & transmat(m,-l:l) ) - END DO - END IF ! End of the ifSO if-then-else - END IF ! End of the ifmixing if-then-else - END IF ! End of the iffirst if-then-else - END DO ! End of the icrorb loop -C for each correlated orbital icrorb, the basis transformation is described by : -C - the number of irep in the new basis -C - the dimension of each irep in the new basis -C - the real part of the basis transformation -C - the imaginary part of the basis transformation -C -C ------------------------------------------------------------------------- -C Description of the number of bands in the energy window at each k_point : -C ------------------------------------------------------------------------- -C - DO is=1,ns -C If SO is considered, the number of up and dn bands are the same. - IF ((ifSP.AND.ifSO).and.(is.eq.2)) cycle -C Printing the number of included bands in the window for each k_point - DO ik=1,nk - WRITE(ouctqmc,'(i6)') - & ABS(kp(ik,is)%nb_top-kp(ik,is)%nb_bot+1) - ENDDO - ENDDO -C -C ----------------------------------------------------------- -C Description of the projectors for the correlated orbitals : -C ----------------------------------------------------------- - DO ik=1,nk - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - isrt=crorb(icrorb)%sort -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. -C if the calculation is spin-polarized, up and dn projectors are written the one above the other (orbital+spin-space of size 2) - DO is=1,ns - WRITE(ouctqmc,*) - & REAL(pr_crorb(icrorb,ik,is)%mat_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - DO is=1,ns - WRITE(ouctqmc,*) - & AIMAG(pr_crorb(icrorb,ik,is)%mat_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO, spinor rotation matrices are used. - IF(crorb(icrorb)%ifsplit) THEN -C If only 1 irep is correlated - ind1=1 - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ouctqmc,*) - & REAL(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - DO m=ind1,ind2 - WRITE(ouctqmc,*) - & AIMAG(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) - & REAL(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ouctqmc,*) - & AIMAG(pr_crorb(icrorb,ik,1)%mat_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top)) - ENDDO - ENDIF -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF ((.not.(ifSP.AND.ifSO)).AND.crorb(icrorb)%ifsplit) THEN -C If only 1 irep is correlated (case without SO) - ind1=-l - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO is=1,ns - DO m=ind1,ind2 - WRITE(ouctqmc,*) - & REAL(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - DO is=1,ns - DO m=ind1,ind2 - WRITE(ouctqmc,*) - & AIMAG(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated (case with and without SO) - DO is=1,ns - DO m=-l,l - WRITE(ouctqmc,*) - & REAL(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - DO is=1,ns - DO m=-l,l - WRITE(ouctqmc,*) - & AIMAG(pr_crorb(icrorb,ik,is)%mat_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) - ENDDO - ENDDO - END IF ! End of the ifsplit if-then-else - END IF ! End of the ifmixing if-then-else - END DO ! End of the icrorb loop - END DO ! End of the ik loop -C for each k-point and each correlated orbital, the corresponding projector is described by : -C - the real part of the "correlated" submatrix -C - the imaginary part of the "correlated" submatrix -C -C ---------------------------------------------------------------------------- -C Description of the weight of each k_point for the simple point integration : -C ---------------------------------------------------------------------------- - DO ik=1,nk - WRITE(ouctqmc,*) kp(ik,1)%weight -C This is a geometrical factor independent of the spin value. - ENDDO -C -C ----------------------------------------------------- -C Description of the Hamiltonian H(k) at each k_point : -C ----------------------------------------------------- - DO is=1,ns - DO ik=1,nk -C If the calculation is spin-polarized with SO, the numbers for up and dn bands are the same. - IF ((ifSP.AND.ifSO).AND.(is.eq.2)) cycle - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - WRITE(ouctqmc,*) kp(ik,is)%eband(ib) - ENDDO - ENDDO - ENDDO -C for each spin value is and each k-point, -C - the energies of the band with spin is at point k -C -C -C ====================================== -C Writing the file case.symqmc : -C ====================================== -C - WRITE(buf,'(a)')'Writing the file case.symqmc...' - CALL printout(0) -C -C ---------------------------------------------------------- -C Description of the general informations about the system : -C ---------------------------------------------------------- - WRITE(ousymqmc,'(2(i6,x))') nsym, natom -C nysm is the total number of symmetries in the system -C natom is the total number of atom in the unit cell -C -C ------------------------------------------------------------------- -C Description of the permutation matrix associated to each symmetry : -C ------------------------------------------------------------------- - DO isym=1,nsym - WRITE(ousymqmc,'(100(i6,x))') srot(isym)%perm(1:natom) - ENDDO -C -C ------------------------------------------------------------ -C Description of the time-reversal property for each symmetry : -C ------------------------------------------------------------ - IF (ifSP) THEN - ALLOCATE(timeflag(nsym)) - timeflag=0 - DO isym=1,nsym - IF (srot(isym)%timeinv) timeflag(isym)= 1 - ENDDO - WRITE(ousymqmc,'(100(i6,x))') timeflag(1:nsym) - DEALLOCATE(timeflag) -C When the calculation is spin-polarized (with SO), a flag which states -C if a time reversal operation is included in the transformation isym is written. - ENDIF -C -C ----------------------------------------------------------------------------------------- -C Description of the representation matrices of each symmetry for each correlated orbital : -C ----------------------------------------------------------------------------------------- - DO isym=1,nsym - DO icrorb=1,ncrorb - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF(l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrix is considered. - ALLOCATE(spinrot(1:2,1:2)) - spinrot(:,:)=0.d0 - IF (srot(isym)%timeinv) THEN -C In this case, the Euler angle Beta is Pi. The spinor rotation matrix is block-diagonal, -C since the time-reversal operator is included in the definition of the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (g-a) if beta=Pi. -C Up/up and Dn/dn terms - spinrot(1,1)=EXP(CMPLX(0.d0,factor)) - spinrot(2,2)=CONJG(spinrot(1,1)) -C spinrot(1,1) = -exp(+i(alpha-gamma)/2) ; spinrot(2,2) = -exp(-i(alpha-gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. - ELSE -C In this case, the Euler angle Beta is 0. The spinor rotation matrix is block-diagonal, -C No time-reversal treatment was applied to the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (a+g) if beta=0. -C Up/up and Dn/dn terms - spinrot(1,1)=EXP(CMPLX(0.d0,factor)) - spinrot(2,2)=CONJG(spinrot(1,1)) -C the field phase is 2pi-(alpha+gamma) in this case. -C spinrot(1,1) = -exp(-i(alpha+gamma)/2) ; spinrot(2,2) = -exp(i(alpha-gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. - END IF -C Printing the transformation informations - DO m=1,2 - WRITE(ousymqmc,*) REAL(spinrot(m,1:2)) - ENDDO - DO m=1,2 - WRITE(ousymqmc,*) AIMAG(spinrot(m,1:2)) - ENDDO -C - DEALLOCATE(spinrot) -C Without SO, only the rotation matrix in orbital space is necessary. - ELSE -C In this case, the Rloc matrix is merely identity. - WRITE(ousymqmc,*) 1.d0 - WRITE(ousymqmc,*) 0.d0 - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the SO is necessary considered, spinor rotation matrices are used. - IF(crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - ind1=1 - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ousymqmc,*) REAL(srot(isym)% - & rotrep(l,isrt)%mat(m,ind1:ind2)) - ENDDO - DO m=ind1,ind2 - WRITE(ousymqmc,*)AIMAG(srot(isym)% - & rotrep(l,isrt)%mat(m,ind1:ind2)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=1,2*(2*l+1) - WRITE(ousymqmc,*) REAL(srot(isym)% - & rotrep(l,isrt)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ousymqmc,*) AIMAG(srot(isym)% - & rotrep(l,isrt)%mat(m,1:2*(2*l+1))) - ENDDO - ENDIF -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF (ifSP.AND.ifSO) THEN -C If the calculation is spin-polarized with SO, spinor rotation matrices are considered. -C The spin is not a good quantum number, so the whole representation is used. - ALLOCATE(spinrot(1:2*(2*l+1),1:2*(2*l+1))) - spinrot(:,:)=0.d0 - IF (srot(isym)%timeinv) THEN -C In this case, the Euler angle Beta is Pi. The spinor rotation matrix is block-diagonal, -C since the time-reversal operator is included in the definition of the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (g-a) in this case. -C Up/up block : - ephase=EXP(CMPLX(0.d0,factor)) -C As a result, ephase = -exp(i(alpha-gamma)/2) - spinrot(1:2*l+1,1:2*l+1)= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) -C Dn/dn block : - ephase=CONJG(ephase) -C Now, ephase = -exp(-i(alpha-gamma)/2) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) - ELSE -C In this case, the Euler angle Beta is 0. The spinor rotation matrix is block-diagonal, -C No time-reversal treatment was applied to the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (a+g) in this case. -C Up/up block : - ephase=EXP(CMPLX(0.d0,factor)) -C As a result, ephase = -exp(-i(alpha+gamma)/2) - spinrot(1:2*l+1,1:2*l+1)= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) -C Dn/dn block : - ephase=CONJG(ephase) -C Now, ephase = -exp(i(alpha+gamma)/2) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) - END IF -C Printing the transformation informations - DO m=1,2*(2*l+1) - WRITE(ousymqmc,*) REAL(spinrot(m,1:2*(2*l+1)) ) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ousymqmc,*) AIMAG(spinrot(m,1:2*(2*l+1)) ) - ENDDO -C - DEALLOCATE(spinrot) -C In the other cases (spin-polarized without SO or paramagnetic), only the rotation matrix in orbital space is necessary. - ELSE - IF(crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - ind1=-l - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ousymqmc,*) REAL(srot(isym)% - & rotrep(l,isrt)%mat(m,ind1:ind2)) - ENDDO - DO m=ind1,ind2 - WRITE(ousymqmc,*) AIMAG(srot(isym)% - & rotrep(l,isrt)%mat(m,ind1:ind2)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=-l,l - WRITE(ousymqmc,*) REAL(srot(isym)% - & rotrep(l,isrt)%mat(m,-l:l)) - ENDDO - DO m=-l,l - WRITE(ousymqmc,*) AIMAG(srot(isym)% - & rotrep(l,isrt)%mat(m,-l:l)) - ENDDO - END IF ! End of the ifsplit if-then-else - END IF ! End of the ifSO if-then-else - END IF ! End of the ifmixing if-then-else - END DO ! End of the icrorb loop - END DO ! End of the isym loop -C for each symmetry and each correlated orbital icrorb, is described : -C - the real part of the submatrix associated to "isym" for the "icrorb" -C - the imaginary part of the submatrix associated to "isym" for the "icrorb" -C -C ----------------------------------------------------------------------- -C Description of the time reversal operator for each correlated orbital : -C ----------------------------------------------------------------------- -C This description occurs only if the computation is paramagnetic. (ifSP=0) - IF (.not.ifSP) THEN - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - isrt=crorb(icrorb)%sort -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s-orbitals, the only basis considered is the complex basis. - WRITE(ousymqmc,*) 1.d0 - WRITE(ousymqmc,*) 0.d0 -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE -C Calculation of the time-reversal operator - ALLOCATE(time_op(-l:l,-l:l)) - time_op(:,:)=0.d0 - DO m=-l,l - time_op(m,m)=1.d0 - ENDDO -C time_op is Identity. - CALL timeinv_op(time_op,(2*l+1),l,isrt) -C time_op is now the time-reversal operator in the desired basis ({new_i}) -C - IF(crorb(icrorb)%ifsplit) THEN -C If only an irep is correlated - ind1=-l - DO irep=1,reptrans(l,isrt)%nreps - IF(crorb(icrorb)%correp(irep)) THEN - ind2=ind1+reptrans(l,isrt)%dreps(irep)-1 - DO m=ind1,ind2 - WRITE(ousymqmc,*) REAL(time_op(m,ind1:ind2)) - ENDDO - DO m=ind1,ind2 - WRITE(ousymqmc,*) AIMAG(time_op(m,ind1:ind2)) - ENDDO - ENDIF - ind1=ind1+reptrans(l,isrt)%dreps(irep) - ENDDO - ELSE -C If no particular irep is correlated - DO m=-l,l - WRITE(ousymqmc,*) REAL(time_op(m,-l:l)) - ENDDO - DO m=-l,l - WRITE(ousymqmc,*) AIMAG(time_op(m,-l:l)) - ENDDO - END IF ! End of the ifsplit if-then-else - DEALLOCATE(time_op) - END IF ! End of the l if-then-else - END DO ! End of the icrorb loop - END IF ! End of the ifsp if-then-else -C for each correlated orbital icrorb, the time-reversal operator is described by : -C - its real part -C - its imaginary part -C -C -C =============================== -C Writing the file case.parproj : -C =============================== -C - WRITE(buf,'(a)')'Writing the file case.parproj...' - CALL printout(0) -C -C ---------------------------------------------------------------- -C Description of the size of the basis for each included orbital : -C ---------------------------------------------------------------- - DO iorb=1,norb - WRITE(oupartial,'(3(i6))') norm_radf(iorb)%n - ENDDO -C There is not more than 1 LO for each orbital (hence n < 4 ) -C -C The following descriptions are made for each included orbital. - DO iorb=1,norb - l=orb(iorb)%l - isrt=orb(iorb)%sort -C ------------------------------------ -C Description of the Theta projector : -C ------------------------------------ -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN - DO ik=1,nk - DO ir=1,norm_radf(iorb)%n - DO is=1,ns - WRITE(oupartial,*) - & REAL(pr_orb(iorb,ik,is)%matn_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - DO is=1,ns - WRITE(oupartial,*) - & AIMAG(pr_orb(iorb,ik,is)%matn_rep(1, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - ENDDO ! End of the ir loop - ENDDO ! End of the ik loop -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO, spinor rotation matrices are used. - DO ik=1,nk - DO ir=1,norm_radf(iorb)%n - DO m=1,2*(2*l+1) - WRITE(oupartial,*) - & REAL(pr_orb(iorb,ik,1)%matn_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top,ir)) - ENDDO - DO m=1,2*(2*l+1) - WRITE(oupartial,*) - & AIMAG(pr_orb(iorb,ik,1)%matn_rep(m, - & kp(ik,1)%nb_bot:kp(ik,1)%nb_top,ir)) - ENDDO - ENDDO ! End of the ir loop - ENDDO ! End of the ik loop -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - DO ik=1,nk - DO ir=1,norm_radf(iorb)%n - DO is=1,ns - DO m=-l,l - WRITE(oupartial,*) - & REAL(pr_orb(iorb,ik,is)%matn_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - ENDDO ! End of the is loop - DO is=1,ns - DO m=-l,l - WRITE(oupartial,*) - & AIMAG(pr_orb(iorb,ik,is)%matn_rep(m, - & kp(ik,is)%nb_bot:kp(ik,is)%nb_top,ir)) - ENDDO - ENDDO ! End of the is loop - ENDDO ! End of the ir loop - ENDDO ! End of the ik loop - ENDIF ! End of the ifmixing if-then-else -C for each included orbital, for each k-point and each |phi_j> elmt, -C the corresponding Thetaprojector is described by : -C - the real part of the matrix -C - the imaginary part of the matrix -C -C ------------------------------------------------------------------------------- -C Description of the density matrices below the lower limit e_bot of the window : -C ------------------------------------------------------------------------------- -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C With SO, the density matrix is printed for the complete spin+orbital subspace. -C (in this case, this means a matrix of size 2) - IF (ifSP.AND.ifSO) THEN - ALLOCATE(densprint(2,2)) - densprint(1,1)=densmat(1,iorb)%mat(1,1) - densprint(2,2)=densmat(2,iorb)%mat(1,1) - densprint(1,2)=densmat(3,iorb)%mat(1,1) - densprint(2,1)=densmat(4,iorb)%mat(1,1) - DO m=1,2 - WRITE(oupartial,*) REAL(densprint(m,1:2)) - ENDDO - DO m=1,2 - WRITE(oupartial,*) AIMAG(densprint(m,1:2)) - ENDDO - DEALLOCATE(densprint) -C In the other cases the density matrix is printed for each spin subspace independently. -C (in this case, this means two matrices of size 1) - ELSE - DO is=1,ns - WRITE(oupartial,*) REAL(densmat(is,iorb)%mat(1,1)) - ENDDO - DO is=1,ns - WRITE(oupartial,*) AIMAG(densmat(is,iorb)%mat(1,1)) - ENDDO - ENDIF ! End of the ifSO if-then-else -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO, spinor rotation matrices are used. -C As a result, the density matrix is printed for the complete spin+orbital subspace. -C (this means a matrix of size 2*(2*l+1)) - DO m=1,2*(2*l+1) - WRITE(oupartial,*) - & REAL(densmat(1,iorb)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(oupartial,*) - & AIMAG(densmat(1,iorb)%mat(m,1:2*(2*l+1))) - ENDDO -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE -C With SO, the density matrix is printed for the complete spin+orbital subspace. -C (this means a matrix of size 2*(2*l+1)) - IF (ifSP.AND.ifSO) THEN - ALLOCATE(densprint(1:2*(2*l+1),1:2*(2*l+1))) - densprint(1:2*l+1,1:2*l+1)= - & densmat(1,iorb)%mat(-l:l,-l:l) - densprint(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - & densmat(2,iorb)%mat(-l:l,-l:l) - densprint(1:2*l+1,2*l+2:2*(2*l+1))= - & densmat(3,iorb)%mat(-l:l,-l:l) - densprint(2*l+2:2*(2*l+1),1:2*l+1)= - & densmat(4,iorb)%mat(-l:l,-l:l) - DO m=1,2*(2*l+1) - WRITE(oupartial,*) REAL(densprint(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(oupartial,*) AIMAG(densprint(m,1:2*(2*l+1))) - ENDDO - DEALLOCATE(densprint) -C In the other cases, the density matrix is printed for each spin subspace independently. -C (this means two matrices of size 2*l+1) - ELSE - DO is=1,ns - DO m=-l,l - WRITE(oupartial,*) - & REAL(densmat(is,iorb)%mat(m,-l:l)) - ENDDO - ENDDO - DO is=1,ns - DO m=-l,l - WRITE(oupartial,*) - & AIMAG(densmat(is,iorb)%mat(m,-l:l)) - ENDDO - ENDDO - ENDIF ! End of the ifSO if-then-else - ENDIF ! End of the ifmixing if-then-else -C for each included orbital, the corresponding density matrix is described by : -C - the real part of the matrix -C - the imaginary part of the matrix -C -C -------------------------------------------------------------------- -C Description of the global to local coordinates transformation Rloc : -C -------------------------------------------------------------------- -C Description of each transformation Rloc - iatom=orb(iorb)%atom -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF(l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrix must be considered. - ALLOCATE(spinrot(1:2,1:2)) - spinrot(:,:)=0.d0 -C The spinor-rotation matrix is directly calculated from the Euler angles a,b and c. - IF (rotloc(iatom)%timeinv) THEN - factor=(rotloc(iatom)%a+rotloc(iatom)%g)/2.d0 - spinrot(2,1)=EXP(CMPLX(0.d0,factor))* - & DCOS(rotloc(iatom)%b/2.d0) - spinrot(1,2)=-CONJG(spinrot(2,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatom)%a-rotloc(iatom)%g)/2.d0 - spinrot(2,2)=-EXP(CMPLX(0.d0,factor))* - & DSIN(rotloc(iatom)%b/2.d0) - spinrot(1,1)=CONJG(spinrot(2,2)) - ELSE - factor=(rotloc(iatom)%a+rotloc(iatom)%g)/2.d0 - spinrot(1,1)=EXP(CMPLX(0.d0,factor))* - & DCOS(rotloc(iatom)%b/2.d0) - spinrot(2,2)=CONJG(spinrot(1,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatom)%a-rotloc(iatom)%g)/2.d0 - spinrot(1,2)=EXP(CMPLX(0.d0,factor))* - & DSIN(rotloc(iatom)%b/2.d0) - spinrot(2,1)=-CONJG(spinrot(1,2)) - ENDIF -C Printing the transformation informations - DO m=1,2 - WRITE(oupartial,*) REAL(spinrot(m,1:2)) - ENDDO - DO m=1,2 - WRITE(oupartial,*) AIMAG(spinrot(m,1:2)) - ENDDO - DEALLOCATE(spinrot) -C Without SO, only the rotation matrix in orbital space is necessary. - ELSE -C In this case, the Rloc matrix is merely identity. - WRITE(oupartial,*) 1.d0 - WRITE(oupartial,*) 0.d0 - ENDIF -C Printing the time inversion flag if the calculation is spin-polarized (ifSP=1) - IF (ifSP) THEN - timeinvflag=0 - IF (rotloc(iatom)%timeinv) timeinvflag=1 - WRITE(oupartial,'(i6)') timeinvflag - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the calculation is necessary spin-polarized with SO, spinor rotation matrices are used. - DO m=1,2*(2*l+1) - WRITE(oupartial,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(oupartial,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO -C Printing if the transforamtion included a time-reversal operation. - timeinvflag =0 - IF (rotloc(iatom)%timeinv) timeinvflag=1 - WRITE(oupartial,'(i6)') timeinvflag -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrices are considered. -C The spin is not a good quantum number, so the whole representation is used. - DO m=1,2*(2*l+1) - WRITE(oupartial,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(oupartial,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,1:2*(2*l+1))) - ENDDO - ELSE -C The calculation is either spin-polarized without SO or paramagnetic. -C The spin is a good quantum number and irep are possible. - DO m=-l,l - WRITE(oupartial,*) REAL(rotloc(iatom)% - & rotrep(l)%mat(m,-l:l)) - ENDDO - DO m=-l,l - WRITE(oupartial,*) AIMAG(rotloc(iatom)% - & rotrep(l)%mat(m,-l:l)) - ENDDO - END IF ! End of the ifSO if-then-else -C Printing if the transformation included a time-reversal operation. - IF (ifSP) THEN - timeinvflag =0 - IF (rotloc(iatom)%timeinv) timeinvflag=1 - WRITE(oupartial,'(i6)') timeinvflag - END IF - END IF ! End of the ifmixing if-then-else -C for each included orbital iorb, the transformation Rloc is described by : -C - the real part of the submatrix associated to "iorb" -C - the imaginary part of the submatrix associated to "iorb" -C - a flag which states if a time reversal operation is included in the transformation (if SP only ) -C - END DO ! End of the iorb loop -C -C -C ============================== -C Writing the file case.sympar : -C ============================== -C - WRITE(buf,'(a)')'Writing the file case.sympar...' - CALL printout(0) -C -C ---------------------------------------------------------- -C Description of the general informations about the system : -C ---------------------------------------------------------- - WRITE(ousympar,'(2(i6,x))') nsym, natom -C nysm is the total number of symmetries of the system -C natom is the total number of atom in the unit cell -C -C ------------------------------------------------------------------- -C Description of the permutation matrix associated to each symmetry : -C ------------------------------------------------------------------- - DO is=1,nsym - WRITE(ousympar,'(100(i6,x))') srot(is)%perm - ENDDO -C -C ------------------------------------------------------------ -C Description of the time-reversal property for each symmetry : -C ------------------------------------------------------------ - IF (ifSP) THEN - ALLOCATE(timeflag(nsym)) - timeflag=0 - DO isym=1,nsym - IF (srot(isym)%timeinv) timeflag(isym)= 1 - ENDDO - WRITE(ousympar,'(100(i6,x))') timeflag(1:nsym) - DEALLOCATE(timeflag) -C When the calculation is spin-polarized (with SO), a flag which states -C if a time reversal operation is included in the transformation isym is written. - ENDIF -C -C ------------------------------------------------------------------------------------------- -C Description of the representation matrices of each symmetry for all the included orbitals : -C ------------------------------------------------------------------------------------------- - DO isym=1,nsym - DO iorb=1,norb - isrt=orb(iorb)%sort - l=orb(iorb)%l -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF(l==0) THEN -C For the s-orbitals, the only irep possible is the matrix itself. - IF (ifSP.AND.ifSO) THEN -C If SO is taken into account, spinor rotation matrix is considered. - ALLOCATE(spinrot(1:2,1:2)) - spinrot(:,:)=0.d0 - IF (srot(isym)%timeinv) THEN -C In this case, the Euler angle Beta is Pi. The spinor rotation matrix is block-diagonal, -C since the time-reversal operator is included in the definition of the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (g-a) if beta=Pi. -C Up/up and Dn/dn terms - spinrot(1,1)=EXP(CMPLX(0.d0,factor)) - spinrot(2,2)=CONJG(spinrot(1,1)) -C spinrot(1,1) = -exp(i(alpha-gamma)/2) ; spinrot(2,2) = -exp(-i(alpha-gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. - ELSE -C In this case, the Euler angle Beta is 0. The spinor rotation matrix is block-diagonal, -C No time-reversal treatment was applied to the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (a+g) if beta=0. -C Up/up and Dn/dn terms - spinrot(1,1)=EXP(CMPLX(0.d0,factor)) - spinrot(2,2)=CONJG(spinrot(1,1)) -C spinrot(1,1) = -exp(-i(alpha+gamma)/2) ; spinrot(2,2) = -exp(i(alpha-gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. - END IF -C Printing the transformation informations - DO m=1,2 - WRITE(ousympar,*) REAL(spinrot(m,1:2)) - ENDDO - DO m=1,2 - WRITE(ousympar,*) AIMAG(spinrot(m,1:2)) - ENDDO -C - DEALLOCATE(spinrot) -C Without SO, only the rotation matrix in orbital space is necessary. - ELSE -C In this case, the Rloc matrix is merely identity. - WRITE(ousympar,*) 1.d0 - WRITE(ousympar,*) 0.d0 - ENDIF -C -C If the basis representation needs a complete spinor rotation approach (basis with "mixing" ). -C --------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the SO is necessary considered, spinor rotation matrices are used. - DO m=1,2*(2*l+1) - WRITE(ousympar,*) REAL(srot(isym)% - & rotrep(l,isrt)%mat(m,1:2*(2*l+1))) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ousympar,*) AIMAG(srot(isym)% - & rotrep(l,isrt)%mat(m,1:2*(2*l+1))) - ENDDO -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE - IF (ifSP.AND.ifSO) THEN -C If the calculation is spin-polarized with SO, spinor rotation matrices are considered. -C The spin is not a good quantum number, so the whole representation is used. - ALLOCATE(spinrot(1:2*(2*l+1),1:2*(2*l+1))) - spinrot(:,:)=0.d0 - IF (srot(isym)%timeinv) THEN -C In this case, the Euler angle Beta is Pi. The spinor rotation matrix is block-diagonal, -C since the time-reversal operator is included in the definition of the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (g-a) in this case. -C Up/up block : - ephase=EXP(CMPLX(0.d0,factor)) -C AS a result, ephase = -exp(i(alpha-gamma)/2) - spinrot(1:2*l+1,1:2*l+1)= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) -C Dn/dn block : - ephase=CONJG(ephase) -C Now, ephase = -exp(-i(alpha-gamma)/2) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) - ELSE -C In this case, the Euler angle Beta is 0. The spinor rotation matrix is block-diagonal, -C No time-reversal treatment was applied to the transformation. -C - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is 2pi-(alpha+gamma) in this case. -C Up/up block : - ephase=EXP(CMPLX(0.d0,factor)) -C As a result, ephase = -exp(-i(alpha+gamma)/2) - spinrot(1:2*l+1,1:2*l+1)= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) -C Dn/dn block : - ephase=CONJG(ephase) -C Now, ephase = -exp(i(alpha+gamma)/2) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - = ephase*srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l) - END IF -C Printing the transformation informations - DO m=1,2*(2*l+1) - WRITE(ousympar,*) REAL(spinrot(m,1:2*(2*l+1)) ) - ENDDO - DO m=1,2*(2*l+1) - WRITE(ousympar,*) AIMAG(spinrot(m,1:2*(2*l+1)) ) - ENDDO -C - DEALLOCATE(spinrot) -C In the other cases (spin-polarized without SO or paramagnetic), only the rotation matrix in orbital space is necessary. - ELSE - DO m=-l,l - WRITE(ousympar,*) REAL(srot(isym)% - & rotrep(l,isrt)%mat(m,-l:l)) - ENDDO - DO m=-l,l - WRITE(ousympar,*) AIMAG(srot(isym)% - & rotrep(l,isrt)%mat(m,-l:l)) - ENDDO - END IF ! End of the ifSO if-then-else - END IF ! End of the ifmixing if-then-else - END DO ! End of the iorb loop - END DO ! End of the isym loop -C for each symmetry and each included orbital iorb, is described : -C - the real part of the matrix associated to "isym" for the "iorb" -C - the imaginary part of the matrix associated to "isym" for the "iorb" -C -C --------------------------------------------------------------------- -C Description of the time reversal operator for each included orbital : -C --------------------------------------------------------------------- -C This description occurs only if the computation is paramagnetic (ifSP=0) - IF (.not.ifSP) THEN - DO iorb=1,norb - l=orb(iorb)%l - isrt=orb(iorb)%sort -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s-orbitals, the only basis considered is the complex basis. - WRITE(ousympar,*) 1.d0 - WRITE(ousympar,*) 0.d0 -C -C If the basis representation can be reduce to the up/up block (basis without "mixing"). -C -------------------------------------------------------------------------------------- - ELSE -C Calculation of the time-reversal operator - ALLOCATE(time_op(-l:l,-l:l)) - time_op(:,:)=0.d0 - DO m=-l,l - time_op(m,m)=1.d0 - ENDDO -C time_op is Identity. - CALL timeinv_op(time_op,(2*l+1),l,isrt) -C time_op is now the time-reversal operator in the desired basis ({new_i}) -C - DO m=-l,l - WRITE(ousympar,*) REAL(time_op(m,-l:l)) - ENDDO - DO m=-l,l - WRITE(ousympar,*) AIMAG(time_op(m,-l:l)) - ENDDO - DEALLOCATE(time_op) - END IF ! End of the l if-then-else - END DO ! End of the icrorb loop - END IF ! End of the ifsp if-then-else -C for each included orbital iorb, the time-reversal operator is described by : -C - its real part -C - its imaginary part -C - RETURN - END - - - diff --git a/fortran/dmftproj/read_k_list.f b/fortran/dmftproj/read_k_list.f deleted file mode 100644 index 4cda707..0000000 --- a/fortran/dmftproj/read_k_list.f +++ /dev/null @@ -1,98 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE read_k_list -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine reads the labels of high-symmetry points %% -C %% along the k-path chosen for plotting the k-resolved spectral %% -C %% function. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C --------------------------- - USE bands - USE file_names - IMPLICIT NONE - CHARACTER(len=100) :: buf - INTEGER :: ilab, pos, i -C -C ======================================================================== -C Determination of the total number of labels and the number of k-points : -C ======================================================================== - buf=' ' - nlab=0 - pos=0 -C nlab will count the number of labels met. -C pos will count the number of lines -C (which is also the number of k-points along the k-path) - DO WHILE (buf(1:3).NE.'END') - READ(iuklist,'(a)') buf - pos=pos+1 - IF(buf(1:1).NE.' ') THEN - nlab=nlab+1 - ENDIF - ENDDO -C pos is now the number of line of the file. -C nlab is the number of labels, includind the label 'END' -C -C nkband = number of k-points along the k-path. - nkband=pos-1 -C The label 'END' must not be taken into account - nlab=nlab-1 -C The last line of the file case.klist_band contains "END". -C So the while loop can have an end too. -C -C ============================= -C Determination of the labels : -C ============================= - ALLOCATE(labels(nlab)) -C The file case.klist_band is read again. - REWIND(iuklist) - ilab=0 - DO pos=1,nkband - READ(iuklist,'(a)') buf - IF(buf(1:1).NE.' ') THEN - ilab=ilab+1 - labels(ilab)%pos=pos -C labels(ilab)%pos is the number of the corresponding k-point - i=INDEX(buf,' ') -C determination of the size of buf -C (index is a function which finds the index of ' ' in buf) - labels(ilab)%kname=' ' - labels(ilab)%kname(1:i)=buf(1:i) -C labels(ilab)%kname is the corresponding label - ENDIF - ENDDO -C ====================================== -C Printing the labels read for testing : -C ====================================== - WRITE(*,*) nkband - WRITE(*,*)'nlab = ', nlab - DO i=1,nlab - WRITE(*,*) i, labels(i)%pos, labels(i)%kname - ENDDO -C - RETURN - END - diff --git a/fortran/dmftproj/readcomline.f b/fortran/dmftproj/readcomline.f deleted file mode 100644 index 60f0675..0000000 --- a/fortran/dmftproj/readcomline.f +++ /dev/null @@ -1,105 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE readcomline -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine reads and process the command line options %% -C %% (Only -so, -sp and -band are the possible ones). %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data - USE prnt - IMPLICIT NONE - CHARACTER(len=100) :: buf1 - CHARACTER(len=100), DIMENSION(:), ALLOCATABLE :: flags - INTEGER :: i1, iargc, iarg - LOGICAL :: ifError -C Process the command line : -C --------------------------- - iarg=iargc() - ALLOCATE(flags(iarg)) - ifSP=.FALSE. - ifSO=.FALSE. - ifBAND=.FALSE. - ifError=.FALSE. - DO i1=1,iarg - CALL getarg(i1,buf1) - READ(buf1,*)flags(i1) - flags(i1)=ADJUSTL(flags(i1)) - CALL makelowcase(flags(i1)) - SELECT CASE(flags(i1)(1:5)) - CASE('-sp ') - ifSP=.TRUE. - CASE('-so ') - ifSO=.TRUE. - CASE('-band') - ifBAND=.TRUE. - CASE DEFAULT - ifError=.TRUE. - EXIT - END SELECT - ENDDO -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the options are not recognized. -C ------------------------- -C - IF (ifError) THEN - WRITE(6,'(a,a,a)')'Command line option: ',flags(i1)(1:5), - & ' is not recognized.' - WRITE(6,'(a)')'END OF THE PRGM' - STOP - ENDIF -C --------------------------------------------------------------------------------------- - DEALLOCATE(flags) -C - RETURN - END - - SUBROUTINE makelowcase(string) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine modifies the input string into low case %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - IMPLICIT NONE - CHARACTER*26 :: upperabc - CHARACTER*26 :: lowabc - CHARACTER* (*) string - INTEGER :: i,k - PARAMETER(upperabc='ABCDEFHGIJKLMNOPQRSTUVWXYZ') - PARAMETER(lowabc='abcdefhgijklmnopqrstuvwxyz') - DO i=1,len(string) - DO k=1,26 - IF(string(i:i)==upperabc(k:k)) string(i:i)=lowabc(k:k) - ENDDO - ENDDO - RETURN - END - - diff --git a/fortran/dmftproj/rot_dens.f b/fortran/dmftproj/rot_dens.f deleted file mode 100644 index 32e6261..0000000 --- a/fortran/dmftproj/rot_dens.f +++ /dev/null @@ -1,239 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE rotdens_mat(Dmat,orbit,norbit) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine applies to each density matrix in Dmat %% -C %% the transformation to go from the global coordinates to the %% -C %% local coordinates associated to the considered orbital. %% -C %% %% -C %% This version can be used for SO computations. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ---------------------------- - USE common_data - USE projections - USE symm - USE reps - IMPLICIT NONE - INTEGER :: norbit - TYPE(matrix), DIMENSION(nsp,norbit) :: Dmat - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: rot_dmat - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: tmp_mat - COMPLEX(KIND=8):: ephase - REAL(KIND=8):: factor - TYPE(orbital), DIMENSION(norbit) :: orbit - INTEGER :: iatom, isrt, iorb, is, is1, l, i, m -C -C - DO iorb=1,norbit - l=orbit(iorb)%l - isrt=orbit(iorb)%sort - iatom=orbit(iorb)%atom -C - IF(ifSP.AND.ifSO) THEN -C In this case, the complete spinor rotation approach (matrices of size 2*(2*l+1) ) is used for rotloc. - IF (l==0) THEN -C ------------------------------------------------------------------------------------------------------------ -C For the s orbital, the spinor rotation matrix will be constructed directly from the Euler angles a,b and c : -C ------------------------------------------------------------------------------------------------------------ -C Up/dn and Dn/up terms - ALLOCATE(tmp_mat(1:2,1:2)) - ALLOCATE(rot_dmat(1:2,1:2)) - IF (rotloc(iatom)%timeinv) THEN - factor=(rotloc(iatom)%a+rotloc(iatom)%g)/2.d0 - tmp_mat(2,1)=EXP(CMPLX(0.d0,factor))* - & DCOS(rotloc(iatom)%b/2.d0) - tmp_mat(1,2)=-CONJG(tmp_mat(2,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatom)%a-rotloc(iatom)%g)/2.d0 - tmp_mat(2,2)=-EXP(CMPLX(0.d0,factor))* - & DSIN(rotloc(iatom)%b/2.d0) - tmp_mat(1,1)=CONJG(tmp_mat(2,2)) -C definition of the total density matrix - rot_dmat(1,1)=Dmat(1,iorb)%mat(1,1) - rot_dmat(2,2)=Dmat(2,iorb)%mat(1,1) - rot_dmat(1,2)=Dmat(3,iorb)%mat(1,1) - rot_dmat(2,1)=Dmat(4,iorb)%mat(1,1) -C going to the local basis - rot_dmat(1:2,1:2)=CONJG(MATMUl( - & rot_dmat(1:2,1:2),tmp_mat(1:2,1:2))) - rot_dmat(1:2,1:2)=MATMUl( - & TRANSPOSE(tmp_mat(1:2,1:2)), - & rot_dmat(1:2,1:2)) - ELSE - factor=(rotloc(iatom)%a+rotloc(iatom)%g)/2.d0 - tmp_mat(1,1)=EXP(CMPLX(0.d0,factor))* - & DCOS(rotloc(iatom)%b/2.d0) - tmp_mat(2,2)=CONJG(tmp_mat(1,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatom)%a-rotloc(iatom)%g)/2.d0 - tmp_mat(1,2)=EXP(CMPLX(0.d0,factor))* - & DSIN(rotloc(iatom)%b/2.d0) - tmp_mat(2,1)=-CONJG(tmp_mat(1,2)) -C definition of the total density matrix - rot_dmat(1,1)=Dmat(1,iorb)%mat(1,1) - rot_dmat(2,2)=Dmat(2,iorb)%mat(1,1) - rot_dmat(1,2)=Dmat(3,iorb)%mat(1,1) - rot_dmat(2,1)=Dmat(4,iorb)%mat(1,1) -C going to the local basis - rot_dmat(1:2,1:2)=MATMUl( - & TRANSPOSE(CONJG(tmp_mat(1:2,1:2))), - & rot_dmat(1:2,1:2)) - rot_dmat(1:2,1:2)=MATMUl( - & rot_dmat(1:2,1:2),tmp_mat(1:2,1:2)) - ENDIF - DEALLOCATE(tmp_mat) -C storing in Dmat - Dmat(1,iorb)%mat(1,1)=rot_dmat(1,1) - Dmat(2,iorb)%mat(1,1)=rot_dmat(2,2) - Dmat(3,iorb)%mat(1,1)=rot_dmat(1,2) - Dmat(4,iorb)%mat(1,1)=rot_dmat(2,1) - DEALLOCATE(rot_dmat) - ELSE -C ----------------------------------------------------------------------------------------------------- -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) : -C ----------------------------------------------------------------------------------------------------- - IF (reptrans(l,isrt)%ifmixing) THEN -C We use the complete spin-space representation, so no trick on indices is necessary. -C -C Application of the operation inverse(Rloc).Dmat.(Rloc) : -C ------------------------------------------------------- - IF (rotloc(iatom)%timeinv) THEN -C In this case, the operators is antiunitary [ inverse(R)=transpose(R) ] - Dmat(1,iorb)%mat(:,:)=CONJG( - = MATMUL(Dmat(1,iorb)%mat(:,:), - & rotloc(iatom)%rotrep(l)%mat(:,:) )) - Dmat(1,iorb)%mat(:,:)= - = MATMUL(TRANSPOSE( rotloc(iatom)% - & rotrep(l)%mat(:,:) ),Dmat(1,iorb)%mat(:,:) ) -C Dmat_{local} = inverse(Rloc) Dmat_{global}* Rloc* -C Dmat_{local} = transpose(Rloc) Dmat_{global}* Rloc* - ELSE -C In this case, all the operators are unitary [ inverse(R)=transpose(conjugate(R)) ] - Dmat(1,iorb)%mat(:,:)= - = MATMUL(Dmat(1,iorb)%mat(:,:), - & rotloc(iatom)%rotrep(l)%mat(:,:) ) - Dmat(1,iorb)%mat(:,:)= - = MATMUL(TRANSPOSE(CONJG( rotloc(iatom)% - & rotrep(l)%mat(:,:) )),Dmat(1,iorb)%mat(:,:) ) -C Dmat_{local} = Dmat_{global} -C Dmat_{local} = inverse(Rloc) Dmat_{global} Rloc - ENDIF -C - ELSE -C ---------------------------------------------------------------------------------------------- -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) : -C ---------------------------------------------------------------------------------------------- -C definition of the total density matrix - ALLOCATE(rot_dmat(1:2*(2*l+1),1:2*(2*l+1))) - rot_dmat(1:(2*l+1),1:(2*l+1))= - & Dmat(1,iorb)%mat(-l:l,-l:l) - rot_dmat(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - & Dmat(2,iorb)%mat(-l:l,-l:l) - rot_dmat(1:(2*l+1),2*l+2:2*(2*l+1))= - & Dmat(3,iorb)%mat(-l:l,-l:l) - rot_dmat(2*l+2:2*(2*l+1),1:(2*l+1))= - & Dmat(4,iorb)%mat(-l:l,-l:l) - IF (rotloc(iatom)%timeinv) THEN -C In this case, the operator is antiunitary [ inverse(R)=transpose(R) ] - rot_dmat(1:2*(2*l+1),1:2*(2*l+1))=CONJG( - = MATMUL(rot_dmat(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(iatom)%rotrep(l) - & %mat(1:2*(2*l+1),1:2*(2*l+1)) )) - rot_dmat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(TRANSPOSE( rotloc(iatom)% - & rotrep(l)%mat(1:2*(2*l+1),1:2*(2*l+1)) ), - & rot_dmat(1:2*(2*l+1),1:2*(2*l+1)) ) -C Dmat_{local} = inverse(Rloc) Dmat_{global}* Rloc* -C Dmat_{local} = transpose(Rloc) Dmat_{global}* Rloc* - ELSE -C In this case, all the operators are unitary [ inverse(R)=transpose(conjugate(R)) ] - rot_dmat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(rot_dmat(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(iatom)%rotrep(l) - & %mat(1:2*(2*l+1),1:2*(2*l+1)) ) - rot_dmat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(TRANSPOSE(CONJG( rotloc(iatom)% - & rotrep(l)%mat(1:2*(2*l+1),1:2*(2*l+1)) )), - & rot_dmat(1:2*(2*l+1),1:2*(2*l+1)) ) -C Dmat_{local} = Dmat_{global} -C Dmat_{local} = inverse(Rloc) Dmat_{global} Rloc - ENDIF -C storing in dmat again - Dmat(1,iorb)%mat(-l:l,-l:l)= - & rot_dmat(1:(2*l+1),1:(2*l+1)) - Dmat(2,iorb)%mat(-l:l,-l:l)= - & rot_dmat(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1)) - Dmat(3,iorb)%mat(-l:l,-l:l)= - & rot_dmat(1:(2*l+1),2*l+2:2*(2*l+1)) - Dmat(4,iorb)%mat(-l:l,-l:l)= - & rot_dmat(2*l+2:2*(2*l+1),1:(2*l+1)) - DEALLOCATE(rot_dmat) - ENDIF ! End of the if mixing if-then-else - ENDIF ! End of the if "l=0" if-then-else - ELSE -C ------------------------------------------------------------------------------ -C The s-orbitals are a particular case of a "non-mixing" basis and is invariant. -C ------------------------------------------------------------------------------ - IF(l==0) CYCLE -C ---------------------------------------------------------------------------------------------- -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) : -C ---------------------------------------------------------------------------------------------- - ALLOCATE(rot_dmat(-l:l,-l:l)) - DO is=1,nsp - rot_dmat=0.d0 -C -C Application of the operation inverse(Rloc).Dmat.(Rloc) : -C ------------------------------------------------------- -C In this case, (either a paramagnetic calculation or a spin-polarized one -C but the symmetry operation does not change the magntization direction) -C all the operators are unitary [ inverse(R)=transpose(conjugate(R)) ] - rot_dmat(-l:l,-l:l)= - = MATMUL(Dmat(is,iorb)%mat(-l:l,-l:l), - & rotloc(iatom)%rotrep(l)%mat(-l:l,-l:l) ) - rot_dmat(-l:l,-l:l)= - = MATMUL(TRANSPOSE(CONJG( rotloc(iatom)% - & rotrep(l)%mat(-l:l,-l:l) )), - & rot_dmat(-l:l,-l:l) ) -C rotmat_{local} = rotmat_{global} -C rotmat_{local} = inverse(Rloc) rotmat_{global} Rloc -C -C Storing the new value in Dmat : -C ------------------------------- - Dmat(is,iorb)%mat(-l:l,-l:l)=rot_dmat(-l:l,-l:l) - ENDDO - DEALLOCATE(rot_dmat) -C - ENDIF ! End of the ifSO-ifSP if-then-else - ENDDO ! End of the iorb loop -C - RETURN - END - - - - - diff --git a/fortran/dmftproj/rot_projectmat.f b/fortran/dmftproj/rot_projectmat.f deleted file mode 100644 index df3294c..0000000 --- a/fortran/dmftproj/rot_projectmat.f +++ /dev/null @@ -1,72 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE rot_projectmat(mat,l,bottom,top,jatom,isrt) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine makes the transformation from local to global %% -C %% frame coordinates for the matrices mat in agreement with %% -C %% the atom j considered. %% -C %% %% -C %% mat SHOULD BE IN THE COMPLEX SPHERICAL HARMONICS BASIS. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE almblm_data, ONLY : nk - USE common_data - USE symm - IMPLICIT NONE - INTEGER,INTENT(IN) :: l, bottom, top, jatom, isrt - COMPLEX(KIND=8), DIMENSION(-l:l,bottom:top) :: mat - COMPLEX(KIND=8), DIMENSION(-l:l,bottom:top) :: mattmp - COMPLEX(KIND=8), DIMENSION(1:2*l+1,1:2*l+1) :: rot_dmat - INTEGER :: is, ik, isym, lm, lms, ind1, ind2, m -C - DO m=-l,l - mattmp(m,bottom:top)= mat(m,bottom:top) - END DO -C mat is the projector in the local frame (spherical harmonic basis). -C -C The subroutine lapw2 has actually made the computation in the local frame -C BUT with considering the up and the dn elements in the global frame (no rotation in spin-space), -C That's why we have to make the computation only in the spin-space to put entirely the matrix mat in the global frame. -C Moreover, no time-reversal symmetry should be taken into account, since the true "rotloc" matrix is considered in lapw2 (-alm). -C -C The transformation is thus simply achieved by performing the multiplication by rotloc = -C (use of the subroutine dmat) - rot_dmat=0.d0 - CALL dmat(l,rotloc(jatom)%a,rotloc(jatom)%b, - & rotloc(jatom)%g, - & REAL(rotloc(jatom)%iprop,KIND=8),rot_dmat,2*l+1) -C Performing the rotation - mattmp(-l:l,bottom:top)= - = MATMUL(rot_dmat(1:2*l+1,1:2*l+1), - & mattmp(-l:l,bottom:top)) -C The variable mattmp is then the projector in the global frame (spherical harmonic basis). -C The resulting matrix is stored in mat. - mat(-l:l,bottom:top)=mattmp(-l:l,bottom:top) -C - RETURN - END - diff --git a/fortran/dmftproj/set_ang_trans.f b/fortran/dmftproj/set_ang_trans.f deleted file mode 100644 index 361893e..0000000 --- a/fortran/dmftproj/set_ang_trans.f +++ /dev/null @@ -1,543 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE set_ang_trans -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets up the matrices for transformation between %% -C %% the default complex spherical harmonics used in Wien2k and an %% -C %% angular basis chosen, for each orbital of each atom. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data - USE file_names - USE reps - USE prnt - IMPLICIT NONE - CHARACTER(len=150) :: fullpath - CHARACTER(len=250) :: buf1 - CHARACTER(len=25) :: basis_file - CHARACTER(len=1) :: repsign - INTEGER, DIMENSION(2*(2*lmax+1)) :: degrep - REAL(KIND=8), DIMENSION(:), ALLOCATABLE :: rtrans,itrans - INTEGER :: m, l, m1, irep, isrt, ind, ind1, ind2 - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: tempmat - LOGICAL :: flag -C -C - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - WRITE(buf,'(a)')'Basis representation for each sort.' - CALL printout(0) - CALL printout(0) -C ================================= -C Creation of the reptrans matrix : -C ================================= -C -C For the s-electrons : no transformation is necessary (it's always the scalar 1) - ALLOCATE(reptrans(1:lmax,1:nsort)) -C Definition of the size of reptrans (size lmax*nsort) -C Each element of this table is an "ang_bas" element, which will be defined below. - DO isrt=1,nsort -C ----------------------------------------------- -C Case of a representation in the complex basis : -C ----------------------------------------------- - IF (defbasis(isrt)%typebasis(1:7)=='complex') THEN - DO l=1,lmax - IF (lsort(l,isrt)==0) THEN -C The considered orbital is not included, all the fields are set up to default value. - reptrans(l,isrt)%nreps=1 - ALLOCATE(reptrans(l,isrt)%dreps(1)) - ALLOCATE(reptrans(l,isrt)%transmat(1,1)) - reptrans(l,isrt)%transmat=0d0 - reptrans(l,isrt)%dreps(1)=0 - reptrans(l,isrt)%ifmixing=.FALSE. - ELSE -C The considered orbital is included. - reptrans(l,isrt)%nreps=1 - ALLOCATE(reptrans(l,isrt)%dreps(1)) - ALLOCATE(reptrans(l,isrt)%transmat(-l:l,-l:l)) - reptrans(l,isrt)%transmat=0d0 - reptrans(l,isrt)%dreps(1)=2*l+1 - reptrans(l,isrt)%ifmixing=.FALSE. - DO m=-l,l - reptrans(l,isrt)%transmat(m,m)=1d0 - ENDDO -C In this case, the transformation matrix is just the Identity (hence 1 irep). -C Spin up and Spin down states are not mixed in the basis representation. - ENDIF - ENDDO -C --------------------------------------------- -C Case of a representation in the cubic basis : -C --------------------------------------------- - ELSEIF (defbasis(isrt)%typebasis(1:5)=='cubic') THEN - DO l=1,lmax - IF (lsort(l,isrt)==0) THEN -C The considered orbital is not included, all the fields are set up to default value. - reptrans(l,isrt)%nreps=1 - ALLOCATE(reptrans(l,isrt)%dreps(1)) - ALLOCATE(reptrans(l,isrt)%transmat(1,1)) - reptrans(l,isrt)%transmat=0d0 - reptrans(l,isrt)%dreps(1)=0 - reptrans(l,isrt)%ifmixing=.FALSE. - ELSE -C The considered orbital is included. -C The cubic basis is described in the format transpose(P) where P is the usual matrix -C of the eigenvectors of a matrix D ( D.P=Delta.P with Delta diagonal or P=). -C In other words, each line of the file describes the coefficient of the "new basis vector" -C in the basis { |l,-l,up>,...|l,l,up>,|l,-l,dn>,...|l,l,dn> }. -C The transformation matrices are stored in the directory SRC_templates, the variable "fullpath" -C must be updated if this prgm is copied. - ALLOCATE(reptrans(l,isrt)%transmat(-l:l,-l:l)) - ALLOCATE(rtrans(-l:l)) - ALLOCATE(itrans(-l:l)) -C write(*,*)fullpath - IF (l==1) CALL - & set_harm_file(fullpath,'case.cf_p_cubic') -C standard cubic representation of p electrons : px,py,pz - IF (l==2) CALL - & set_harm_file(fullpath,'case.cf_d_eg_t2g') -C standard cubic representation of d-electrons : dz2, dx2-y2, dxy, dxz,dyz (Wien-convention for the phase) - IF (l==3) CALL - & set_harm_file(fullpath,'case.cf_f_mm2') -C mm2 representation of the f electrons (standard definition with complex coefficients) -C -C Reading of the file - OPEN(iumatfile,file=fullpath,status='old') - ind=-l - irep=0 - m = -l - DO WHILE (m.le.l) - READ(iumatfile,'(a)')buf1 - READ(buf1(1:1),'(a)')repsign -C Get rid of comment lines first - IF (repsign.NE.'#') THEN - IF(repsign=='*') THEN -C Finding the different ireps in the new basis (a "*" means the end of an irep) - irep=irep+1 - degrep(irep)=m-ind+1 - ind=m+1 - ENDIF - READ(buf1(2:250),*)(rtrans(m1),itrans(m1),m1=-l,l) -C The line of the file is stored in the column of reptrans, which is temporarly "P". - reptrans(l,isrt)%transmat(-l:l,m)= - & CMPLX(rtrans(-l:l),itrans(-l:l)) - m = m + 1 - ENDIF - ENDDO - reptrans(l,isrt)%transmat(-l:l,-l:l)= - = TRANSPOSE(CONJG(reptrans(l,isrt)%transmat(-l:l,-l:l))) -C reptrans%transmat = inverse(P) = , the transformation matrix from complex basis to the cubic one. -C ( inverse(P) is the decomposition of the complex basis in the new basis...) - reptrans(l,isrt)%nreps=irep - ALLOCATE(reptrans(l,isrt)%dreps(irep)) - reptrans(l,isrt)%dreps(1:irep)=degrep(1:irep) - reptrans(l,isrt)%ifmixing=.FALSE. -C reptrans%nreps = the total number of ireps in the cubic basis -C reptrans%dreps = table of the size of the different ireps -C reptrans%ifmixing = .FALSE. because Spin up and Spin down states are not mixed in the basis representation. - CLOSE(iumatfile) - DEALLOCATE(rtrans) - DEALLOCATE(itrans) - ENDIF - ENDDO -C --------------------------------------------------------- -C Case of a representation defined in an added input file : -C --------------------------------------------------------- - ELSEIF (defbasis(isrt)%typebasis(1:8)=='fromfile') THEN - basis_file=defbasis(isrt)%sourcefile - OPEN(iumatfile,file=basis_file,status='old') - DO l=1,lmax - IF (lsort(l,isrt)==0) THEN -C The considered orbital is not included, all the fields are set up to default value. - reptrans(l,isrt)%nreps=1 - ALLOCATE(reptrans(l,isrt)%dreps(1)) - ALLOCATE(reptrans(l,isrt)%transmat(1,1)) - reptrans(l,isrt)%transmat=0d0 - reptrans(l,isrt)%dreps(1)=0 - ELSE -C The considered orbital is included. -C The new basis is described in the format transpose(P) where P is the usual matrix -C of the eigenvectors of a matrix D ( D.P=Delta.P with Delta diagonal or P=). -C In other words, each line of the file describes the coefficient of the "new basis vector" -C in the basis { |l,-l,up>,...|l,l,up>,|l,-l,dn>,...|l,l,dn> }. -C The transformation matrices are stored in the directory SRC_templates, the variable "fullpath" -C must be updated if this prgm is copied. - ind=1 - irep=0 - ALLOCATE(tempmat(1:2*(2*l+1),1:2*(2*l+1))) - ALLOCATE(rtrans(1:2*(2*l+1))) - ALLOCATE(itrans(1:2*(2*l+1))) -C -C Reading of the file - DO m=1,2*(2*l+1) - READ(iumatfile,'(a)')buf1 - READ(buf1(1:1),'(a)')repsign - IF(repsign=='*') THEN -C Finding the different ireps in the new basis (a "*" means the end of an irep) - irep=irep+1 - degrep(irep)=m-ind+1 - ind=m+1 - ENDIF - READ(buf1(2:250),*)(rtrans(m1),itrans(m1), - & m1=1,2*(2*l+1)) - tempmat(1:2*(2*l+1),m)= - = CMPLX(rtrans(1:2*(2*l+1)),itrans(1:2*(2*l+1))) -C The lines of the read matrix are stored in the column of tempmat, which is then P. - ENDDO -C -C Determination if the basis mixes Spin up and Spin down states - flag=.TRUE. - ind1=1 - ind2=1 -C The "do while" loop stops when flag=FALSE or i=2*(l+1) - DO WHILE (flag.AND.(ind1.lt.2*(l+1))) - flag=flag.AND. - & (tempmat((2*l+1)+ind1,(2*l+1)+ind2)==tempmat(ind1,ind2)) - flag=flag.AND.(tempmat((2*l+1)+ind1,ind2)==0.d0) - flag=flag.AND.(tempmat(ind1,(2*l+1)+ind2)==0.d0) - IF (ind2==(2*l+1)) THEN - ind1=ind1+1 - ind2=1 - ELSE - ind2=ind2+1 - END IF - ENDDO - IF (flag) THEN -C If flag=TRUE (then i=2*l+2), the tempmat matrix is block diagonal in spin with -C the condition block up/up = block down/down. -C The Spin up and Spin down states are not mixed in the basis representation. - reptrans(l,isrt)%ifmixing=.FALSE. -C reptrans%ifmixing = .FALSE. because Spin up and Spin down states are not mixed in the basis representation. -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the basis description is not correct. -C ------------------------- -C - IF (SUM(degrep(1:irep/2)).ne.(2*l+1)) THEN - WRITE(buf,'(a,a,i2,a,i2,a)')'The basis description ', - & 'for isrt = ',isrt,' and l = ',l,' is not recognized.' - CALL printout(0) - WRITE(buf,'(a,a)')'Check the structure of the file ', - & defbasis(isrt)%sourcefile - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - END IF -C --------------------------------------------------------------------------------------- -C - ALLOCATE(reptrans(l,isrt)%transmat(-l:l,-l:l)) - reptrans(l,isrt)%transmat(-l:l,-l:l)= - = tempmat(1:(2*l+1),1:(2*l+1)) - reptrans(l,isrt)%transmat(-l:l,-l:l)= - = TRANSPOSE(CONJG(reptrans(l,isrt)%transmat(-l:l,-l:l))) -C The up/up block is enough to describe the transformation (as for cubic or complex bases) -C reptrans%transmat = inverse(P) = -C inverse(P) is indeed the decomposition of the complex basis in the new basis. - reptrans(l,isrt)%nreps=irep/2 - ALLOCATE(reptrans(l,isrt)%dreps(reptrans(l,isrt)%nreps)) - reptrans(l,isrt)%dreps(1:reptrans(l,isrt)%nreps)= - = degrep(1:reptrans(l,isrt)%nreps) -C reptrans%nreps = the number of ireps in the desired basis for up spin -C reptrans%dreps = table of the size of the different ireps for up spin - ELSE -C If flag=FALSE, either the tempmat matrix either mixes Spin up and Spin down states -C or the representation basis for Spin up and Spin down states differ. -C In this case, it is not possible to reduce the description only to the up/up block. -C The whole tempmat matrix is necessary. -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the basis description is not correct. -C ------------------------- -C - IF (SUM(degrep(1:irep)).ne.(2*(2*l+1))) THEN - WRITE(buf,'(a,a,i2,a,i2,a)')'The basis description ', - & 'for isrt = ',isrt,' and l = ',l,' is not recognized.' - CALL printout(0) - WRITE(buf,'(a,a)')'Check the structure of the file ', - & defbasis(isrt)%sourcefile - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - END IF -C --------------------------------------------------------------------------------------- -C - reptrans(l,isrt)%ifmixing=.TRUE. -C reptrans%ifmixing = .TRUE. because Spin up and Spin down states are mixed in the basis representation. - ALLOCATE(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1))) - reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1))= - = tempmat(1:2*(2*l+1),1:2*(2*l+1)) - reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1))= - = TRANSPOSE(CONJG(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)))) -C In this case, reptrans%transmat is a square matrix which ranges from 1 to 2*(2*l+1). -C reptrans%transmat = inverse(P) = -C inverse(P) is indeed the decomposition of the complex basis in the new basis. - reptrans(l,isrt)%nreps=irep - ALLOCATE(reptrans(l,isrt)%dreps(irep)) - reptrans(l,isrt)%dreps(1:irep)=degrep(1:irep) -C reptrans%nreps = the total number of ireps in the desired basis -C reptrans%dreps = table of the size of the different ireps -C -C Restriction for simplicity in the following (and for physical reasons) : -C a basis with ifmixing=.TRUE. is allowed only if the computation includes SO. - IF (.not.ifSO) THEN - WRITE(buf,'(a,a,i2,a,i2,a)')'The basis description ', - & 'for isrt = ',isrt,' and l = ',l, - & ' mixes up and down states.' - CALL printout(0) - WRITE(buf,'(a,a)')'This option can not ', - & 'be used in a computation without Spin-Orbit.' - CALL printout(0) - WRITE(buf,'(a,a)')'Modify the structure of the file ', - & defbasis(isrt)%sourcefile - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - END IF - END IF - DEALLOCATE(tempmat) - DEALLOCATE(rtrans) - DEALLOCATE(itrans) - ENDIF - ENDDO - CLOSE(iumatfile) -C ---------------------------------------------- -C Case of a wrong definition in the input file : -C ---------------------------------------------- - ELSE -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if the file has not the expected structure. -C ------------------------- -C - WRITE(buf,'(a,i2,a)')'The basis description for isrt = ', - & isrt,' is not recognized.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C --------------------------------------------------------------------------------------- -C - ENDDO -C -C -C =============================================== -C Printing the basis representation information : -C =============================================== -C - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - CALL printout(0) - WRITE(buf,'(a)')'-------------------------------------' - CALL printout(0) - WRITE(buf,'(a,i2,a)')'For the sort ',isrt,' :' - CALL printout(0) - IF (defbasis(isrt)%typebasis(1:7)=='complex') THEN -C ----------------------------------------------- -C Case of a representation in the complex basis : -C ----------------------------------------------- - WRITE(buf,'(a,i2,a)')'The atomic sort', isrt, - & ' is studied in the complex basis representation.' - CALL printout(0) - CALL printout(0) - ELSEIF (defbasis(isrt)%typebasis(1:5)=='cubic') THEN -C --------------------------------------------- -C Case of a representation in the cubic basis : -C --------------------------------------------- - WRITE(buf,'(a,i2,a)')'The atomic sort', isrt, - & ' is studied in the cubic basis representation.' - CALL printout(0) - CALL printout(0) - DO l=0,lmax -C The considered orbital is not included. - IF (lsort(l,isrt)==0) cycle -C Case of the s-electrons - IF (l==0) THEN - WRITE(buf,'(a,a,(F12.6))')'The basis for s-orbital ', - & 'is still',1.d0 - CALL printout(0) - ELSE -C Case of the other orbitals - WRITE(buf,'(a,i2,a,a,a)')'The basis for orbital l=',l, - & ' has the following properties :' - CALL printout(0) - WRITE(buf,'(a,i2)')' - number of ireps : ', - & reptrans(l,isrt)%nreps - CALL printout(0) - WRITE(buf,'(a,14(i2,x))')' - degree of each ireps : ', - & reptrans(l,isrt)%dreps(1:reptrans(l,isrt)%nreps) - CALL printout(0) - WRITE(buf,'(a,a,a)')'The transformation matrix is block', - & ' diagonal in the spin-space. The up/up and down/down', - & ' blocks are the same and defined as :' - CALL printout(0) -C The transformation matrix "P = " is displayed. - DO m=-l,l - WRITE(buf,'(7(2F12.6),x)') - & CONJG(reptrans(l,isrt)%transmat(-l:l,m)) - CALL printout(0) - ENDDO - CALL printout(0) - ENDIF - ENDDO - CALL printout(0) - ELSE -C --------------------------------------------------------- -C Case of a representation defined in an added input file : -C --------------------------------------------------------- - WRITE(buf,'(a,i2,a,a,a)')'The atomic sort', isrt, - & ' is studied in the basis representation', - & ' defined in the file ', - & defbasis(isrt)%sourcefile - CALL printout(0) - CALL printout(0) - DO l=0,lmax -C The considered orbital is not included. - IF (lsort(l,isrt)==0) cycle -C Case of the s-electrons - IF (l==0) THEN - WRITE(buf,'(a,a,(F12.6))')'The basis for s-orbital ', - & 'is still',1.d0 - CALL printout(0) - CALL printout(0) - ELSE -C Case of the other orbitals - WRITE(buf,'(a,i2,a)')'The basis for orbital l=',l, - & ' has the following properties :' - CALL printout(0) - WRITE(buf,'(a,i2)')' - number of ireps : ', - & reptrans(l,isrt)%nreps - CALL printout(0) - WRITE(buf,'(a,14(i2,x))')' - degree of each ireps : ', - & reptrans(l,isrt)%dreps(1:reptrans(l,isrt)%nreps) - CALL printout(0) - IF (reptrans(l,isrt)%ifmixing) THEN -C If the whole matrix description is necessary. - WRITE(buf,'(a,a)')'The transformation matrix mixes', - & ' up and down states in the spin-space' - CALL printout(0) - WRITE(buf,'(a,a)') ' and is defined as : ', - & '[ block 1 | block 2 ] with' - CALL printout(0) - WRITE(buf,'(a,a)') ' ', - & '[ block 3 | block 4 ]' - CALL printout(0) -C The transformation matrix "P = " is displayed. - WRITE(buf,'(a,i2,a)') 'For the block 1 :' - CALL printout(0) - DO m=1,2*l+1 - WRITE(buf,'(7(2F12.6),x)') - & CONJG(reptrans(l,isrt)%transmat(1:(2*l+1),m)) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') 'For the block 2 :' - CALL printout(0) - DO m=1,2*l+1 - WRITE(buf,'(7(2F12.6),x)') - & CONJG(reptrans(l,isrt)%transmat(2*l+2:2*(2*l+1),m)) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') 'For the block 3 :' - CALL printout(0) - DO m=2*l+2,2*(2*l+1) - WRITE(buf,'(7(2F12.6),x)') - & CONJG(reptrans(l,isrt)%transmat(1:(2*l+1),m)) - CALL printout(0) - ENDDO - WRITE(buf,'(a,i2,a)') 'For the block 4 :' - CALL printout(0) - DO m=2*l+2,2*(2*l+1) - WRITE(buf,'(7(2F12.6),x)') - & CONJG(reptrans(l,isrt)% - & transmat(2*l+2:2*(2*l+1),m)) - CALL printout(0) - ENDDO - ELSE -C If the matrix description can be reduced to its up/up block. - WRITE(buf,'(a,a,a)')'The transformation matrix is block', - & ' diagonal in the spin-space. The up/up and down/down', - & ' blocks are the same and defined as :' - CALL printout(0) -C The transformation matrix "P = " is displayed. - DO m=-l,l - WRITE(buf,'(7(2F12.6),x)') - & CONJG(reptrans(l,isrt)%transmat(-l:l,m)) - CALL printout(0) - ENDDO - ENDIF ! End of the ifmixing if-then-else - CALL printout(0) - ENDIF ! End of the l if-then-else - ENDDO ! End of the l loop - CALL printout(0) - ENDIF ! End of the basis description if-then-else - ENDDO ! End of the isrt loop -C - RETURN - END - - - SUBROUTINE set_harm_file(fullpath,filename) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets the fullpath variable %% -C %% Be careful, wien_path is defined in modules.f !!! %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data, ONLY : wien_path - USE prnt - IMPLICIT NONE - CHARACTER(len=*) :: filename, fullpath - CHARACTER(len=*), PARAMETER :: dir='SRC_templates' - INTEGER :: i1, i2, i, i3 -C - i1=LEN_TRIM(wien_path) - i2=LEN(dir) - i3=LEN(filename) - i=i1+i2+i3+2 - IF(LEN(fullpath) < i) THEN - WRITE(buf,'(a)') - & 'Characters required for the basis transformation ', - & ' filename is too long.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - STOP - ENDIF - fullpath=' ' - fullpath(1:i)=wien_path(1:i1)//'/'//dir//'/'//filename(1:i3) - END SUBROUTINE set_harm_file - - - diff --git a/fortran/dmftproj/set_projections.f b/fortran/dmftproj/set_projections.f deleted file mode 100644 index e1c46a7..0000000 --- a/fortran/dmftproj/set_projections.f +++ /dev/null @@ -1,749 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE set_projections(e1,e2) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets up the projection matrices in the energy %% -C %% window [e1,e2]. If proj_mode is 1 or 2 then e1 and e2 are not %% -C %% energies, but directly used as band indices. %% -C %% Two types of projection can be defined : %% -C %% - The projectors for the correlated orbital %% -C %% only. (orb = iatom,is,m) %% -C %% (They are stored in the table pr_crorb) %% -C %% - The Theta projectors for all the orbitals %% -C %% (They are stored in the table pr_orb) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- -C - USE almblm_data - USE common_data - USE prnt - USE projections - USE reps - USE symm - IMPLICIT NONE -C - REAL(KIND=8) :: e1, e2 - INTEGER :: iorb, icrorb, ik, is, ib, m, l, lm, nbbot, nbtop - INTEGER :: isrt, n, ilo, iatom, i, imu, jatom, jorb,isym, jcrorb - LOGICAL :: included,param - COMPLEX(KIND=8), DIMENSION(:), ALLOCATABLE :: coeff - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: tmp_mat - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: tmp_matbis - COMPLEX(KIND=8), DIMENSION(:,:,:), ALLOCATABLE :: tmp_matn -C -C -C - WRITE(buf,'(a)')'Creation of the projectors...' - CALL printout(0) -C -C -C ====================================================================== -C Selection of the bands which lie in the chosen energy window [e1;e2] -C or if proj_mode = [1,2] e1 and e2 are directly used as band indices: -C ====================================================================== -C - - IF(proj_mode.gt.0) THEN -C The same number of bands are included at each k-point - kp(:,:)%included=.TRUE. -C Use directly e1 and e2 as band indices. Set to nbmin or -C nbmax if too small or too large - DO is=1,ns - DO ik=1,nk - IF(e1 > kp(ik,is)%nbmin) THEN - kp(ik,is)%nb_bot=INT(e1) - ELSE - kp(ik,is)%nb_bot=kp(ik,is)%nbmin - ENDIF - IF(e2 < kp(ik,is)%nbmax) THEN - kp(ik,is)%nb_top=INT(e2) - ELSE - kp(ik,is)%nb_top=kp(ik,is)%nbmax - ENDIF - ENDDO - ENDDO - ELSE - kp(:,:)%included=.FALSE. -C the field kp%included = boolean which is .TRUE. when there is at least one band -C at this k-point whose energy eignevalue is in the energy window. - DO is=1,ns - DO ik=1,nk - included=.FALSE. - DO ib=kp(ik,is)%nbmin,kp(ik,is)%nbmax - IF(.NOT.included.AND.kp(ik,is)%eband(ib) > e1.AND. - & kp(ik,is)%eband(ib).LE.e2) THEN -C If the energy eigenvalue E of the band ib at the k-point ik is such that e1 < E =< e2, -C then all the band with ib1>ib must be "included" in the computation and kp%nb_bot is initialized at the value ib. - included=.TRUE. - kp(ik,is)%nb_bot=ib - ELSEIF(included.AND.kp(ik,is)%eband(ib) > e2) THEN -C If the energy eigenvalue E of the current band ib at the k-point ik is such that E > e2 and all the previous -C band are "included", then the field kp%included = .TRUE. and kp%nb_top = ib-1 (the index of the previous band) - kp(ik,is)%nb_top=ib-1 - kp(ik,is)%included=.TRUE. - EXIT -C The loop on the band ib is stopped, since all the bands after ib have an energy > that of ib. - ELSEIF(ib==kp(ik,is)%nbmax.AND.kp(ik,is)%eband(ib) - & > e1.AND.kp(ik,is)%eband(ib).LE.e2) THEN -C If the energy eigenvalue E of the last band ib=kp%nbmax at the k-point ik is such that e1 < E =< e2 and all the -C previous bands are "included", then the band ib must be "included" and kp%nb_bot is initialized at the value kp%nbmax. - kp(ik,is)%nb_top=ib - kp(ik,is)%included=.TRUE. - ENDIF -C If the eigenvalues of the bands at the k-point ik are < e1 and included=.FALSE. -C of if the eigenvalues of the bands at the k-point ik are in the energy window [e1,e2] and included=.TRUE., -C nothing is done... - ENDDO ! End of the ib loop -C If all the eigenvalues of the bands at the k-point ik are not in the window, -C then kp%included remains at the value .FALSE. and the field kp%nb_top and kp%nb_bot are set to 0 - IF (.not.kp(ik,is)%included) THEN - kp(ik,is)%nb_bot=0 - kp(ik,is)%nb_top=0 - ENDIF - ENDDO ! End of the ik loop - ENDDO ! End of the is loop - ENDIF -C --------------------------------------------------------------------------------------- -C Checking of the input files if spin-polarized inputs and SO is taken into account: -C There should not be any difference between up and dn limits for each k-point. -C Printing a Warning if this is not the case. -C ------------------- -C - IF (ifSP.AND.ifSO) THEN - param=.TRUE. - DO ik=1,nk - param=param.AND.(kp(ik,1)%included.eqv.kp(ik,2)%included) - param=param.AND.(kp(ik,1)%nb_bot==kp(ik,2)%nb_bot) - param=param.AND.(kp(ik,1)%nb_top==kp(ik,2)%nb_top) - IF (.not.param) EXIT -C For a valid compoutation, the same k-points must be included for up and dn states, -C and the upper and lower limits must be the same in both case. - ENDDO - IF (.not.param) THEN - WRITE(buf,'(a,a)')'A Spin-orbit computation for this', - & ' compound is not possible with these input files.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF - ENDIF -C --------------------------------------------------------------------------------------- -C -C -C ================================================================== -C Orthonormalization of the radial wave functions for each orbital : -C ================================================================== -C -C This step is essential for setting the Theta projectors. - IF(.NOT.ALLOCATED(norm_radf)) THEN - ALLOCATE(norm_radf(norb)) -C norm_radf is a table of "ortfunc" elements, its size ranges from 1 to norb. - DO iorb=1,norb - l=orb(iorb)%l - isrt=orb(iorb)%sort - norm_radf(iorb)%n=nLO(l,isrt)+2 - n=norm_radf(iorb)%n - ALLOCATE(norm_radf(iorb)%s12(n,n,ns)) -C norm_radf%n = size of the matrix s12 -C norm_radf%s12 = matrix of size n*n (one for spin up, one for spin down, if necessary) - DO is=1,ns - norm_radf(iorb)%s12(1:n,1:n,is)=0d0 - norm_radf(iorb)%s12(1,1,is)=1d0 - norm_radf(iorb)%s12(2,2,is)=u_dot_norm(l,isrt,is) -C Initialization of the matrix norm_radf%s12 for each orbital (l,isrt). -C We remind tha it is assumed that nLO has the value 0 or 1 only !! - DO ilo=1,nLO(l,isrt) - norm_radf(iorb)%s12(2+ilo,2+ilo,is)=1d0 - norm_radf(iorb)%s12(2+ilo,1,is)= - = ovl_LO_u(ilo,l,isrt,is) - norm_radf(iorb)%s12(1,2+ilo,is)= - = ovl_LO_u(ilo,l,isrt,is) - norm_radf(iorb)%s12(2+ilo,2,is)= - = ovl_LO_udot(ilo,l,isrt,is) - norm_radf(iorb)%s12(2,2+ilo,is)= - = ovl_LO_udot(ilo,l,isrt,is) - ENDDO -C Computation of the square root of norm_radf: - CALL orthogonal_r(norm_radf(iorb)% - & s12(1:n,1:n,is),n,.FALSE.) -C the field norm_radf%s12 is finally the C matrix described in the tutorial (or in equation (3.63) in my thesis) - ENDDO - ENDDO - ENDIF -C -C ===================================== -C Creation of the projection matrices : -C ===================================== -C - IF(.NOT.ALLOCATED(pr_orb)) THEN - ALLOCATE(pr_crorb(ncrorb,nk,ns)) - ALLOCATE(pr_orb(norb,nk,ns)) - ENDIF -C pr_crorb = table of "proj_mat" elements for the correlated orbitals (size from 1 to ncrorb, from 1 to nk, from 1 to ns) -C pr_orb = table of "proj_mat_n" elements for all the orbitals (size from 1 to norb, from 1 to nk, from 1 to ns) - DO is=1,ns - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE -C ------------------------------------------------ -C Wannier Projectors for the correlated orbitals : -C ------------------------------------------------ - DO icrorb=1,ncrorb - l=crorb(icrorb)%l - iatom=crorb(icrorb)%atom - isrt=crorb(icrorb)%sort -C Case of l=0 : -C ------------- - IF (l==0) THEN - IF(ALLOCATED(pr_crorb(icrorb,ik,is)%mat)) THEN - DEALLOCATE(pr_crorb(icrorb,ik,is)%mat) - ENDIF - ALLOCATE(pr_crorb(icrorb,ik,is)% - % mat(1,kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) -C pr_crorb%mat = the projection matrix with 1 line and (nb_top-nb_bot) columns - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - pr_crorb(icrorb,ik,is)%mat(1,ib)= - = kp(ik,is)%Alm(1,iatom,ib) - DO ilo=1,nLO(l,isrt) - pr_crorb(icrorb,ik,is)%mat(1,ib)= - = pr_crorb(icrorb,ik,is)%mat(1,ib)+ - + kp(ik,is)%Clm(ilo,1,iatom,ib)* - * ovl_LO_u(ilo,l,isrt,is) - ENDDO ! End of the ilo loop - ENDDO ! End of the ib loop -C prcrorb(icrorb,ik,is)%mat(1,ib)= = Alm+Clm*ovl_LO_u -C -C Case of any other l : -C --------------------- - ELSE - lm=l*l -C Since the correlated orbital is the l orbital, the elements range from l*l+1 to (l+1)^2 -C the sum from 0 to (l-1) of m (from -l to l) is l^2. - IF(ALLOCATED(pr_crorb(icrorb,ik,is)%mat)) THEN - DEALLOCATE(pr_crorb(icrorb,ik,is)%mat) - ENDIF - ALLOCATE(pr_crorb(icrorb,ik,is)% - % mat(-l:l,kp(ik,is)%nb_bot:kp(ik,is)%nb_top)) -C pr_crorb%mat = the projection matrix with (2*l+1) lines and (nb_top-nb_bot) columns - DO m=-l,l - lm=lm+1 - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - pr_crorb(icrorb,ik,is)%mat(m,ib)= - = kp(ik,is)%Alm(lm,iatom,ib) - DO ilo=1,nLO(l,isrt) - pr_crorb(icrorb,ik,is)%mat(m,ib)= - = pr_crorb(icrorb,ik,is)%mat(m,ib)+ - + kp(ik,is)%Clm(ilo,lm,iatom,ib)* - * ovl_LO_u(ilo,l,isrt,is) - ENDDO ! End of the ilo loop - ENDDO ! End of the ib loop - ENDDO ! End of the m loop -C prcrorb(icrorb,ik,is)%mat(m,ib)= = Alm+Clm*ovl_LO_u - ENDIF ! End of the if l=0 if-then-else - ENDDO ! End of the icrorb loop -C -C --------------------------------------- -C Theta Projectors for all the orbitals : -C --------------------------------------- - DO iorb=1,norb - l=orb(iorb)%l - n=norm_radf(iorb)%n - iatom=orb(iorb)%atom -C Case of l=0 : -C ------------- - IF (l==0) THEN - IF(ALLOCATED(pr_orb(iorb,ik,is)%matn)) THEN - DEALLOCATE(pr_orb(iorb,ik,is)%matn) - ENDIF - ALLOCATE(pr_orb(iorb,ik,is)% - % matn(1,kp(ik,is)%nb_bot:kp(ik,is)%nb_top,n)) - ALLOCATE(coeff(1:n)) -C pr_orb%matn = the projection matrix with 1 line and (nb_top-nb_bot) columns for the n (size of s12) coefficients -C coeff = table of size n which will contain the decomposition of the Bloch state |psi_ik,ib,is> -C as in equation 22 of the tutorial (Alm, Blm, and Clm ) - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - coeff(1)=kp(ik,is)%Alm(1,iatom,ib) - coeff(2)=kp(ik,is)%Blm(1,iatom,ib) - coeff(3:n)=kp(ik,is)%Clm(1:n-2,1,iatom,ib) - coeff=MATMUL(coeff,norm_radf(iorb)%s12(1:n,1:n,is)) -C coeff = coefficients c_(j,lm) of the decomposition of the state |psi> in the orthogonalized basis |phi_j> -C as defined in the tutorial (equation 25) - pr_orb(iorb,ik,is)%matn(1,ib,1:n)=coeff(1:n) - ENDDO - DEALLOCATE(coeff) -C pr_orb(iorb,ik,is)%matn(m,ib,1:n) is then the Theta projector as defined in equation 26 of the tutorial. -C -C Case of any other l : -C --------------------- - ELSE - lm=l*l -C As the orbital is the l orbital, the elements range from l*l+1 to (l+1)^2 -C the sum from 0 to (l-1) of m (from -l to l) is l^2. - IF(ALLOCATED(pr_orb(iorb,ik,is)%matn)) THEN - DEALLOCATE(pr_orb(iorb,ik,is)%matn) - ENDIF - ALLOCATE(pr_orb(iorb,ik,is)% - % matn(-l:l,kp(ik,is)%nb_bot:kp(ik,is)%nb_top,n)) - ALLOCATE(coeff(1:n)) -C pr_orb%matn = the projection matrix with (2*l+1) lines and (nb_top-nb_bot) columns for the n (size of s12) coefficients -C coeff = table of size n which will contain the decomposition of the Bloch state |psi_ik,ib,is> -C as in equation 22 of the tutorial (Alm, Blm, and Clm ) - DO m=-l,l - lm=lm+1 - DO ib=kp(ik,is)%nb_bot,kp(ik,is)%nb_top - coeff(1)=kp(ik,is)%Alm(lm,iatom,ib) - coeff(2)=kp(ik,is)%Blm(lm,iatom,ib) - coeff(3:n)=kp(ik,is)%Clm(1:n-2,lm,iatom,ib) - coeff=MATMUL(coeff, - & norm_radf(iorb)%s12(1:n,1:n,is)) -C coeff = coefficients c_(j,lm) of the decomposition of the state |psi> in the orthogonalized basis |phi_j> -C as defined in the tutorial (equation 25) - pr_orb(iorb,ik,is)%matn(m,ib,1:n)=coeff(1:n) - ENDDO - ENDDO ! End of the m loop - DEALLOCATE(coeff) -C pr_orb(iorb,ik,is)%matn(m,ib,1:n) is then the Theta projector as defined in equation 26 of the tutorial. - ENDIF ! End of the if l=0 if-then-else - ENDDO ! End of the iorb loop -C - ENDDO ! End of the loop on ik - ENDDO ! End of the loop on is -C -C -C ========================================================================== -C Multiplication of the projection matrices by the local rotation matrices : -C ========================================================================== -C -C ------------------------------------------------ -C Wannier Projectors for the correlated orbitals : -C ------------------------------------------------ -C - DO jcrorb=1,ncrorb - jatom=crorb(jcrorb)%atom - isrt=crorb(jcrorb)%sort - l=crorb(jcrorb)%l -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s orbital, no multiplication is needed, since the matrix representation of any rotation -C (and thus Rloc) is always 1. - DO ik=1,nk - DO is=1,ns -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - nbtop=kp(ik,is)%nb_top - nbbot=kp(ik,is)%nb_bot - IF(ALLOCATED(pr_crorb(jcrorb,ik,is)%mat_rep)) THEN - DEALLOCATE(pr_crorb(jcrorb,ik,is)%mat_rep) - ENDIF - ALLOCATE(pr_crorb(jcrorb,ik,is) - & %mat_rep(1,nbbot:nbtop)) - pr_crorb(jcrorb,ik,is)%mat_rep(1,nbbot:nbtop)= - = pr_crorb(jcrorb,ik,is)%mat(1,nbbot:nbtop) -C As a result, prcrorb%matrep = prcrorb%mat - ENDDO - ENDDO -C -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) -C --------------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C If this option is used, then ifSO=.TRUE. (because of the restriction in set_ang_trans.f) -C Moreover ifSP=.TRUE. (since ifSO => ifSP in this version) -C As a result, we know that nb_bot(up)=nb_bot(dn) and nb_top(up)=nb_top(dn) - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top -C In this case, the projection matrix will be stored in prcrorb%matrep with is=1. - IF(ALLOCATED(pr_crorb(jcrorb,ik,1)%mat_rep)) THEN - DEALLOCATE(pr_crorb(jcrorb,ik,1)%mat_rep) - ENDIF - ALLOCATE(pr_crorb(jcrorb,ik,1)% - % mat_rep(1:2*(2*l+1),nbbot:nbtop)) -C The element prcrorb%matrep for is=2 is set to 0, since all the matrix will be stored in the matrix matrep for is=1 - IF(.not.ALLOCATED(pr_crorb(jcrorb,ik,2)%mat_rep)) THEN - ALLOCATE(pr_crorb(jcrorb,ik,2)%mat_rep(1,1)) - pr_crorb(jcrorb,ik,2)%mat_rep(1,1)=0.d0 - ENDIF -C Creation of a matrix tmp_mat which "concatenates" up and dn parts of pr_crorb. - ALLOCATE(tmp_mat(1:2*(2*l+1),nbbot:nbtop)) - tmp_mat(1:(2*l+1),nbbot:nbtop)= - = pr_crorb(jcrorb,ik,1)%mat(-l:l,nbbot:nbtop) -C The first (2l+1) lines are the spin-up part of the projection matrix prcrorb%mat. -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if there is no dn part of pr_orb. -C ------------------------- -C - IF(.not.ifSP) THEN - WRITE(buf,'(a,a,i2,a)')'The projectors on ', - & 'the dn states are required for isrt = ',isrt, - & ' but there is no spin-polarized input files.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C --------------------------------------------------------------------------------------- -C -C The last (2l+1) lines are the spin-dn part of the projection matrix prcrorb%mat. - tmp_mat((2*l+2):2*(2*l+1),nbbot:nbtop)= - = pr_crorb(jcrorb,ik,2)%mat(-l:l,nbbot:nbtop) -C -C Multiplication by the local rotation matrix ; Up and dn parts are treated independently -C since in lapw2 (-alm) the coefficients Alm, Blm and Clm were calculated in the local frame -C but without taking into account the spinor-rotation matrix. - ALLOCATE(tmp_matbis(1:(2*l+1),nbbot:nbtop)) - tmp_matbis(1:(2*l+1),nbbot:nbtop)= - = tmp_mat(1:(2*l+1),nbbot:nbtop) - CALL rot_projectmat(tmp_matbis, - & l,nbbot,nbtop,jatom,isrt) - tmp_mat(1:(2*l+1),nbbot:nbtop)= - = tmp_matbis(1:(2*l+1),nbbot:nbtop) - tmp_matbis(1:(2*l+1),nbbot:nbtop)= - = tmp_mat(2*l+2:2*(2*l+1),nbbot:nbtop) - CALL rot_projectmat(tmp_matbis, - & l,nbbot,nbtop,jatom,isrt) - tmp_mat(2*l+2:2*(2*l+1),nbbot:nbtop)= - = tmp_matbis(1:(2*l+1),nbbot:nbtop) - DEALLOCATE(tmp_matbis) -C -C Putting pr_crorb in the desired basis associated to (l,isrt) -C - pr_crorb(jcrorb,ik,1)%mat_rep(1:2*(2*l+1),nbbot:nbtop)= - = MATMUL(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)), - & tmp_mat(1:2*(2*l+1),nbbot:nbtop)) -C pr_crorb%mat_rep = proj_{new_i} = reptrans*proj_{lm} = *proj_{lm} - DEALLOCATE(tmp_mat) - ENDDO ! End of the ik loop -C -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) -C -------------------------------------------------------------------------------------------- - ELSE - DO ik=1,nk - DO is=1,ns -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE -C In this case, nb_top(up) and nb_bot(up) can differ from nb_top(dn) and nb_bot(dn) - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top - IF(ALLOCATED(pr_crorb(jcrorb,ik,is)%mat_rep)) THEN - DEALLOCATE(pr_crorb(jcrorb,ik,is)%mat_rep) - ENDIF - ALLOCATE(pr_crorb(jcrorb,ik,is) - & %mat_rep(-l:l,nbbot:nbtop)) - pr_crorb(jcrorb,ik,is)%mat_rep(-l:l,nbbot:nbtop)= - = pr_crorb(jcrorb,ik,is)%mat(-l:l,nbbot:nbtop) -C -C Multiplication by the local rotation matrix -C since in lapw2 (-alm) the coefficients Alm, Blm and Clm were calculated in the local frame - CALL rot_projectmat(pr_crorb(jcrorb,ik,is) - & %mat_rep(-l:l,nbbot:nbtop),l,nbbot,nbtop,jatom,isrt) -C -C Putting pr_crorb in the desired basis associated to (l,isrt) - pr_crorb(jcrorb,ik,is)%mat_rep(-l:l,nbbot:nbtop)= - = MATMUL(reptrans(l,isrt)%transmat(-l:l,-l:l), - & pr_crorb(jcrorb,ik,is)%mat_rep(-l:l,nbbot:nbtop)) -C pr_crorb%mat_rep = proj_{new_i} = reptrans*proj_{lm} = *proj_{lm} - ENDDO ! End of the is loop - ENDDO ! End of the ik loop - ENDIF ! End of the if mixing if-then-else - ENDDO ! End of the jcrorb loop -C -C --------------------------------------- -C Theta Projectors for all the orbitals : -C --------------------------------------- -C - DO jorb=1,norb - jatom=orb(jorb)%atom - isrt=orb(jorb)%sort - n=norm_radf(jorb)%n - l=orb(jorb)%l -C -C The case l=0 is a particular case of "non-mixing" basis. -C -------------------------------------------------------- - IF (l==0) THEN -C For the s orbital, no multiplication is needed, since the matrix representation of any rotation -C (and therefore Rloc) is always 1. - DO ik=1,nk - DO is=1,ns -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE - nbtop=kp(ik,is)%nb_top - nbbot=kp(ik,is)%nb_bot - IF(ALLOCATED(pr_orb(jorb,ik,is)%matn_rep)) THEN - DEALLOCATE(pr_orb(jorb,ik,is)%matn_rep) - ENDIF - ALLOCATE(pr_orb(jorb,ik,is)%matn_rep - & (1,nbbot:nbtop,1:n)) - pr_orb(jorb,ik,is)%matn_rep(1,nbbot:nbtop,1:n)= - = pr_orb(jorb,ik,is)%matn(1,nbbot:nbtop,1:n) -C As a result, prorb%matnrep = prorb%matn - ENDDO - ENDDO -C -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) -C --------------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C If this option is used, then ifSO=.TRUE. (restriction in set_ang_trans.f) -C Moreover ifSP=.TRUE. (since ifSO => ifSP) -C As a result, we know that nb_bot(up)=nb_bot(dn) and nb_top(up)=nb_top(dn) - DO ik=1,nk -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,1)%included) CYCLE - nbbot=kp(ik,1)%nb_bot - nbtop=kp(ik,1)%nb_top -C In this case, the projection matrix will be stored in prorb%matnrep with is=1. - IF(ALLOCATED(pr_orb(jorb,ik,1)%matn_rep)) THEN - DEALLOCATE(pr_orb(jorb,ik,1)%matn_rep) - ENDIF - ALLOCATE(pr_orb(jorb,ik,1)% - % matn_rep(1:2*(2*l+1),nbbot:nbtop,1:n)) -C The element prorb%matnrep for is=2 is set to 0, since all the matrix will be stored in the matrix matnrep for is=1 - IF(.not.ALLOCATED(pr_orb(jorb,ik,2)%matn_rep)) THEN - ALLOCATE(pr_orb(jorb,ik,2)%matn_rep(1,1,1)) - pr_orb(jorb,ik,2)%matn_rep(1,1,1)=0.d0 - ENDIF -C Creation of a matrix tmp_matn which "concatenates" up and dn parts of pr_orb - ALLOCATE(tmp_matn(1:2*(2*l+1),nbbot:nbtop,1:n)) - tmp_matn(1:(2*l+1),nbbot:nbtop,1:n)= - = pr_orb(jorb,ik,1)%matn(-l:l,nbbot:nbtop,1:n) -C The first (2l+1) lines are the spin-up part of the projection matrix prorb%matn. -C -C --------------------------------------------------------------------------------------- -C Interruption of the prgm if there is no dn part of pr_orb. -C ------------------------- -C - IF(.not.ifSP) THEN - WRITE(buf,'(a,a,i2,a)')'The projectors on ', - & 'the down states are required for isrt = ',isrt, - & ' but there is no spin-polarized input files.' - CALL printout(0) - WRITE(buf,'(a)')'END OF THE PRGM' - CALL printout(0) - STOP - ENDIF -C --------------------------------------------------------------------------------------- -C -C The last (2l+1) lines are the spin-dn part of the projection matrix prorb%matn. - tmp_matn(2*l+2:2*(2*l+1),nbbot:nbtop,1:n)= - = pr_orb(jorb,ik,2)%matn(-l:l,nbbot:nbtop,1:n) -C - DO i=1,n -C Multiplication by the local rotation matrix ; Up and dn parts are treated independently -C since in lapw2 (-alm) the coefficients Alm, Blm and Clm were calculated in the local frame -C but without taking into account the spinor-rotation matrix. - ALLOCATE(tmp_matbis(1:(2*l+1),nbbot:nbtop)) - tmp_matbis(1:(2*l+1),nbbot:nbtop)= - = tmp_matn(1:(2*l+1),nbbot:nbtop,i) - CALL rot_projectmat(tmp_matbis, - & l,nbbot,nbtop,jatom,isrt) - tmp_matn(1:(2*l+1),nbbot:nbtop,i)= - = tmp_matbis(1:(2*l+1),nbbot:nbtop) - tmp_matbis(1:(2*l+1),nbbot:nbtop)= - = tmp_matn(2*l+2:2*(2*l+1),nbbot:nbtop,i) - CALL rot_projectmat(tmp_matbis, - & l,nbbot,nbtop,jatom,isrt) - tmp_matn(2*l+2:2*(2*l+1),nbbot:nbtop,i)= - = tmp_matbis(1:(2*l+1),nbbot:nbtop) - DEALLOCATE(tmp_matbis) -C Putting pr_orb in the desired basis associated to (l,isrt) - pr_orb(jorb,ik,1)%matn_rep - & (1:2*(2*l+1),nbbot:nbtop,i)= - = MATMUL(reptrans(l,isrt)% - & transmat(1:2*(2*l+1),1:2*(2*l+1)), - & tmp_matn(1:2*(2*l+1),nbbot:nbtop,i)) -C pr_orb%matn_rep = proj_{new_i} = reptrans*proj_{lm} = *proj_{lm} - ENDDO ! End of the i-loop - DEALLOCATE(tmp_matn) - ENDDO ! End of the ik loop -C -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) -C -------------------------------------------------------------------------------------------- - ELSE - DO ik=1,nk - DO is=1,ns -C Only the k-points with inlcuded bands are considered for the projectors. - IF(.NOT.kp(ik,is)%included) CYCLE -C In this case, nb_top(up) and nb_bot(up) can differ from nb_top(dn) and nb_bot(dn) - nbbot=kp(ik,is)%nb_bot - nbtop=kp(ik,is)%nb_top - IF(ALLOCATED(pr_orb(jorb,ik,is)%matn_rep)) THEN - DEALLOCATE(pr_orb(jorb,ik,is)%matn_rep) - ENDIF - ALLOCATE(pr_orb(jorb,ik,is)% - & matn_rep(-l:l,nbbot:nbtop,1:n)) - pr_orb(jorb,ik,is)%matn_rep(-l:l,nbbot:nbtop,1:n)= - = pr_orb(jorb,ik,is)%matn(-l:l,nbbot:nbtop,1:n) -C - DO i=1,n -C Multiplication by the local rotation matrix -C since in lapw2 (-alm) the coefficients Alm, Blm and Clm were calculated in the local frame - CALL rot_projectmat(pr_orb(jorb,ik,is) - & %matn_rep(-l:l,nbbot:nbtop,i), - & l,nbbot,nbtop,jatom,isrt) -C Putting pr_orb in the desired basis associated to (l,isrt) - pr_orb(jorb,ik,is)%matn_rep(-l:l,nbbot:nbtop,i)= - = MATMUL(reptrans(l,isrt)%transmat(-l:l,-l:l), - & pr_orb(jorb,ik,is)%matn_rep(-l:l,nbbot:nbtop,i)) -C pr_orb%matn_rep = proj_{new_i} = reptrans*proj_{lm} = *proj_{lm} - ENDDO ! End of the i loop - ENDDO ! End of the is loop - ENDDO ! End of the ik loop - ENDIF ! End of the if mixing if-then-else - ENDDO ! End of the jorb loop -C -C -C ============================================================================= -C Printing the projectors with k-points 1 and nk in the file fort.18 for test : -C ============================================================================= - DO icrorb=1,ncrorb - iatom=crorb(icrorb)%atom - isrt=crorb(icrorb)%sort - l=crorb(icrorb)%l - WRITE(18,'()') - WRITE(18,'(a,i4)') 'icrorb = ', icrorb - WRITE(18,'(a,i4,a,i4)') 'isrt = ', isrt, ' l = ', l - IF (l==0) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,1,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,nk,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ELSEIF (reptrans(l,isrt)%ifmixing) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ELSE - WRITE(18,'(a,i4)') 'ik = ', 1 - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,1,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,1,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_crorb(icrorb,nk,1)%mat_rep(:,ib) - IF (ifSP) - & WRITE(18,*) pr_crorb(icrorb,nk,2)%mat_rep(:,ib) - WRITE(18,'()') - ENDDO - ENDIF - ENDDO -C - DO iorb=1,norb - iatom=orb(iorb)%atom - isrt=orb(iorb)%sort - l=orb(iorb)%l - n=norm_radf(iorb)%n - WRITE(18,'()') - WRITE(18,'(a,i4)') 'iorb = ', iorb - WRITE(18,'(a,i4,a,i4)') 'isrt = ', isrt, ' l = ', l - IF (l==0) THEN - WRITE(18,'(a,i4)') 'ik = ', 1 - DO i=1,n - WRITE(18,'(i4)') i - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_orb(iorb,1,1)%matn_rep(:,ib,i) - IF (ifSP) - & WRITE(18,*) pr_orb(iorb,1,2)%matn_rep(:,ib,i) - WRITE(18,'()') - ENDDO - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO i=1,n - WRITE(18,'(i4)') i - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_orb(iorb,nk,1)%matn_rep(:,ib,i) - IF (ifSP) - & WRITE(18,*) pr_orb(iorb,nk,2)%matn_rep(:,ib,i) - WRITE(18,'()') - ENDDO - ENDDO - ELSEIF(reptrans(l,isrt)%ifmixing) THEN - DO i=1,n - WRITE(18,'(i4)') i - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_orb(iorb,1,1)%matn_rep(:,ib,i) - WRITE(18,'()') - ENDDO - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO i=1,n - WRITE(18,'(i4)') i - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_orb(iorb,nk,1)%matn_rep(:,ib,i) - WRITE(18,'()') - ENDDO - ENDDO - ELSE - DO i=1,n - WRITE(18,'(i4)') i - DO ib = kp(1,1)%nb_bot,kp(1,1)%nb_top - WRITE(18,*) pr_orb(iorb,1,1)%matn_rep(:,ib,i) - IF (ifSP) - & WRITE(18,*) pr_orb(iorb,1,2)%matn_rep(:,ib,i) - WRITE(18,'()') - ENDDO - ENDDO - WRITE(18,'(a,i4)') 'ik = ', nk - DO i=1,n - WRITE(18,'(i4)') i - DO ib = kp(nk,1)%nb_bot,kp(nk,1)%nb_top - WRITE(18,*) pr_orb(iorb,nk,1)%matn_rep(:,ib,i) - IF (ifSP) - & WRITE(18,*) pr_orb(iorb,nk,2)%matn_rep(:,ib,i) - WRITE(18,'()') - ENDDO - ENDDO - ENDIF - ENDDO -C - RETURN - END - diff --git a/fortran/dmftproj/set_rotloc.f b/fortran/dmftproj/set_rotloc.f deleted file mode 100644 index d2cbec1..0000000 --- a/fortran/dmftproj/set_rotloc.f +++ /dev/null @@ -1,368 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE set_rotloc -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets up the Global->local coordinates %% -C %% rotational matrices for each atom of the system. %% -C %% These matrices will be used to create the projectors. %% -C %% (They are the SR matrices defined in the tutorial file.) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data - USE reps - USE symm - USE prnt - IMPLICIT NONE - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: tmp_rot, spinrot - REAL(KIND=8) :: alpha, beta, gama, factor - INTEGER :: iatom, jatom, imu, isrt - INTEGER :: is, is1, isym, l, lm - INTEGER :: ind1, ind2, inof1, inof2 - COMPLEX(KIND=8) :: ephase -C -C ==================================================== -C Multiplication by an S matrix for equivalent sites : -C ==================================================== -C Up to now, rotloc is the rotloc matrix (from Global to local coordinates rotation : (rotloc)_ij = ) -C The matrix S to go from the representative atom of the sort to another one must be introduced. That's what is done here-after. - DO isrt=1,nsort - iatom=SUM(nmult(0:isrt-1))+1 - DO imu=1,nmult(isrt) - jatom=iatom+imu-1 - DO isym=1,nsym -C If the symmetry operation isym transforms the representative atom iatom in the jatom, -C the matrix rotloc is multiplied by the corresponding srot matrix, for each orbital number l. -C if R[isym](iatom) = jatom, rotloc is multiplied by R[isym] and Rloc is finally R[isym] X rotloc = - IF(srot(isym)%perm(iatom)==jatom) THEN - WRITE(17,*) ' For jatom = ',jatom, ', isym =', isym - rotloc(jatom)%srotnum=isym -C Calculation of krotm and iprop. - rotloc(jatom)%krotm(1:3,1:3)= - = MATMUL(srot(isym)%krotm(1:3,1:3), - & rotloc(jatom)%krotm(1:3,1:3)) - rotloc(jatom)%iprop=rotloc(jatom)%iprop* - * srot(isym)%iprop -C Evaluation of the Euler angles of the final operation Rloc - CALL euler(TRANSPOSE(rotloc(jatom)%krotm(1:3,1:3)), - & alpha,beta,gama) -C According to Wien convention, euler takes in argument the transpose -C of the matrix rotloc(jatom)%krotm to give a,b anc c of rotloc(jatom). - rotloc(jatom)%a=alpha - rotloc(jatom)%b=beta - rotloc(jatom)%g=gama -C -C ============================================================================================================= -C Calculation of the rotational matrices and evaluation of the fields timeinv and phase for the Rloc matrices : -C ============================================================================================================= - IF(ifSP.AND.ifSO) THEN -C No time reversal operation is applied to rotloc (alone). If a time reversal operation must be applied, -C it comes from the symmetry operation R[isym]. That is why the field timeinv is the same as the one from srot. - rotloc(jatom)%timeinv=srot(isym)%timeinv - rotloc(jatom)%phase=0.d0 - DO l=1,lmax - ALLOCATE(tmp_rot(1:2*(2*l+1),1:2*(2*l+1))) - tmp_rot=0.d0 -C Whatever the value of beta (0 or Pi), the spinor rotation matrix of isym is block-diagonal. -C because the time-reversal operation have been applied if necessary. - factor=srot(isym)%phase/2.d0 - ephase=EXP(CMPLX(0.d0,factor)) -C We remind that the field phase is (g-a) if beta=Pi. As a result, ephase = exp(+i(g-a)/2) = -exp(+i(alpha-gamma)/2) -C We remind that the field phase is (a+g) if beta=0. As a result, ephase = exp(+i(a+g)/2)=-exp(-i(alpha+gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. -C Up/up block : - tmp_rot(1:2*l+1,1:2*l+1)=ephase* - & srot(isym)%rotl(-l:l,-l:l,l) -C Dn/dn block : - ephase=CONJG(ephase) -C now, ephase = exp(+i(a-g)/2) = -exp(-i(alpha-gamma)/2) if beta=Pi -C now, ephase = exp(-i(a+g)/2) = -exp(+i(alpha+gamma)/2) if beta=0 - tmp_rot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - & ephase*srot(isym)%rotl(-l:l,-l:l,l) - IF (rotloc(jatom)%timeinv) THEN -C In this case, the time reversal operator was applied to srot. - rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)= - & MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)),CONJG( - & rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l))) -C rotloc(jatom)%rotl now contains D(Rloc) = D(R[isym])*transpose[D(rotloc)]. - ELSE -C In this case, no time reversal operator was applied to srot. - rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)= - & MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)) -C rotloc(jatom)%rotl now contains D(Rloc) = D(R[isym])*D(rotloc). - ENDIF - DEALLOCATE(tmp_rot) - ENDDO - ELSE -C Calculation of the rotational matrices associated to Rloc - ALLOCATE(tmp_rot(1:2*lmax+1,1:2*lmax+1)) - DO l=1,lmax -C Use of the subroutine dmat to compute the rotational matrix -C associated to the Rloc operation in a (2*l+1) space : - tmp_rot=0.d0 - CALL dmat(l,rotloc(jatom)%a,rotloc(jatom)%b, - & rotloc(jatom)%g, - & REAL(rotloc(jatom)%iprop,KIND=8),tmp_rot,2*lmax+1) - rotloc(jatom)%rotl(-l:l,-l:l,l)= - = tmp_rot(1:2*l+1,1:2*l+1) -C rotloc(jatom)%rotl = table of the rotational matrices of the symmetry operation -C for the different l orbital (from 1 to lmax), in the usual complex basis : dmat = D(R[isym])_l -C rotloc(jatom)%rotl = D(Rloc[jatom])_{lm} - ENDDO - DEALLOCATE(tmp_rot) - ENDIF ! End of the "ifSO-ifSP" if-then-else -C - EXIT -C Only one symmetry operation is necessary to be applied to R to get the complete rotloc matrix. -C This EXIT enables to leave the loop as soon as a symmetry operation which transforms the representative atom in jatom is found. - ENDIF ! End of the "perm" if-then-else - ENDDO ! End of the isym loop -C -C -C =========================================================== -C Computation of the rotational matrices in each sort basis : -C =========================================================== - ALLOCATE(rotloc(jatom)%rotrep(lmax)) -C -C Initialization of the rotloc(jatom)%rotrep field = D(Rloc)_{new_i} -C This field is a table of size lmax which contains the rotloc matrices -C in the representation basis associated to each included orbital of the jatom. - DO l=1,lmax - ALLOCATE(rotloc(jatom)%rotrep(l)%mat(1,1)) - rotloc(jatom)%rotrep(l)%mat(1,1)=0.d0 - ENDDO -C -C Computation of the elements 'mat' in rotloc(jatom)%rotrep(l) - DO l=1,lmax -C The considered orbital is not included, hence no computation - IF (lsort(l,isrt)==0) cycle -C The considered orbital is included - IF (ifSP.AND.ifSO) THEN -C In this case, the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) -C -------------------------------------------------------------------------------------------------------------- - DEALLOCATE(rotloc(jatom)%rotrep(l)%mat) - ALLOCATE(rotloc(jatom)%rotrep(l)%mat - & (1:2*(2*l+1),1:2*(2*l+1))) - ALLOCATE(tmp_rot(1:2*(2*l+1),1:2*(2*l+1))) -C Computation of rotloc(jatom)%rotrep(l)%mat - IF (reptrans(l,isrt)%ifmixing) THEN -C In this case, the basis representation requires a complete spinor rotation approach too. - IF(rotloc(jatom)%timeinv) THEN - tmp_rot(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)) - rotloc(jatom)%rotrep(l)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)))) -C Since the operation is antilinear, the field rotloc(jatom)%rotrep(l)%mat = (reptrans)*spinrot(l)*conjugate(inverse(reptrans)) -C rotloc(jatom)%rotrep(l)%mat = D(Rloc)_{new_i} = D(Rloc)_{lm} []^* -C which is exactly the expression of the spinor rotation matrix in the new basis. - ELSE - tmp_rot(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)) - rotloc(jatom)%rotrep(l)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(CONJG(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1))))) -C Since the operation is linear, the field rotloc(jatom)%rotrep(l)%mat = (reptrans)*spinrot(l)*inverse(reptrans) -C rotloc(jatom)%rotrep(l)%mat = D(Rloc)_{new_i} = D(Rloc)_{lm} -C which is exactly the expression of the spinor rotation matrix in the new basis. - ENDIF - ELSE -C In this case, the basis representation is reduced to the up/up block and must be extended. - ALLOCATE(spinrot(1:2*(2*l+1),1:2*(2*l+1))) - spinrot(1:2*(2*l+1),1:2*(2*l+1))=0.d0 - spinrot(1:2*l+1,1:2*l+1)= - & reptrans(l,isrt)%transmat(-l:l,-l:l) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - & reptrans(l,isrt)%transmat(-l:l,-l:l) - IF(rotloc(jatom)%timeinv) THEN - tmp_rot(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & spinrot(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)) - rotloc(jatom)%rotrep(l)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(spinrot(1:2*(2*l+1),1:2*(2*l+1)))) -C Since the operation is antilinear, the field rotloc(jatom)%rotrep(l)%mat = (reptrans)*spinrot(l)*conjugate(inverse(reptrans)) -C rotloc(jatom)%rotrep(l)%mat = D(Rloc)_{new_i} = D(Rloc)_{lm} []^* -C which is exactly the expression of the spinor rotation matrix in the new basis. - ELSE - tmp_rot(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & spinrot(1:2*(2*l+1),1:2*(2*l+1)), - & rotloc(jatom)%rotl(1:2*(2*l+1),1:2*(2*l+1),l)) - rotloc(jatom)%rotrep(l)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(CONJG(spinrot(1:2*(2*l+1),1:2*(2*l+1))))) -C Since the operation is linear, the field rotloc(jatom)%rotrep(l)%mat = (reptrans)*spinrot(l)*inverse(reptrans) -C rotloc(jatom)%rotrep(l)%mat = D(Rloc)_{new_i} = D(Rloc)_{lm} -C which is exactly the expression of the spinor rotation matrix in the new basis. - ENDIF - DEALLOCATE(spinrot) - ENDIF ! End of the if mixing if-then-else - DEALLOCATE(tmp_rot) -C - ELSE -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) -C -------------------------------------------------------------------------------------------- - DEALLOCATE(rotloc(jatom)%rotrep(l)%mat) - ALLOCATE(rotloc(jatom)%rotrep(l)%mat(-l:l,-l:l)) - ALLOCATE(tmp_rot(-l:l,-l:l)) -C Computation of rotloc(jatom)%rotrep(l)%mat - tmp_rot(-l:l,-l:l)=MATMUL( - & reptrans(l,isrt)%transmat(-l:l,-l:l), - & rotloc(jatom)%rotl(-l:l,-l:l,l)) - rotloc(jatom)%rotrep(l)%mat(-l:l,-l:l)= - = MATMUL(tmp_rot(-l:l,-l:l), - & TRANSPOSE(CONJG(reptrans(l,isrt)%transmat(-l:l,-l:l)))) -C the field rotloc(jatom)%rotrep(l)%mat = (reptrans)*rotl*inverse(reptrans) -C rotloc(jatom)%rotrep(l)%mat = D(Rloc)_{new_i} = D(Rloc)_{lm} -C which is exactly the expression of the rotation matrix for the up/up block in the new basis. - DEALLOCATE(tmp_rot) - ENDIF - ENDDO ! End of the l loop - ENDDO ! End of the jatom loop - ENDDO ! End of the isrt loop -C - RETURN - END - - - SUBROUTINE euler(Rot,a,b,c) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine calculates the Euler angles a, b and c of Rot. %% -C %% The result are stored in a,b,c. (same as in SRC_lapwdm/euler.f) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C - IMPLICIT NONE - REAL(KIND=8) :: a,aa,b,bb,c,cc,zero,pi,y_norm,dot - REAL(KIND=8), DIMENSION(3,3) :: Rot, Rot_temp - REAL(KIND=8), DIMENSION(3) :: z,zz,y,yy,yyy,pom,x,xx - INTEGER :: i,j -C Definition of the constants - zero=0d0 - pi=ACOS(-1d0) -C Definition of Rot_temp=Id - DO i=1,3 - DO j=1,3 - Rot_temp(i,j)=0 - IF (i.EQ.j) Rot_temp(i,i)=1 - ENDDO - ENDDO -C Initialization of y=e_y, z=e_z, yyy and zz - DO j=1,3 - y(j)=Rot_temp(j,2) - yyy(j)=Rot(j,2) - z(j)=Rot_temp(j,3) - zz(j)=Rot(j,3) - ENDDO -C Calculation of yy - CALL vecprod(z,zz,yy) - y_norm=DSQRT(dot(yy,yy)) - IF (y_norm.lt.1d-10) THEN -C If yy=0, this implies that b is zero or pi - IF (ABS(dot(y,yyy)).gt.1d0) THEN - aa=dot(y,yyy)/ABS(dot(y,yyy)) - a=ACOS(aa) - ELSE - a=ACOS(dot(y,yyy)) - ENDIF -C - IF (dot(z,zz).gt.zero) THEN - c=zero - b=zero - IF (yyy(1).gt.zero) a=2*pi-a - ELSE - c=a - a=zero - b=pi - IF (yyy(1).lt.zero) c=2*pi-c - ENDIF - ELSE -C If yy is not 0, then b belongs to ]0,pi[ - DO j=1,3 - yy(j)=yy(j)/y_norm - ENDDO -C - aa=dot(y,yy) - bb=dot(z,zz) - cc=dot(yy,yyy) - IF (ABS(aa).gt.1d0) aa=aa/ABS(aa) - IF (ABS(bb).gt.1d0) bb=bb/ABS(bb) - IF (ABS(cc).gt.1d0) cc=cc/ABS(cc) - b=ACOS(bb) - a=ACOS(aa) - c=ACOS(cc) - IF (yy(1).gt.zero) a=2*pi-a - CALL vecprod(yy,yyy,pom) - IF (dot(pom,zz).lt.zero) c=2*pi-c - ENDIF -C - END - - - SUBROUTINE vecprod(a,b,c) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine calculates the vector product of a and b. %% -C %% The result is stored in c. (same as in SRC_lapwdm/euler.f) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C - IMPLICIT NONE - REAL(KIND=8), DIMENSION(3) :: a,b,c -C - c(1)=a(2)*b(3)-a(3)*b(2) - c(2)=a(3)*b(1)-a(1)*b(3) - c(3)=a(1)*b(2)-a(2)*b(1) -C - END - - REAL(KIND=8) FUNCTION dot(a,b) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This function calculates the scalar product of a and b. %% -C %% The result is stored in dot. (same as in SRC_lapwdm/euler.f) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C - IMPLICIT NONE - REAL(KIND=8) :: a,b - INTEGER :: i - dimension a(3),b(3) - dot=0 - DO i=1,3 - dot=dot+a(i)*b(i) - ENDDO -C - END - - - diff --git a/fortran/dmftproj/setsym.f b/fortran/dmftproj/setsym.f deleted file mode 100644 index 877a200..0000000 --- a/fortran/dmftproj/setsym.f +++ /dev/null @@ -1,886 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE setsym -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets up the symmetry matrices of the structure %% -C %% and the local rotation matrices for each atom of the system. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data - USE factorial - USE file_names - USE prnt - USE reps - USE symm - IMPLICIT NONE -C - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: tmp_rot, spinrot - COMPLEX(KIND=8), DIMENSION(:,:),ALLOCATABLE :: tmat - COMPLEX(KIND=8), DIMENSION(:,:,:),ALLOCATABLE :: tmp_dmat - REAL(KIND=8) :: factor - INTEGER :: l, isym, mmax, nrefl, i, m, isrt, lms - INTEGER :: lm, is, is1 - INTEGER :: iatom, imu, iatomref - REAL(KIND=8) :: det - REAL(KIND=8), DIMENSION(:),ALLOCATABLE :: bufreal - COMPLEX(KIND=8), DIMENSION(:),ALLOCATABLE :: bufcomp - COMPLEX(KIND=8), DIMENSION(:,:),ALLOCATABLE :: tmpcomp - COMPLEX(KIND=8), DIMENSION(1:2,1:2) :: spmt - -C -C - WRITE(buf,'(a)')'=======================================' - CALL printout(0) - WRITE(buf,'(a)')'Symmetry operations of the system' - CALL printout(1) -C -C =========================================== -C Reading of the symmetry file case.dmftsym : -C =========================================== - CALL setfact(170) - READ(iusym,*)nsym - WRITE(buf,'(a,i4)')'Number of Symmetries = ',nsym - CALL printout(0) - CALL printout(0) -C nsym = total number of symmetry operations for the structure - lsym=lmax - nlmsym=2*lsym+1 -C lsym = maximal orbital number for the symmetry -C nlmsym = maximal size of the representation for the symmetry - ALLOCATE(srot(nsym)) - DO isym=1,nsym - ALLOCATE(srot(isym)%perm(natom)) - READ(iusym,*)srot(isym)%perm - ENDDO -C srot = table of symop elements from to 1 to nsym. -C the field srot(isym)%perm = the table of permutation for the isym symmetry (table from 1 to natom) -C srot(isym)%perm(iatom) = R[isym](iatom) = image by R[isym] fo iatom - WRITE(buf,'(a)')'Properties of the symmetry operations :' - CALL printout(0) - WRITE(buf,'(a)') ' alpha, beta, gamma are their Euler angles.' - CALL printout(0) - WRITE(buf,'(a)') ' iprop is the value of their determinant.' - CALL printout(0) - CALL printout(0) - WRITE(buf,'(a)')' SYM.OP. alpha beta gamma iprop' - CALL printout(0) - DO isym=1,nsym - READ(iusym,'()') - READ(iusym,'()') - READ(iusym,'(3(f6.1),i3)') srot(isym)%a, srot(isym)%b, - & srot(isym)%g, srot(isym)%iprop -C Printing the matrices parameters in the file case.outdmftpr - WRITE(buf,'(i5,3F10.1,5x,i3)')isym, - & srot(isym)%a,srot(isym)%b,srot(isym)%g,srot(isym)%iprop - CALL printout(0) - srot(isym)%a=srot(isym)%a/180d0*Pi - srot(isym)%b=srot(isym)%b/180d0*Pi - srot(isym)%g=srot(isym)%g/180d0*Pi -C the field srot(isym)%a is linked to the Euler precession angle (alpha) -C the field srot(isym)%b is linked to the Euler nutation angle (beta) -C the field srot(isym)%c is linked to the Euler intrinsic rotation angle (gamma) -C They are read in case.dmftsym in degree and are then transformed into radians -C the field sort(isym)% iprop = value of the transformation determinant (1 or -1), -C determines if there is an inversion in the transformation - READ(iusym,*)(srot(isym)%krotm(1:3,i),i=1,3) - srot(isym)%krotm(1:3,1:3)= - & TRANSPOSE(srot(isym)%krotm(1:3,1:3)) -C the field srot(isym)%krotm = 3x3 matrices of rotation associated to the transformation (R[isym]). -C (without the global inversion). The matrix was multiplied by the value of iprop before being written in case.dmftsym. -C This reading line was chosen to be consistent with the writing line in rotmat_dmft (in SRC_lapw2) - ENDDO -C -C ============================================================= -C Determination of the properties for each symmetry operation : -C ============================================================= -C -C Creation of the rotational matrices for each orbital : -C ------------------------------------------------------ - DO isym=1,nsym - ALLOCATE(srot(isym)%rotl(-lsym:lsym,-lsym:lsym,lsym)) - srot(isym)%rotl=0.d0 - ALLOCATE(tmat(1:2*lsym+1,1:2*lsym+1)) - DO l=1,lsym -C Use of the subroutine dmat to compute the the rotational matrix -C associated to the isym symmetry operation in a (2*l+1) space : - CALL dmat(l,srot(isym)%a,srot(isym)%b,srot(isym)%g, - & REAL(srot(isym)%iprop,KIND=8),tmat,2*lsym+1) - srot(isym)%rotl(-l:l,-l:l,l)=tmat(1:2*l+1,1:2*l+1) -C srot(isym)%rotl = table of the rotationnal matrices of the symmetry operation -C for the different l orbital (from 1 to lsym), in the usual complex basis : dmat = D(R[isym])_l -C srot(isym)%rotl = D(R[isym])_{lm} - ENDDO - DEALLOCATE(tmat) -C -C -C Determination of the fields timeinv and phase (if SP+SO computations): -C ---------------------------------------------------------------------- -C If the calculation is spin-polarized with spin-orbit, the magnetic spacegroup of the -C system is of type III (black-and-white type). The operation must then be classified -C according to their keeping the z-axis invariant or not. -C -C srot(isym)%timeinv = boolean indicating if a time reversal operation is required - IF(ifSP.AND.ifSO) THEN - det=srot(isym)%krotm(1,1)*srot(isym)%krotm(2,2)- - - srot(isym)%krotm(1,2)*srot(isym)%krotm(2,1) -C the value of det is cos(srot(isym)%b) even if the rotation is improper. - IF(det < 0.0d0) THEN - srot(isym)%timeinv=.TRUE. -C The direction of the magnetic moment is changed to its opposite ( srot(isym)%b=pi ), -C A time reversal operation is required. - srot(isym)%phase=srot(isym)%g-srot(isym)%a -C In this case, we define a phase factor for the off-diagonal term (up/dn term) -C which is srot(isym)%phase= g-a = 2pi+(alpha-gamma) - ELSE - srot(isym)%timeinv=.FALSE. -C The direction of the magnetic moment is unchanged ( srot(isym)%b=0 ), -C no time reversal operation is required. - srot(isym)%phase=srot(isym)%a+srot(isym)%g -C In this case, we define a phase factor for the off-diagonal term (up/dn term) -C which is srot(isym)%phase= a+g = 2pi-(alpha+gamma) - ENDIF - ELSE -C If the calculation is either spin-polarized without spin-orbit, or paramagnetic -C the magnetic spacegroup of the system is of type I (ordinary type). The operation -C are thus merely applied. - srot(isym)%timeinv=.FALSE. - srot(isym)%phase=0.d0 - ENDIF ! End of the ifSP if-then-else -C -C -C Computation of the rotational matrices in each sort basis : -C ----------------------------------------------------------- - ALLOCATE(srot(isym)%rotrep(lsym,nsort)) -C -C Initialization of the srot(isym)%rotrep field -C This field is a table of size (lsym*nsort) which contains the rotation matrices -C of isym in the representation basis associated to each included orbital of each atom. -C srot(isym)%rotrep = D(R[isym])_{new_i} - DO isrt=1,nsort - DO l=1,lsym - ALLOCATE(srot(isym)%rotrep(l,isrt)%mat(1,1)) - srot(isym)%rotrep(l,isrt)%mat(1,1)=0.d0 - ENDDO - ENDDO -C -C Computation of the elements 'mat' in srot(isym)%rotrep(l,isrt) - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO l=1,lsym -C The considered orbital is not included, hence no computation - IF (lsort(l,isrt)==0) cycle -C The considered orbital is included - IF (reptrans(l,isrt)%ifmixing) THEN -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) -C If this option is used, then ifSO=.TRUE. (because of the restriction in set_ang_trans.f) -C Moreover ifSP=.TRUE. (since ifSO => ifSP in this version) - DEALLOCATE(srot(isym)%rotrep(l,isrt)%mat) - ALLOCATE(srot(isym)%rotrep(l,isrt)%mat - & (1:2*(2*l+1),1:2*(2*l+1))) - ALLOCATE(tmp_rot(1:2*(2*l+1),1:2*(2*l+1))) - ALLOCATE(spinrot(1:2*(2*l+1),1:2*(2*l+1))) - spinrot=0.d0 -C Computation of the full spinor rotation matrix associated to isym. - CALL spinrotmat(spinrot,isym,l) -C Computation of srot(isym)%rotrep(l,isrt)%mat - tmp_rot(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1)), - & spinrot(1:2*(2*l+1),1:2*(2*l+1))) - srot(isym)%rotrep(l,isrt)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(tmp_rot(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(CONJG(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1))))) -C the field srot(isym)%rotrep(l,isrt)%mat = (reptrans)*spinrot(l)*inverse(reptrans) -C or srot(isym)%rotrep = D(R[isym])_{new_i} = D(R[isym])_{lm} -C which is exactly the expression of the spinor rotation matrix in the new basis. - DEALLOCATE(tmp_rot) - DEALLOCATE(spinrot) - ELSE -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) - DEALLOCATE(srot(isym)%rotrep(l,isrt)%mat) - ALLOCATE(srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l)) - ALLOCATE(tmp_rot(-l:l,-l:l)) -C Computation of srot(isym)%rotrep(l,isrt)%mat - tmp_rot(-l:l,-l:l)=MATMUL( - & reptrans(l,isrt)%transmat(-l:l,-l:l), - & srot(isym)%rotl(-l:l,-l:l,l)) - srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l)= - = MATMUL(tmp_rot(-l:l,-l:l), - & TRANSPOSE(CONJG(reptrans(l,isrt)%transmat(-l:l,-l:l)))) -C the field srot(isym)%rotrep(l,isrt)%mat = (reptrans)*rotl*inverse(reptrans) -C or srot(isym)%rotrep = D(R[isym])_{new_i} = D(R[isym])_{lm} -C which is exactly the expression of the rotation matrix for the up/up block in the new basis. - DEALLOCATE(tmp_rot) - ENDIF - ENDDO ! End of the l loop - ENDDO ! End of the isrt loop - ENDDO ! End of the isym loop -C -C -C ============================================================= -C Printing the matrix parameters in the file fort.17 for test : -C ============================================================= - DO isym=1,nsym - WRITE(17,'()') - WRITE(17,'(a,i3)')' Sym. op.: ',isym - DO i =1,3 - ALLOCATE(bufreal(3)) - bufreal(1:3)=srot(isym)%krotm(i,1:3) - WRITE(17,'(3f10.4)') bufreal - DEALLOCATE(bufreal) - ENDDO - WRITE(17,'(a,3f8.1,i4)')'a, b, g, iprop =', - & srot(isym)%a*180d0/Pi,srot(isym)%b*180d0/Pi, - & srot(isym)%g*180d0/Pi,srot(isym)%iprop -C Printing the data relative to SP option - IF (ifSP) THEN - WRITE(17,*)'If DIR. magn. mom. is inverted :' - & ,srot(isym)%timeinv - WRITE(17,*)'phase = ',srot(isym)%phase - ENDIF -C Printing the rotational matrices for each orbital number l. - WRITE(17,'()') - DO l=1,lsym - WRITE(17,'(a,a,i2)')'Rotation matrix ', - & 'D(R[isym])_{lm} for l = ',l - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)=srot(isym)%rotl(m,-l:l,l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ENDDO -C Printing the matrices rotrep(l,isrt)%mat - WRITE(17,'()') - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO l=1,lsym - IF (lsort(l,isrt)==0) cycle - WRITE(17,'(a,i2,a,i2)')'Representation for isrt = ', - & isrt,' and l= ',l - IF (reptrans(l,isrt)%ifmixing) THEN - DO m=1,2*(2*l+1) - ALLOCATE(bufcomp(1:2*(2*l+1))) - bufcomp(1:2*(2*l+1))= - & srot(isym)%rotrep(l,isrt)%mat(m,1:2*(2*l+1)) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ELSE - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)= - & srot(isym)%rotrep(l,isrt)%mat(m,-l:l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ENDIF - ENDDO - ENDDO - ENDDO -C -C -C ================================================================================= -C Applying time-reversal operator if the system is spin-polarized with Spin Orbit : -C ================================================================================= -C -C If the calculation is spin-polarized with spin-orbit, the magnetic spacegroup of the compound -C is of type III (black-and-white). The symmetry operations which reverse the z-axis must be -C multiplied by the time-reversal operator. -C If spin-orbit is not taken into account, all the field timeinv are .FALSE. and no time-reversal -C is applied, since the magnetic spacegroup of the compound is of type I (ordinary). - IF (ifSP) THEN -C The modification of srot(isym)%rotl is done for each isym - DO isym=1,nsym - DO l=1,lsym - IF (srot(isym)%timeinv) THEN -C The field srot(isym)%rotl is multiplied by the time-reversal operator in the complex basis. - ALLOCATE(tmpcomp(-l:l,-l:l)) - tmpcomp(-l:l,-l:l)= - & srot(isym)%rotl(-l:l,-l:l,l) - CALL timeinv_op(tmpcomp,(2*l+1),l,0) - srot(isym)%rotl(-l:l,-l:l,l)=tmpcomp(-l:l,-l:l) - DEALLOCATE(tmpcomp) -C The field srot(isym)%phase must not be modified. - END IF - END DO - END DO -C -C The other modification are done for each (isrt,l) included. - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO l=1,lsym -C The considered orbital is not included, hence no computation - IF (lsort(l,isrt)==0) cycle -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) - IF (reptrans(l,isrt)%ifmixing) THEN - DO isym=1,nsym - IF (srot(isym)%timeinv) THEN -C The field srot(isym)%rotrep(l,isrt)%mat is multiplied by the time-reversal operator in the corresponding basis of isrt. - CALL timeinv_op(srot(isym)%rotrep(l,isrt)%mat, - & 2*(2*l+1),l,isrt) - END IF - END DO ! End of the isym loop -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) - ELSE - DO isym=1,nsym - IF (srot(isym)%timeinv) THEN -C The field srot(isym)%rotrep(l,isrt)%mat is multiplied by the time-reversal operator in the corresponding basis of isrt. - CALL timeinv_op(srot(isym)%rotrep(l,isrt)%mat, - & (2*l+1),l,isrt) - END IF - END DO ! End of the isym loop - END IF ! End of the ifmixing if-then-else - END DO ! End of the l loop - END DO ! End of the isrt loop - END IF ! End of the ifSP if-then-else -C -C -C ====================================================================== -C Printing the time-reversal modification in the file fort.17 for test : -C ====================================================================== - IF (ifSP.AND.ifSO) THEN - WRITE(17,'()') - WRITE(17,'(a)') '---With time-reversal operation---' - WRITE(17,'()') -C Printing the srot(isym) operations if necessary : - DO isym=1,nsym - IF (srot(isym)%timeinv) THEN - WRITE(17,'()') - WRITE(17,'(a,i3)')' Sym. op.: ',isym -C Printing the new rotational matrices for each orbital number l. - WRITE(17,'()') - DO l=1,lsym - WRITE(17,'(a,a,i2)')'T*Rotation matrix ', - & 'D(T.R[isym])_{lm} for l = ',l - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)=srot(isym)%rotl(m,-l:l,l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ENDDO -C Printing the new matrices rotrep(l,isrt)%mat - WRITE(17,'()') - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO l=1,lsym - IF (lsort(l,isrt)==0) cycle - WRITE(17,'(a,i2,a,i2)') - & 'Representation for isrt = ',isrt,' and l= ',l - IF (reptrans(l,isrt)%ifmixing) THEN - DO m=1,2*(2*l+1) - ALLOCATE(bufcomp(1:2*(2*l+1))) - bufcomp(1:2*(2*l+1))= - & srot(isym)%rotrep(l,isrt)%mat(m,1:2*(2*l+1)) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ELSE - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)= - & srot(isym)%rotrep(l,isrt)%mat(m,-l:l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - END DO - END IF - END DO - END DO - END IF - ENDDO - END IF -C -C -C ============================================================ -C Creation of the global->local coordinate rotation matrices : -C ============================================================ - ALLOCATE(rotloc(natom)) - CALL printout(1) - WRITE(buf,'(a)')'-------------------------------------' - CALL printout(0) - WRITE(buf,'(a)')'Global-to-local-coordinates rotations' - CALL printout(1) - WRITE(buf,'(a)')'Properties of the symmetry operations :' - CALL printout(0) - WRITE(buf,'(a)') ' alpha, beta, gamma are their Euler angles.' - CALL printout(0) - WRITE(buf,'(a)') ' iprop is the value of their determinant.' - CALL printout(0) - CALL printout(0) - WRITE(buf,'(a)')' SORT alpha beta gamma iprop' - CALL printout(0) - READ(iusym,'()') - DO isrt=1,nsort -C Reading the data for the representative atom in case.dmftsym and printing them in case.outdmftpr : -C -------------------------------------------------------------------------------------------------- - iatomref=SUM(nmult(0:isrt-1))+1 - READ(iusym,'()') - DO i=1,3 - ALLOCATE(bufreal(3)) - READ(iusym,*) bufreal - rotloc(iatomref)%krotm(i,1:3)=bufreal(1:3) - DEALLOCATE(bufreal) - ENDDO -C the field rotloc(iatomref)%krotm = 3x3 matrices of rotation associated to the transformation Rloc -C Rloc = . The matrix was not multiplied by the value of iprop before being -C written in case.dmftsym (cf. SRC_lapw2/rotmat_dmft.f). -C rotloc(iatomref)%krotm can thus be either a proper or an improper rotation (with inversion). -C This reading line was chosen to be consistent with the writing line in rotmat_dmft (in SRC_lapw2) - READ(iusym,*)rotloc(iatomref)%a,rotloc(iatomref)%b, - & rotloc(iatomref)%g, rotloc(iatomref)%iprop - WRITE(buf,'(i5,3F10.1,5x,i3)')isrt, - & rotloc(iatomref)%a, rotloc(iatomref)%b, - & rotloc(iatomref)%g, rotloc(iatomref)%iprop - CALL printout(0) - rotloc(iatomref)%a=rotloc(iatomref)%a/180d0*Pi - rotloc(iatomref)%b=rotloc(iatomref)%b/180d0*Pi - rotloc(iatomref)%g=rotloc(iatomref)%g/180d0*Pi -C the field rotloc%a is linked to the Euler precession angle (alpha) -C the field rotloc%b is linked to the Euler nutation angle (beta) -C the field rotloc%c is linked to the Euler intrinsic rotation angle (gamma) -C They are read in case.dmftsym and printed in case.outdmftpr in degree and are then transformed into radians -C the field rotloc%iprop = value of the transformation determinant (should be 1 in almost all the cases), -C determines if there is an inversion in the transformation from global to local basis. - rotloc(iatomref)%krotm(1:3,1:3)=rotloc(iatomref)%iprop* - & rotloc(iatomref)%krotm(1:3,1:3) -C Now, the field rotloc(iatomref)%krotm described only the proper rotation associated to the transformation. -C -C Use of the subroutine dmat to compute the rotational matrix -C associated to the rotloc(iatomref) operation in a (2*l+1) orbital space : - ALLOCATE(tmat(1:2*lsym+1,1:2*lsym+1)) - ALLOCATE(tmp_dmat(1:2*lsym+1,1:2*lsym+1,1:lsym)) - DO l=1,lsym - tmat=0.d0 - CALL dmat(l,rotloc(iatomref)%a,rotloc(iatomref)%b, - & rotloc(iatomref)%g,REAL(rotloc(iatomref)%iprop,KIND=8), - & tmat,2*lsym+1) - tmp_dmat(1:2*l+1,1:2*l+1,l)=tmat(1:2*l+1,1:2*l+1) -C tmp_dmat = D(Rloc)_{lm} - ENDDO - DEALLOCATE(tmat) -C -C -C Storing the rotloc matrix and initializing the other fields for all equivalent atoms : -C -------------------------------------------------------------------------------------- -C All the equivalent atoms will have the same rotloc description. These data -C will be correctly redifined in the subroutine set_rotloc, where the action of the -C symmetry operation which transforms the representative atom in the considered one -C will be added. - DO imu=1,nmult(isrt) - iatom=SUM(nmult(0:isrt-1))+imu - IF(ifSP.AND.ifSO) THEN -C In this case, we have to consider the spinor rotation matrix associated to rotloc -C (the value of the Euler angle beta can be anything between 0 and Pi) - ALLOCATE(rotloc(iatom)%rotl(1:2*(2*lsym+1), - & 1:2*(2*lsym+1),lsym)) - rotloc(iatom)%rotl=0.d0 - DO l=1,lsym -C For each orbital (from l=0 to lsym) -C Calculation of the representation matrix of rotloc in the spin-space -C in agreement with Wien conventions used for the definition of spmt (in SRC_lapwdm/sym.f) -C Up/up and Dn/dn terms - factor=(rotloc(iatomref)%a+rotloc(iatomref)%g)/2.d0 - spmt(1,1)=EXP(CMPLX(0.d0,factor)) - & *DCOS(rotloc(iatomref)%b/2.d0) - spmt(2,2)=CONJG(spmt(1,1)) -C Up/dn and Dn/up terms - factor=-(rotloc(iatomref)%a-rotloc(iatomref)%g)/2.d0 - spmt(1,2)=EXP(CMPLX(0.d0,factor)) - & *DSIN(rotloc(iatomref)%b/2.d0) - spmt(2,1)=-CONJG(spmt(1,2)) -C Up/up block : - rotloc(iatom)%rotl(1:2*l+1,1:2*l+1,l)= - & spmt(1,1)*tmp_dmat(1:2*l+1,1:2*l+1,l) -C Dn/dn block : - rotloc(iatom)%rotl(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1),l)= - & spmt(2,2)*tmp_dmat(1:2*l+1,1:2*l+1,l) -C Up/dn block : - rotloc(iatom)%rotl(1:2*l+1,2*l+2:2*(2*l+1),l)= - & spmt(1,2)*tmp_dmat(1:2*l+1,1:2*l+1,l) -C Dn/up block : - rotloc(iatom)%rotl(2*l+2:2*(2*l+1),1:2*l+1,l)= - & spmt(2,1)*tmp_dmat(1:2*l+1,1:2*l+1,l) -C The fields rotloc(iatom)%rotl now contain D(rotloc)_{lm}xD(rotloc)_{1/2} - ENDDO - ELSE -C In this case, we can consider the spatial rotation matrix only -C since each spin space is independent (paramagnetic or spin-polarized without SO computation) - ALLOCATE(rotloc(iatom)%rotl(-lsym:lsym,-lsym:lsym,lsym)) - rotloc(iatom)%rotl=0.d0 - DO l=1,lsym - rotloc(iatom)%rotl(-l:l,-l:l,l)= - = tmp_dmat(1:2*l+1,1:2*l+1,l) -C The fields rotloc(iatom)%rotl now contain D(rotloc)_{lm} - ENDDO - ENDIF -C The fields rotloc(iatom)%a,b and c will now contain the parameters linked to -C the Euler angles of the local rotation rotloc. - IF(imu.gt.1) THEN - rotloc(iatom)%a=rotloc(iatomref)%a - rotloc(iatom)%b=rotloc(iatomref)%b - rotloc(iatom)%g=rotloc(iatomref)%g - rotloc(iatom)%iprop=rotloc(iatomref)%iprop - rotloc(iatom)%krotm(1:3,1:3)= - = rotloc(iatomref)%krotm(1:3,1:3) - ENDIF -C The fields rotloc%phase, timeinv and srotnum are initialized to their -C default value. - rotloc(iatom)%phase=0.d0 - rotloc(iatom)%timeinv=.FALSE. - rotloc(iatom)%srotnum=0 -C the field rotloc(iatom)%srotnum and timeinv will be recalculated in set_rotloc. - ENDDO - DEALLOCATE(tmp_dmat) - ENDDO ! End of the isrt loop -C -C -C ==================================================================== -C Printing the rotloc matrix parameters in the file fort.17 for test : -C ==================================================================== - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO imu=1,nmult(isrt) - iatom=SUM(nmult(0:isrt-1))+imu - WRITE(17,'()') - WRITE(17,'(2(a,i3))')' SORT ',isrt,' IMU= ',imu - DO i=1,3 - ALLOCATE(bufreal(3)) - bufreal(1:3)=rotloc(iatom)%krotm(i,1:3) - WRITE(17,'(3f10.4)') bufreal - DEALLOCATE(bufreal) - ENDDO - WRITE(17,'(a,3f8.1,i4)')'a, b, g, iprop ==', - & rotloc(iatom)%a*180d0/Pi,rotloc(iatom)%b*180d0/Pi, - & rotloc(iatom)%g*180d0/Pi,rotloc(iatom)%iprop -C Printing the data relative to SP option - IF (ifSP) THEN - WRITE(17,*)'If DIR. magn. mom. is inverted :' - & ,rotloc(iatom)%timeinv - WRITE(17,*)'phase = ',rotloc(iatom)%phase - ENDIF -C Printing the rotloc matrices for each orbital number l. - WRITE(17,'()') - DO l=1,lsym - WRITE(17,'(a,a,i2)')'Rotation matrix ', - & 'D(R[isym])_{lm} for l = ',l - IF(ifSP.AND.ifSO) THEN - DO m=1,2*(2*l+1) - ALLOCATE(bufcomp(1:2*(2*l+1))) - bufcomp(1:2*(2*l+1))=rotloc(iatom)%rotl(m,1:2*(2*l+1),l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ELSE - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)=rotloc(iatom)%rotl(m,-l:l,l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ENDIF - ENDDO - ENDDO - ENDDO -C -C -C ================================================================================== -C Computation of the true local rotation matrices for each non representative atom : -C ================================================================================== - CALL set_rotloc -C -C -C ==================================================================== -C Printing the rotloc matrix parameters in the file fort.17 for test : -C ==================================================================== - DO isrt=1,nsort - IF (notinclude(isrt)) cycle - DO imu=1,nmult(isrt) - iatom=SUM(nmult(0:isrt-1))+imu - WRITE(17,'()') - WRITE(17,'(2(a,i3))')' SORT ',isrt,' IMU= ',imu - DO i=1,3 - ALLOCATE(bufreal(3)) - bufreal(1:3)=rotloc(iatom)%krotm(i,1:3) - WRITE(17,'(3f10.4)') bufreal - DEALLOCATE(bufreal) - ENDDO - WRITE(17,'(a,3f8.1,i4)')'a, b, g, iprop ==', - & rotloc(iatom)%a*180d0/Pi,rotloc(iatom)%b*180d0/Pi, - & rotloc(iatom)%g*180d0/Pi,rotloc(iatom)%iprop -C Printing the data relative to SP option - IF (ifSP) THEN - WRITE(17,*)'If DIR. magn. mom. is inverted :' - & ,rotloc(iatom)%timeinv - WRITE(17,*)'phase = ',rotloc(iatom)%phase - ENDIF -C Printing the rotloc matrices for each orbital number l. - WRITE(17,'()') - DO l=1,lsym - WRITE(17,'(a,a,i2)')'Rotation matrix ', - & 'D(R[isym])_{lm} for l = ',l - IF(ifSP.AND.ifSO) THEN - DO m=1,2*(2*l+1) - ALLOCATE(bufcomp(1:2*(2*l+1))) - bufcomp(1:2*(2*l+1))=rotloc(iatom)%rotl(m,1:2*(2*l+1),l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ELSE - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)=rotloc(iatom)%rotl(m,-l:l,l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ENDIF - ENDDO -C Printing the matrices rotrep(l)%mat - WRITE(17,'()') - DO l=1,lsym - IF (lsort(l,isrt)==0) cycle - WRITE(17,'(a,i2)')'Representation for l= ',l - IF (ifSP.AND.ifSO) THEN - DO m=1,2*(2*l+1) - ALLOCATE(bufcomp(1:2*(2*l+1))) - bufcomp(1:2*(2*l+1))= - & rotloc(iatom)%rotrep(l)%mat(m,1:2*(2*l+1)) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ELSE - DO m=-l,l - ALLOCATE(bufcomp(-l:l)) - bufcomp(-l:l)= - & rotloc(iatom)%rotrep(l)%mat(m,-l:l) - WRITE(17,'(7(2f7.3,x))') bufcomp - DEALLOCATE(bufcomp) - ENDDO - ENDIF - ENDDO - ENDDO - ENDDO -C - RETURN - END - - - - - Subroutine dmat(l,a,b,c,det,DD,length) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine computes the inverse of the matrix of the %% -C %% representation of size (2*l+1) associated to the rotation %% -C %% described by (a,b,c) angles in Euler description and with %% -C %% determinant det. %% -C %% The obtained matrix is put in the variable DD. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - IMPLICIT REAL*8 (A-H,O-Z) - INTEGER l,m,n,ifac,length - COMPLEX*16 izero,imag, dd - dimension DD(length,length) - imag=(0d0,1d0) - izero=(0d0,0d0) - pi=acos(-1d0) - - do m=-l,l - do n=-l,l - call d_matrix(l,m,n,b,dm) - if (det.lt.-0.5) then - dd(l+m+1,n+l+1)=(-1)**l*cdexp(imag*n*a) - & *cdexp(imag*m*c)*dm - else - dd(l+m+1,n+l+1)=cdexp(imag*n*a) - & *cdexp(imag*m*c)*dm - end if - 3 format(2I3,2f10.6) - end do - end do - do j=1,2*l+1 - end do - 5 format(7(2f6.3,1X)) - - end - - - Subroutine d_matrix(l,m,n,b,dm) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine is called by the subroutine dmat to compute the %% -C %% the value of the coefficient dm. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - IMPLICIT REAL*8 (A-H,O-Z) - INTEGER l,m,n,t - - sum=0d0 - - f1=dfloat(ifac(l+m)*ifac(l-m))/ - & dfloat(ifac(l+n)*ifac(l-n)) - - do t=0,2*l - if ((l-m-t).ge.0.AND.(l-n-t).ge.0.AND.(t+n+m).ge.0) then -C general factor - f2=dfloat(ifac(l+n)*ifac(l-n))/dfloat(ifac(l-m-t) - & *ifac(m+n+t)*ifac(l-n-t)*ifac(t)) -C factor with sin(b/2) - if ((2*l-m-n-2*t).eq.0) then - f3=1. - else - f3=(sin(b/2))**(2*l-m-n-2*t) - end if -C factor with cos(b/2) - if ((2*t+n+m).eq.0) then - f4=1. - else - f4=(cos(b/2))**(2*t+n+m) - end if -! write(12,*)f1,f2,f3,f4 - sum=sum+(-1)**(l-m-t)*f2*f3*f4 - end if - end do - - dm=sqrt(f1)*sum - end - - - Integer Function ifac(n) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine computes the factorial of the number n %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - if (n.eq.0) then - ifac=1 - else - ifac=1 - do j=1,n - ifac=ifac*j - end do - end if - end - - - SUBROUTINE spinrotmat(spinrot,isym,l) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine sets up the complete spinor rotation matrix %% -C %% associated to the symmetry operation isym for the orbital l. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ----------------------------- - USE common_data - USE symm - IMPLICIT NONE - INTEGER :: l,isym - COMPLEX(KIND=8) :: ephase, det - REAL(KIND=8) :: factor - COMPLEX(KIND=8), DIMENSION(1:2*(2*l+1),1:2*(2*l+1)) :: spinrot - COMPLEX(KIND=8), DIMENSION(1:2,1:2) :: spmt -C - spinrot=0.d0 -C For a computation with spin polarized inputs : - IF (ifSP) THEN - IF (srot(isym)%timeinv) THEN -C In this case, the Euler angle Beta is Pi. The spinor rotation matrix is block-antidiagonal and -C the time reversal operation will be applied to keep the direction of the magnetization. -C Up/dn block : - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (g-a) in this case. -C as a result, ephase = exp(+i(g-a)/2) = -exp(+i(alpha-gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. - ephase=EXP(CMPLX(0.d0,factor)) - spinrot(1:2*l+1,2*l+2:2*(2*l+1))= - = ephase*srot(isym)%rotl(-l:l,-l:l,l) -C Dn/up block : - ephase=-CONJG(ephase) -C now, ephase = -exp(+i(a-g)/2) = exp(-i(alpha-gamma)/2) - spinrot(2*l+2:2*(2*l+1),1:2*l+1)= - = ephase*srot(isym)%rotl(-l:l,-l:l,l) - ELSE -C In this case, the Euler angle Beta is 0. The spinor rotation matrix is block-diagonal and -C no time reversal operation will be applied. -C Up/up block : - factor=srot(isym)%phase/2.d0 -C We remind that the field phase is (a+g) in this case. -C as a result, ephase = exp(+i(a+g)/2)=-exp(-i(alpha+gamma)/2) -C in good agreement with Wien conventions for the definition of this phase factor. - ephase=EXP(CMPLX(0.d0,factor)) - spinrot(1:2*l+1,1:2*l+1)= - = ephase*srot(isym)%rotl(-l:l,-l:l,l) -C Dn/dn block : - ephase=CONJG(ephase) -C now, ephase = exp(-i(a+g)/2) = -exp(+i(alpha+gamma)/2) - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - = ephase*srot(isym)%rotl(-l:l,-l:l,l) - ENDIF - ELSE -C For a computation with paramagnetic treatment input files. (not used in this version) -C -C In this case, there is no restriction on the value of the Euler angle beta. -C The general definition of a spinor rotation matrix is used. -C -C Calculation of the representation matrix of isym in the spin-space -C in agreement with Wien conventions used for the definition of spmt (in SRC_lapwdm/sym.f) -C Up/up and Dn/dn terms - factor=(srot(isym)%a+srot(isym)%g)/2.d0 - spmt(1,1)=EXP(CMPLX(0.d0,factor))*DCOS(srot(isym)%b/2.d0) - spmt(2,2)=CONJG(spmt(1,1)) -C Up/dn and Dn/up terms - factor=-(srot(isym)%a-srot(isym)%g)/2.d0 - spmt(1,2)=EXP(CMPLX(0.d0,factor))*DSIN(srot(isym)%b/2.d0) - spmt(2,1)=-CONJG(spmt(1,2)) -C Up/up block : - spinrot(1:2*l+1,1:2*l+1)= - & spmt(1,1)*srot(isym)%rotl(-l:l,-l:l,l) -C Dn/dn block : - spinrot(2*l+2:2*(2*l+1),2*l+2:2*(2*l+1))= - & spmt(2,2)*srot(isym)%rotl(-l:l,-l:l,l) -C Up/dn block : - spinrot(1:2*l+1,2*l+2:2*(2*l+1))= - & spmt(1,2)*srot(isym)%rotl(-l:l,-l:l,l) -C Dn/up block : - spinrot(2*l+2:2*(2*l+1),1:2*l+1)= - & spmt(2,1)*srot(isym)%rotl(-l:l,-l:l,l) - ENDIF -C - RETURN - END - diff --git a/fortran/dmftproj/symmetrize_mat.f b/fortran/dmftproj/symmetrize_mat.f deleted file mode 100644 index 694f75e..0000000 --- a/fortran/dmftproj/symmetrize_mat.f +++ /dev/null @@ -1,292 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE symmetrize_mat(Dmat,orbit,norbit) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine applies the symmetry operations to the %% -C %% density matrices stored in Dmat and puts the resulting %% -C %% density matrices into the local coordinate system. %% -C %% %% -C %% This version can be used for SO computations. %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definition of the variables : -C ---------------------------- - USE common_data - USE projections - USE symm - USE reps - IMPLICIT NONE - INTEGER :: norbit - TYPE(matrix), DIMENSION(nsp,norbit) :: Dmat - COMPLEX(KIND=8),DIMENSION(:,:,:,:), ALLOCATABLE :: sym_dmat - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: tmp_mat - COMPLEX(KIND=8):: ephase - TYPE(orbital), DIMENSION(norbit) :: orbit - INTEGER :: isym, iorb, iatom, jorb, is, is1, l, i, m - INTEGER :: isrt, jatom, imult, asym -C -C ========================================= -C Computation of the symmetrized matrices : -C ========================================= -C - iorb=1 -C Initialization of the iorb index. - DO WHILE (iorb.lt.(norbit+1)) -C The use of the while-loop was motivated by the idea of studying -C all the orbitals iorb associated to a same atomic sort isrt together. -C At the end, the index iorb is incremented by nmult(isrt) so that the -C following studied orbitals are associated to another atomic sort. - l=orbit(iorb)%l - isrt=orbit(iorb)%sort -C -C ----------------------------------------------------------------------------------- -C The s-orbitals are a particular case of a "non-mixing" basis and are treated here : -C ----------------------------------------------------------------------------------- - IF (l==0) THEN -C The table sym_dmat will store the symmetrized value of the density matrices of Dmat -C associated to a same atomic sort isrt. - ALLOCATE(sym_dmat(1,1,nsp,1:nmult(isrt))) - sym_dmat=0.d0 -C Its size is nmult(isrt) because symmetry operations can transform the representants -C of a same atomic sort one into another. -C -C Loop on the representants of the atomic sort isrt - DO imult=0,nmult(isrt)-1 - iatom=orbit(iorb+imult)%atom -C Loop on the symmetry operations of the system - DO isym=1,nsym - DO is=1,nsp - ALLOCATE(tmp_mat(1,1)) -C If the calculation uses spin-polarized input files, the application of the symmetry operation -C depends on the field srot%timeinv. - IF(ifSP.AND.srot(isym)%timeinv) THEN -C In this case (spin-polarized computation), the symmetry operation is block-diagonal in spin-space but -C the time reversal operator is included. - tmp_mat(1,1)=CONJG(Dmat(is,iorb+imult)%mat(1,1)) -C because of the antiunitarity of the operator, the conjugate of Dmat must be use - ELSE - tmp_mat(1,1)=Dmat(is,iorb+imult)%mat(1,1) - ENDIF -C -C Definition of the index where the transformed Dmat will be stored. [jorb = R[isym](iorb)] - jorb=srot(isym)%perm(iatom)-iatom+(imult+1) -C -C Computation of the phase factors in the case of a SO computation : -C ------------------------------------------------------------------ -C For up/up and dn/dn blocks, no phase factor is needed. - ephase=1.d0 -C For the up/dn block, initialisation of the phase factor - IF(is==3) THEN - ephase=EXP(CMPLX(0d0,srot(isym)%phase)) -C if srot%timeinv = .TRUE. , phase= g-a = 2pi+(alpha-gamma) and ephase = exp(+i(g-a)) = exp(+i(alpha-gamma)) -C if srot%timeinv = .FALSE., phase= a+g = 2pi-(alpha+gamma) and ephase = exp(+i(a+g)) = exp(-i(alpha+gamma)) - ENDIF -C For the dn/up block, initialisation of the phase factor - IF(is==4) THEN - ephase=EXP(CMPLX(0d0,-srot(isym)%phase)) -C if srot%timeinv = .TRUE. , phase= g-a = 2pi+(alpha-gamma) and ephase = exp(-i(g-a)) = exp(-i(alpha-gamma)) -C if srot%timeinv = .FALSE., phase= a+g = 2pi-(alpha+gamma) and ephase = exp(-i(a+g)) = exp(+i(alpha+gamma)) - ENDIF -C -C Application of the symmetry operation which changes iorb in jorb=R[isym](iorb) : -C -------------------------------------------------------------------------------- -C That's why the result is stored in the jorb section of sym_dmat. - sym_dmat(1,1,is,jorb)= - = sym_dmat(1,1,is,jorb)+tmp_mat(1,1)*ephase - DEALLOCATE(tmp_mat) - ENDDO ! End of the is loop - ENDDO ! End of the isym loop - ENDDO ! End of the imult loop -C -C Renormalization of the symmetrized density matrices : -C ----------------------------------------------------- - IF (nsym.gt.0) THEN - DO imult=0,nmult(isrt)-1 - DO is=1,nsp - Dmat(is,iorb+imult)%mat(1,1)= - & sym_dmat(1,1,is,imult+1)/nsym - ENDDO - ENDDO - ENDIF - DEALLOCATE(sym_dmat) -C Incrementation of the iorb index (for the while loop) - iorb=iorb+nmult(isrt) -C -C ----------------------------------------------------------------------------------------------------- -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) : -C ----------------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C The table sym_dmat will store the symmetrized value of the density matrices of Dmat -C associated to a same atomic sort isrt. - ALLOCATE(sym_dmat(1:2*(2*l+1),1:2*(2*l+1),1,1:nmult(isrt))) - sym_dmat=0.d0 -C Its size is nmult(isrt) because symmetry operations can transform the representants -C of a same atomic sort one into another. -C -C Loop on the representants of the atomic sort isrt - DO imult=0,nmult(isrt)-1 - iatom=orbit(iorb+imult)%atom -C Loop on the symmetry operations of the system - DO isym=1,nsym - ALLOCATE(tmp_mat(1:2*(2*l+1),1:2*(2*l+1))) -C We use the complete spin-space representation, so no trick on indices is necessary. - tmp_mat(1:2*(2*l+1),1:2*(2*l+1))= - & Dmat(1,iorb+imult)%mat(1:2*(2*l+1),1:2*(2*l+1)) -C If the calculation is spin-polarized, the symmetry operator is antiunitary. - IF(ifSP.AND.srot(isym)%timeinv) THEN - tmp_mat(1:2*(2*l+1),1:2*(2*l+1))= - & CONJG(tmp_mat(1:2*(2*l+1),1:2*(2*l+1))) - ENDIF -C Definition of the index where the transformed Dmat will be stored. [jorb = R[isym](iorb)] - jorb=srot(isym)%perm(iatom)-iatom+(imult+1) -C Application of the symmetry operation : -C --------------------------------------- -C The transformation is : srot%rotrep.tmpmat(iorb).inverse(sort%rotrep) = Dmat(jorb) -C or in other words, if R is a simple symmetry D(R[isym]) tmpmat(iorb) D(inverse(R[isym])) = Dmat(R[isym](iorb)) -C if R is multiplied by Theta D(R[isym]) tmpmat(iorb)* D(inverse(R[isym]))* = Dmat(R[isym](iorb)) - tmp_mat(1:2*(2*l+1),1:2*(2*l+1))= - = MATMUL(tmp_mat(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(CONJG(srot(isym)%rotrep(l,isrt) - % %mat(1:2*(2*l+1),1:2*(2*l+1)) )) ) - sym_dmat(1:2*(2*l+1),1:2*(2*l+1),1,jorb)= - = sym_dmat(1:2*(2*l+1),1:2*(2*l+1),1,jorb)+ - + MATMUL( srot(isym)%rotrep(l,isrt) - % %mat(1:2*(2*l+1),1:2*(2*l+1)) , - & tmp_mat(1:2*(2*l+1),1:2*(2*l+1))) - DEALLOCATE(tmp_mat) - ENDDO ! End of the isym loop - ENDDO ! End of the imult loop -C Renormalization of the symmetrized density matrices : -C ----------------------------------------------------- - IF (nsym.gt.0) THEN - DO imult=0,nmult(isrt)-1 - Dmat(1,iorb+imult)%mat(1:2*(2*l+1),1:2*(2*l+1))= - = sym_dmat(1:2*(2*l+1),1:2*(2*l+1),1,imult+1)/nsym - ENDDO - ENDIF - DEALLOCATE(sym_dmat) -C Incrementation of the iorb index (for the while loop) - iorb=iorb+nmult(isrt) -C -C ---------------------------------------------------------------------------------------------- -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) : -C ---------------------------------------------------------------------------------------------- - ELSE -C The table sym_dmat will store the symmetrized value of the density matrices of Dmat -C associated to a same atomic sort isrt. - ALLOCATE(sym_dmat(-l:l,-l:l,nsp,1:nmult(isrt))) - sym_dmat=0.d0 -C Its size is nmult(isrt) because symmetry operations can transform the representants -C of a same atomic sort one into another. -C -C Loop on the representants of the atomic sort isrt - DO imult=0,nmult(isrt)-1 - iatom=orbit(iorb+imult)%atom -C Loop on the symmetry operations of the system - asym=0 - DO isym=1,nsym - DO is=1,nsp - ALLOCATE(tmp_mat(-l:l,-l:l)) -C If the calculation uses spin-polarized input files, the application of the symmetry operation -C depends on the field srot%timeinv. - IF(ifSP.AND.srot(isym)%timeinv) THEN -C In this case (spin-polarized computation), the symmetry operation is block-diagonal in spin-space but -C the time reversal operatot is included. - tmp_mat(-l:l,-l:l)=CONJG( - & Dmat(is,iorb+imult)%mat(-l:l,-l:l)) -C because of antiunitarity of the operator, the conjugate of Dmat must be use - ELSE - tmp_mat(-l:l,-l:l)= - & Dmat(is,iorb+imult)%mat(-l:l,-l:l) - ENDIF -C -C Definition of the index where the transformed Dmat will be stored. [jorb = R[isym](iorb)] - jorb=srot(isym)%perm(iatom)-iatom+(imult+1) -C -C Computation of the phase factors in the case of a SO computation : -C ------------------------------------------------------------------ -C For up/up and dn/dn blocks, no phase factor is needed. - ephase=1.d0 -C For the up/dn block, initialisation of the phase factor - IF(is==3) THEN - ephase=EXP(CMPLX(0d0,srot(isym)%phase)) -C if srot%timeinv = .TRUE. , phase= g-a = 2pi+(alpha-gamma) and ephase = exp(+i(g-a)) = exp(+i(alpha-gamma)) -C if srot%timeinv = .FALSE., phase= a+g = 2pi-(alpha+gamma) and ephase = exp(+i(a+g)) = exp(-i(alpha+gamma)) - ENDIF -C For the dn/up block, initialisation of the phase factor - IF(is==4) THEN - ephase=EXP(CMPLX(0d0,-srot(isym)%phase)) -C if srot%timeinv = .TRUE. , phase= g-a = 2pi+(alpha-gamma) and ephase = exp(-i(g-a)) = exp(-i(alpha-gamma)) -C if srot%timeinv = .FALSE., phase= a+g = 2pi-(alpha+gamma) and ephase = exp(-i(a+g)) = exp(+i(alpha+gamma)) - ENDIF -C -C Application of the symmetry operation which changes iorb in jorb : -C ------------------------------------------------------------------ -C The transformation is : srot%rotrep.tmpmat(iorb).inverse(sort%rotrep) = Dmat(jorb) -C or in other words, if R is a simple symmetry D(R[isym]) tmpmat(iorb) D(inverse(R[isym])) = Dmat(R[isym](iorb)) -C if R is multiplied by T D(R[isym]) tmpmat(iorb)* D(inverse(R[isym]))* = Dmat(R[isym](iorb)) - tmp_mat(-l:l,-l:l)= - = MATMUL(tmp_mat(-l:l,-l:l), - & TRANSPOSE(CONJG( srot(isym) - & %rotrep(l,isrt)%mat(-l:l,-l:l) )) ) - sym_dmat(-l:l,-l:l,is,jorb)= - = sym_dmat(-l:l,-l:l,is,jorb)+ - + MATMUL(srot(isym)%rotrep(l,isrt)%mat(-l:l,-l:l), - & tmp_mat(-l:l,-l:l) )*ephase - DEALLOCATE(tmp_mat) - ENDDO ! End of the is loop - ENDDO ! End of the isym loop - ENDDO ! End of the imult loop -C -C Renormalization of the symmetrized density matrices : -C ----------------------------------------------------- - IF (nsym.gt.0) THEN - DO imult=0,nmult(isrt)-1 - DO is=1,nsp - Dmat(is,iorb+imult)%mat(-l:l,-l:l)= - = sym_dmat(-l:l,-l:l,is,imult+1)/(nsym-asym) - ENDDO - ENDDO - ENDIF - DEALLOCATE(sym_dmat) -C Incrementation of the iorb index (for the while loop) - iorb=iorb+nmult(isrt) - ENDIF ! End of the type basis if-then-else -C - ENDDO ! End of the while(iorb) loop -C -C -C ============================================================= -C Application of the time reversal operation if paramagnetism : -C ============================================================= -C If the system is paramagnetic, the magnetic group of the system -C is a type II Shubnikov group and time-reveral symmetry must be added -C to achieve the complete symmetrization. - IF (.not.ifSP) THEN - CALL add_timeinv(Dmat,orbit,norbit) - END IF -C - RETURN - END diff --git a/fortran/dmftproj/timeinv.f b/fortran/dmftproj/timeinv.f deleted file mode 100644 index 481df40..0000000 --- a/fortran/dmftproj/timeinv.f +++ /dev/null @@ -1,289 +0,0 @@ - -c ****************************************************************************** -c -c TRIQS: a Toolbox for Research in Interacting Quantum Systems -c -c Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn -c -c TRIQS is free software: you can redistribute it and/or modify it under the -c terms of the GNU General Public License as published by the Free Software -c Foundation, either version 3 of the License, or (at your option) any later -c version. -c -c TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY -c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -c details. -c -c You should have received a copy of the GNU General Public License along with -c TRIQS. If not, see . -c -c *****************************************************************************/ - - SUBROUTINE timeinv_op(mat,lm,l,isrt) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine applies the time reversal operation to the %% -C %% matrix mat which is associated to the l orbital of the atomic %% -C %% isrt. (matrix size = lm) The matrix mat is assumed to already %% -C %% be in the desired basis associated to isrt. %% -C %% The calculation done is : %% -C %% reptrans*T*conjg((inv(reptrans))*conjg(mat) %% -C %% %% -C %% If isrt=0, the matrix mat is assumed to be in the spherical %% -C %% harmonics basis and no spin is considered. (lm = 2*l+1) %% -C %% The calculation done is then : T*conjg(mat) %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data - USE reps - IMPLICIT NONE - INTEGER :: lm,l,isrt - COMPLEX(KIND=8), DIMENSION(1:lm,1:lm) :: mat - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: tinv - COMPLEX(KIND=8), DIMENSION(:,:), ALLOCATABLE :: tmp_tinv - COMPLEX(KIND=8), DIMENSION(-l:l,-l:l) :: tmat - INTEGER :: m,n -C -C Definition of the complex conjugation operator in the spherical harmonic basis : -C -------------------------------------------------------------------------------- -C - tmat = CMPLX(0.d0,0.d0) - DO m=-l,l - tmat(m,-m)=(-1)**m - END DO -C -C -C Calculation of the Time-reversal operator in the desired representation basis : -C ------------------------------------------------------------------------------- -C - IF (isrt==0) THEN -C The case isrt=0 is a "default case" : -C mat is in the spherical harmonic basis (without spinor representation) - ALLOCATE(tinv(1:2*l+1,1:2*l+1)) - tinv(1:2*l+1,1:2*l+1)=tmat(-l:l,-l:l) - ELSE -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) - IF (reptrans(l,isrt)%ifmixing) THEN - ALLOCATE(tinv(1:2*(2*l+1),1:2*(2*l+1))) - ALLOCATE(tmp_tinv(1:2*(2*l+1),1:2*(2*l+1))) - tinv = CMPLX(0.d0,0.d0) - tmp_tinv = CMPLX(0.d0,0.d0) -C Definition of the time-reversal operator as a spinor-operator (multiplication by -i.sigma_y) - tinv(1:2*l+1,2*l+2:2*(2*l+1))=-tmat(-l:l,-l:l) - tinv(2*l+2:2*(2*l+1),1:2*l+1)=tmat(-l:l,-l:l) -C The time reversal operator is put in the desired basis. - tmp_tinv(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & reptrans(l,isrt)%transmat(1:2*(2*l+1),1:2*(2*l+1)), - & tinv(1:2*(2*l+1),1:2*(2*l+1))) - tinv(1:2*(2*l+1),1:2*(2*l+1))=MATMUL( - & tmp_tinv(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(reptrans(l,isrt)%transmat - & (1:2*(2*l+1),1:2*(2*l+1)) ) ) -C the result tinv = (reptrans)*tinv*transpose(reptrans) -C or tinv_{new_i} = tinv_{lm} ()* -C which is exactly the expression of the spinor operator in the new basis. - DEALLOCATE(tmp_tinv) -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) - ELSE - ALLOCATE(tinv(1:2*l+1,1:2*l+1)) - ALLOCATE(tmp_tinv(-l:l,-l:l)) - tinv = CMPLX(0.d0,0.d0) - tmp_tinv = CMPLX(0.d0,0.d0) -C The time reversal operator is put in the desired basis. - tmp_tinv(-l:l,-l:l)=MATMUL( - & reptrans(l,isrt)%transmat(-l:l,-l:l), - & tmat(-l:l,-l:l) ) - tinv(1:2*l+1,1:2*l+1)=MATMUL( - & tmp_tinv(-l:l,-l:l),TRANSPOSE( - & reptrans(l,isrt)%transmat(-l:l,-l:l)) ) - DEALLOCATE(tmp_tinv) - END IF -C the result tinv = (reptrans)*tinv*transpose(reptrans) -C or tinv_{new_i} = tinv_{lm} ()* -C which is exactly the expression of the operator in the new basis. - END IF -C -C -C Multiplication of the matrix mat by the time reversal operator : -C ---------------------------------------------------------------- -C - mat(1:lm,1:lm) = MATMUL( - & tinv(1:lm,1:lm),CONJG(mat(1:lm,1:lm)) ) - DEALLOCATE(tinv) -C The multiplication is the product of tinv and (mat)* -C - RETURN - END - - - - SUBROUTINE add_timeinv(Dmat,orbit,norbit) -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -C %% %% -C %% This subroutine calculates for each density matrix in Dmat %% -C %% its image by the time-reversal operator and adds it to the %% -C %% former one to get a time-symmetrized result. %% -C %% %% -C %% This operation is done only if the computation is paramagnetic %% -C %% %% -C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -C Definiton of the variables : -C ---------------------------- - USE common_data - USE projections - USE symm - USE reps - IMPLICIT NONE - INTEGER :: norbit - TYPE(matrix), DIMENSION(nsp,norbit) :: Dmat - COMPLEX(KIND=8),DIMENSION(:,:,:), ALLOCATABLE :: rot_dmat - COMPLEX(KIND=8),DIMENSION(:,:), ALLOCATABLE :: time_op - COMPLEX(KIND=8),DIMENSION(:,:,:), ALLOCATABLE :: tmp_mat - COMPLEX(KIND=8):: ephase - TYPE(orbital), DIMENSION(norbit) :: orbit - INTEGER :: isym, iorb, iatom, jorb, is, is1, l, i - INTEGER :: isrt, jatom, imult, m -C -C - DO iorb=1,norbit - l=orbit(iorb)%l - isrt=orbit(iorb)%sort - iatom=orbit(iorb)%atom -C ----------------------------------------------------------------------------------- -C The s-orbitals are a particular case of a "non-mixing" basis and are treated here : -C ----------------------------------------------------------------------------------- - IF(l==0) THEN - IF (nsp==1) THEN - Dmat(1,iorb)%mat(1,1) = - & ( Dmat(1,iorb)%mat(1,1)+ - & CONJG(Dmat(1,iorb)%mat(1,1)) )/2.d0 - ELSE - ALLOCATE(tmp_mat(1,1,nsp)) - tmp_mat=0.d0 -C Application of the time-reversal operation -C ------------------------------------------ - DO is=1,nsp - is1=is+(-1)**(is+1) -C the time reversal operation transforms up/up -1- in dn/dn -2- and up/dn -3- in dn/up -4- (and vice versa) - tmp_mat(1,1,is)=CONJG(Dmat(is1,iorb)%mat(1,1) ) - IF (is.gt.2) tmp_mat(1,1,is)=-tmp_mat(1,1,is) -C Off diagonal blocks are multiplied by (-1). - ENDDO -C Symmetrization of Dmat : -C ------------------------ - DO is=1,nsp - Dmat(is,iorb)%mat(1,1) = (Dmat(is,iorb)%mat(1,1)+ - & tmp_mat(1,1,is) )/2.d0 - ENDDO - DEALLOCATE(tmp_mat) - ENDIF -C ----------------------------------------------------------------------------------------------------- -C If the basis representation needs a complete spinor rotation approach (matrices of size 2*(2*l+1) ) : -C ----------------------------------------------------------------------------------------------------- - ELSEIF (reptrans(l,isrt)%ifmixing) THEN -C Calculation of the time-reversal operator : -C ------------------------------------------- - ALLOCATE(time_op(1:2*(2*l+1),1:2*(2*l+1))) - time_op(:,:)=0.d0 - DO m=1,2*(2*l+1) - time_op(m,m)=1.d0 - ENDDO -C time_op is Identity. - CALL timeinv_op(time_op,2*(2*l+1),l,isrt) -C time_op is now the time-reversal operator in the desired basis ({new_i}) -C -C Application of the time-reversal operation -C ------------------------------------------ - ALLOCATE(tmp_mat(1:2*(2*l+1),1:2*(2*l+1),1)) - tmp_mat(1:2*(2*l+1),1:2*(2*l+1),1)= - = MATMUL(Dmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1)), - & TRANSPOSE(time_op(1:2*(2*l+1),1:2*(2*l+1)) ) ) - tmp_mat(1:2*(2*l+1),1:2*(2*l+1),1)= - = MATMUL(time_op(1:2*(2*l+1),1:2*(2*l+1)), - & CONJG(tmp_mat(1:2*(2*l+1),1:2*(2*l+1),1) ) ) -C The operation performed is : time_op.conjugate(Dmat).transpose(conjugate(time_op)) -C or in other words, D(T)_{new_i} . Dmat* . D(inverse(T))*_{new_i} -C -C Symmetrization of Dmat : -C ------------------------ - Dmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1)) = - & ( Dmat(1,iorb)%mat(1:2*(2*l+1),1:2*(2*l+1)) + - & tmp_mat(1:2*(2*l+1),1:2*(2*l+1),1) )/2.d0 - DEALLOCATE(tmp_mat) - DEALLOCATE(time_op) -C ---------------------------------------------------------------------------------------------- -C If the basis representation can be reduce to the up/up block (matrices of size (2*l+1) only) : -C ---------------------------------------------------------------------------------------------- - ELSE -C Calculation of the time-reversal operator : -C ------------------------------------------- - ALLOCATE(time_op(-l:l,-l:l)) - time_op(:,:)=0.d0 - DO m=-l,l - time_op(m,m)=1.d0 - ENDDO -C time_op is Identity. - CALL timeinv_op(time_op,(2*l+1),l,isrt) -C time_op is now the time-reversal operator in the desired basis ({new_i}) -C - IF (nsp==1) THEN -C Application of the time-reversal operation and symmetrization : -C --------------------------------------------------------------- - ALLOCATE(tmp_mat(-l:l,-l:l,1)) - tmp_mat(-l:l,-l:l,1)= - = MATMUL( Dmat(1,iorb)%mat(-l:l,-l:l), - & TRANSPOSE(time_op(-l:l,-l:l) ) ) - tmp_mat(-l:l,-l:l,1)= - = MATMUL(time_op(-l:l,-l:l), - & CONJG(tmp_mat(-l:l,-l:l,1)) ) -C The operation performed is : time_op.conjugate(Dmat).transpose(conjugate(time_op)) -C or in other words, D(T)_{new_i} . Dmat* . D(inverse(T))*_{new_i} - Dmat(1,iorb)%mat(-l:l,-l:l) = - & ( Dmat(1,iorb)%mat(-l:l,-l:l) + - & tmp_mat(-l:l,-l:l,1) )/2.d0 - DEALLOCATE(tmp_mat) - ELSE -C Application of the time-reversal operation -C ------------------------------------------ - ALLOCATE(tmp_mat(-l:l,-l:l,nsp)) - DO is=1,nsp - is1=is+(-1)**(is+1) -C the time reversal operation transforms up/up -1- in dn/dn -2- and up/dn -3- in dn/up -4 (and vice versa) - tmp_mat(-l:l,-l:l,is)= - = MATMUL( Dmat(is1,iorb)%mat(-l:l,-l:l), - & TRANSPOSE( time_op(-l:l,-l:l) ) ) - tmp_mat(-l:l,-l:l,is)= - = MATMUL( time_op(-l:l,-l:l), - & CONJG( tmp_mat(-l:l,-l:l,is) ) ) -C The operation performed is : time_op.conjugate(Dmat).transpose(conjugate(time_op)) -C or in other words, D(T)_{new_i} . Dmat* . D(inverse(T))*_{new_i} - IF (is.gt.2) THEN - tmp_mat(-l:l,-l:l,is)=-tmp_mat(-l:l,-l:l,is) - ENDIF -C Off diagonal terms are multiplied by (-1). - ENDDO -C Symmetrization of Dmat : -C ------------------------ - DO is=1,nsp - Dmat(is,iorb)%mat(-l:l,-l:l) = - & (Dmat(is,iorb)%mat(-l:l,-l:l)+ - & tmp_mat(-l:l,-l:l,is) )/2.d0 - ENDDO - DEALLOCATE(tmp_mat) - ENDIF - DEALLOCATE(time_op) -C - ENDIF ! End of the type basis if-then-else - ENDDO ! End of the iorb loop -C - RETURN - END - - - - diff --git a/python/triqs_dftkit/wien2k/_dmftproj.py b/python/triqs_dftkit/wien2k/_dmftproj.py new file mode 100644 index 0000000..1226c4c --- /dev/null +++ b/python/triqs_dftkit/wien2k/_dmftproj.py @@ -0,0 +1,532 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by M. Aichhorn, L. Pourovskii, V. Vildosola, C. Martins +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Shared dmftproj machinery for the pure-Python case.* generators. + +The five generators (symqmc, oubwin, ctqmcout, sympar, parproj) reproduce +different outputs of the dmftproj Fortran executable but draw on the same +underlying pieces: the list-directed almblm reader, the Fortran real/complex +token parsers, the Wigner-D rotation in the dmftproj convention, the angular +basis transforms (transmat), the case.indmftpr / case.dmftsym parsers, the +proj_mode==0 band-window selection and the gfortran-style real formatters. +This module owns each of those exactly once. + +All generators use the exact double-precision cubic harmonics. dmftproj reads +the same coefficients from full-precision SRC_templates (the precision-fix PR), +so the port reproduces its output to machine precision. `reptrans` keeps a +`cast` flag only to reproduce the legacy single-precision template on demand. +""" + +import math +import os +import numpy as np + + +# --- list-directed token stream over a Fortran free-form text file ----------- + +class Reader: + """Record-oriented reader mirroring Fortran list-directed and READ('()') + semantics on a free-form almblm file. + + `record()` returns the whitespace tokens of the next physical line (the + common case: every almblm logical record fits on one line). `skip()` + consumes one physical line unconditionally, matching READ('()').""" + + def __init__(self, path): + with open(path) as fh: + self._lines = fh.read().splitlines() + self._i = 0 + + def skip(self): + self._i += 1 + + def record(self): + toks = self._lines[self._i].split() + self._i += 1 + return toks + + +def to_float(tok): + """Parse a Fortran real token, accepting D/d exponents (1.0D-3) and the + list-directed 4.57E-002 form. Python float already handles E/e and the + embedded sign in the exponent; only D/d needs translation.""" + return float(tok.replace('D', 'E').replace('d', 'e')) + + +def to_complex(s): + s = s.strip().lstrip('(').rstrip(')') + re_s, im_s = s.split(',') + return complex(to_float(re_s), to_float(im_s)) + + +def read_complex(r): + """Read one list-directed complex `(re,im)` value, possibly split over + whitespace tokens.""" + buf = list(r.record()) + while ')' not in ''.join(buf): + buf += r.record() + return to_complex(''.join(buf)) + + +def read_two_complex(r): + """Read a record holding two list-directed complex values (Alm, Blm).""" + buf = list(r.record()) + while ''.join(buf).count(')') < 2: + buf += r.record() + s = ''.join(buf) + cut = s.index(')') + 1 + return to_complex(s[:cut]), to_complex(s[cut:]) + + +# --- angular bases: transmat = , m = -l..l -------------------------- +# Standard cubic harmonics, Wien2k convention, exact double precision. dmftproj +# reads the same coefficients from full-precision SRC_templates (the precision- +# fix PR); `reptrans(..., cast=True)` reproduces the legacy float32 template. + +_COMPLEX = {l: np.eye(2 * l + 1, dtype=complex) for l in range(4)} + +_CUBIC = { + 1: np.array([[0, 1, 0], [-1j, 0, -1j], [1, 0, -1]], dtype=complex), + 2: np.array([ + [0, 0, 1, 0, 0], + [2 ** -0.5, 0, 0, 0, 2 ** -0.5], + [-(2 ** -0.5), 0, 0, 0, 2 ** -0.5], + [0, 2 ** -0.5, 0, -(2 ** -0.5), 0], + [0, 2 ** -0.5, 0, 2 ** -0.5, 0], + ], dtype=complex), +} + + +def reptrans(basis, l, cast=False): + """transmat = , exact double-precision cubic harmonics. dmftproj + reads these from full-precision SRC_templates (the precision-fix PR), so the + port uses the exact analytic values. A complex basis is the exact identity. + `cast` is retained for callers that still want the legacy float32 truncation.""" + if basis == 'cubic' and l in _CUBIC: + c = _CUBIC[l] + return c.astype(np.complex64).astype(np.complex128) if cast else c + return _COMPLEX[l] + + +def read_fromfile(path, l): + """Parse a dmftproj fromfile basis (each line: the coefficients of a new + basis vector in {|m,up>, |m,dn>}, m = -l..l, real/imag interleaved; '*' + marks the end of an irep). Return (P, mixing) where P = is the + transform matrix (reptrans.transmat), full 2(2l+1) for a spin-mixing basis + or the (2l+1) up/up block otherwise.""" + n = 2 * (2 * l + 1) + rows = [] + for line in open(path): + line = line.rstrip('\n') + if not line.strip(): + continue + body = line[1:] + vals = [float(x) for x in body.split()][:2 * n] + rows.append([vals[2 * k] + 1j * vals[2 * k + 1] for k in range(n)]) + if len(rows) == n: + break + R = np.array(rows) # R[i, :] = |new_i> in old basis + d = 2 * l + 1 + up_up, up_dn = R[:d, :d], R[:d, d:] + dn_up, dn_dn = R[d:, :d], R[d:, d:] + mixing = not (np.allclose(dn_dn, up_up) and + np.allclose(up_dn, 0) and np.allclose(dn_up, 0)) + P = np.conj(R) if mixing else np.conj(up_up) # = conj() + return P, mixing + + +# --- Wigner D matrix (dmftproj convention, setsym.f) ------------------------- + +def small_d(l, m, n, b): + f1 = (math.factorial(l + m) * math.factorial(l - m)) / \ + (math.factorial(l + n) * math.factorial(l - n)) + s = 0.0 + for t in range(0, 2 * l + 1): + if (l - m - t) >= 0 and (l - n - t) >= 0 and (t + n + m) >= 0: + f2 = (math.factorial(l + n) * math.factorial(l - n)) / \ + (math.factorial(l - m - t) * math.factorial(m + n + t) * + math.factorial(l - n - t) * math.factorial(t)) + f3 = 1.0 if (2 * l - m - n - 2 * t) == 0 \ + else math.sin(b / 2) ** (2 * l - m - n - 2 * t) + f4 = 1.0 if (2 * t + n + m) == 0 \ + else math.cos(b / 2) ** (2 * t + n + m) + s += (-1) ** (l - m - t) * f2 * f3 * f4 + return math.sqrt(f1) * s + + +def dmat(l, a, b, c, det): + # det is the improper-rotation parity: pass op['iprop'] (+-1), not + # np.linalg.det(krotm). krotm in case.dmftsym is the proper part and its + # determinant is +1 even for improper ops, so it drops the (-1)^l parity + # factor. Harmless for even l, wrong sign for odd l (p, f). + D = np.zeros((2 * l + 1, 2 * l + 1), dtype=complex) + for m in range(-l, l + 1): + for n in range(-l, l + 1): + v = np.exp(1j * n * a) * np.exp(1j * m * c) * small_d(l, m, n, b) + if det < -0.5: + v *= (-1) ** l + D[m + l, n + l] = v + return D + + +def tmat(l): + """Complex-conjugation operator in the spherical-harmonic basis, + T[m, -m] = (-1)^m (timeinv.f).""" + T = np.zeros((2 * l + 1, 2 * l + 1), dtype=complex) + for m in range(-l, l + 1): + T[-m + l, m + l] = (-1) ** m + return T + + +def timeinv_orbital(l, mat): + return tmat(l) @ np.conj(mat) + + +def mixing_timeinv_op(l, P): + """The spinor time-reversal operator -i sigma_y (x) T in the mixing basis: + tinv_{new} = P tinv_{lm} P^T (timeinv.f, ifmixing branch). Returned as the + bare operator; callers apply it as tinv @ conj(mat).""" + d = 2 * l + 1 + tm = tmat(l) + tinv = np.zeros((2 * d, 2 * d), dtype=complex) + tinv[:d, d:] = -tm + tinv[d:, :d] = tm + return P @ tinv @ P.T + + +def rotloc_rotl_so(l, ref, ops, iatom, iref): + """The composed 2(2l+1) Rloc rotation rotloc(iatom)%rotl(l) under SP+SO + (setsym.f:496-528 + set_rotloc.f): the representative spinor rotloc + spmt (x) D(rotloc_ref) composed with the first symmetry op R[isym] mapping + iref onto iatom, with the orbital time-reversal applied for the magnetic op. + Returns (rotl, timeinv); callers apply their own basis transform (the full + transmat for a mixing basis, blkdiag(transmat, transmat) otherwise).""" + d = 2 * l + 1 + Dref = dmat(l, ref['a'], ref['b'], ref['g'], float(ref['iprop'])) + f = (ref['a'] + ref['g']) / 2.0 + spmt = np.zeros((2, 2), dtype=complex) + spmt[0, 0] = np.exp(1j * f) * math.cos(ref['b'] / 2.0) + spmt[1, 1] = np.conj(spmt[0, 0]) + f = -(ref['a'] - ref['g']) / 2.0 + spmt[0, 1] = np.exp(1j * f) * math.sin(ref['b'] / 2.0) + spmt[1, 0] = -np.conj(spmt[0, 1]) + rotl = np.zeros((2 * d, 2 * d), dtype=complex) + rotl[:d, :d] = spmt[0, 0] * Dref + rotl[d:, d:] = spmt[1, 1] * Dref + rotl[:d, d:] = spmt[0, 1] * Dref + rotl[d:, :d] = spmt[1, 0] * Dref + + op = next(o for o in ops if o['perm'][iref - 1] == iatom) + det2 = (op['krotm'][0, 0] * op['krotm'][1, 1] + - op['krotm'][0, 1] * op['krotm'][1, 0]) + timeinv = det2 < 0.0 + srot_phase = (op['g'] - op['a']) if timeinv else (op['a'] + op['g']) + rotl_sym = dmat(l, op['a'], op['b'], op['g'], float(op['iprop'])) + if timeinv: + rotl_sym = tmat(l) @ np.conj(rotl_sym) + ephase = np.exp(1j * srot_phase / 2.0) + tmp = np.zeros((2 * d, 2 * d), dtype=complex) + tmp[:d, :d] = ephase * rotl_sym + tmp[d:, d:] = np.conj(ephase) * rotl_sym + rotl = (tmp @ np.conj(rotl)) if timeinv else (tmp @ rotl) + return rotl, timeinv + + +def mixing_rotrep(op, l, P, ti): + """The full 2(2l+1) spinor representation D(R)_{new_i} = P spinrot P^dag of + one symmetry operation in a spin-coupling (mixing) basis, with the spinor + time-reversal operator applied for the magnetic (timeinv) operations + (setsym.f spinrotmat + timeinv_op). This is srot%rotrep(l,isrt)%mat, shared + by the symqmc and sympar shell matrices.""" + rotl = dmat(l, op['a'], op['b'], op['c'], float(op['iprop'])) + phase = (op['c'] - op['a']) if ti else (op['a'] + op['c']) + e = np.exp(1j * phase / 2) + d = 2 * l + 1 + spinrot = np.zeros((2 * d, 2 * d), dtype=complex) + if ti: # beta = pi, block-antidiagonal + spinrot[:d, d:] = e * rotl + spinrot[d:, :d] = -np.conj(e) * rotl + else: # beta = 0, block-diagonal + spinrot[:d, :d] = e * rotl + spinrot[d:, d:] = np.conj(e) * rotl + rotrep = P @ spinrot @ np.conj(P.T) + if ti: + rotrep = mixing_timeinv_op(l, P) @ np.conj(rotrep) + return rotrep + + +# --- case.indmftpr ----------------------------------------------------------- + +def read_indmftpr(indmftpr): + """Full structured parse of case.indmftpr. + + Returns a dict with nsort, mult, lmax, the spin-orbit flag `so`, the energy + window (e_bot, e_top, proj_mode) and one `sorts` entry per atomic sort with + its basis name, optional fromfile sourcefile path, and the correlated / + included l lists (l_inc==2 / l_inc in {1,2}). Every generator derives its + shell or orbital list from this one parse.""" + raw = [l.split('!')[0].strip() for l in open(indmftpr)] + raw = [l for l in raw if l != ''] + nsort = int(raw[0].split()[0]) + mult = [int(x) for x in raw[1].split()][:nsort] + lmax = int(raw[2].split()[0]) + i = 3 + so = 0 + sorts = [] + for isort in range(nsort): + basis = raw[i].split()[0] + i += 1 + sourcefile = None + if basis == 'fromfile': + sourcefile = os.path.join(os.path.dirname(indmftpr), raw[i]) + i += 1 + l_inc = [int(x) for x in raw[i].split()] + i += 1 + ireps = [int(x) for x in raw[i].split()] + i += 1 + correlated_ls = [l for l in range(len(l_inc)) if l_inc[l] == 2] + included_ls = [l for l in range(len(l_inc)) if l_inc[l] in (1, 2)] + if any(n > 0 for n in ireps): + i += 1 # skip the correps line + if correlated_ls: + so = int(raw[i].split()[0]) # SO flag follows a correlated sort + i += 1 + sorts.append(dict(basis=basis, sourcefile=sourcefile, + correlated_ls=correlated_ls, included_ls=included_ls)) + last = raw[-1].split() + e_bot, e_top = to_float(last[0]), to_float(last[1]) + proj_mode = int(last[2]) if len(last) >= 3 else 0 + return dict(nsort=nsort, mult=mult, lmax=lmax, sorts=sorts, so=so, + e_bot=e_bot, e_top=e_top, proj_mode=proj_mode) + + +# --- case.dmftsym ------------------------------------------------------------ + +def read_dmftsym(path, rotloc=False): + """Symmetry operations from case.dmftsym. Each op carries (perm, a, b, g, + iprop, krotm); the third Euler angle is named both `c` and `g` for the + callers that use either name. With rotloc=True also parse the + 'Global->local' representative rotloc per sort and return it as a third + value (setsym.f:437-455).""" + lines = open(path).read().split('\n') + nsym = int(lines[0].split()[0]) + perms = [[int(x) for x in lines[1 + i].split()] for i in range(nsym)] + starts = [i for i, l in enumerate(lines) if 'Sym. op.' in l] + ops = [] + for k, s in enumerate(starts[:nsym]): + toks = lines[s + 1].split() + a, b, g = (math.radians(float(x)) for x in toks[:3]) + iprop = int(toks[3]) + krotm = np.array([[to_float(x) for x in lines[s + 2 + r].split()] + for r in range(3)]) + ops.append(dict(perm=perms[k], a=a, b=b, c=g, g=g, iprop=iprop, + krotm=krotm)) + if not rotloc: + return nsym, ops + + gl = next(i for i, l in enumerate(lines) if 'Global->local' in l) + rotloc_ref = [] + j = gl + 1 + while len(rotloc_ref) < nsym and j < len(lines): + if lines[j].strip() == '' or not lines[j].split()[0].lstrip('-').isdigit(): + j += 1 + continue + # sort index line, then 3 krotm rows, then the Euler/iprop line. + if len(lines[j].split()) == 1: + krotm = np.array([[to_float(x) for x in lines[j + 1 + r].split()] + for r in range(3)]) + ang = lines[j + 4].split() + a, b, g = (math.radians(float(x)) for x in ang[:3]) + iprop = int(ang[3]) + rotloc_ref.append(dict(krotm=krotm, a=a, b=b, g=g, iprop=iprop)) + j += 5 + else: + j += 1 + return nsym, ops, rotloc_ref + + +# --- almblm parsing ---------------------------------------------------------- + +def read_almblm(path, info, projectors=False): + """Read one spin's almblm file in the dmftproj.f read order. + + With projectors=False keep only the header (elecn, nk, nloat, eferm), the + per-(sort,l) overlap block (u_dot_norm, nLO, ovl_LO_u, ovl_LO_udot) and the + per-k band data (nbmin/nbmax, Fermi-shifted eband, tetrahedron weights); the + per-(l,m) coefficient records are still consumed to keep the reader in sync + but their values are discarded (oubwin's window-only path). + + With projectors=True also accumulate the per-(l,m) Alm/Blm/Clm coefficients + in the canonical Wien2k packing lm = l*l + (m+l), for every atom of every + sort (ctqmcout/parproj).""" + nsort = info['nsort'] + lmax = info['lmax'] + mult = info['mult'] + nlm = (lmax + 1) ** 2 + natom = sum(mult) + + r = Reader(path) + elecn = to_float(r.record()[0]) + nk = int(r.record()[0]) + r.record() # nloat + eferm = to_float(r.record()[0]) + + nLO = {} + u_dot_norm = {} + ovl_LO_u = {} + ovl_LO_udot = {} + kp = [None] * nk + + for isrt in range(1, nsort + 1): + for l in range(lmax + 1): + u_dot_norm[(l, isrt)] = to_float(r.record()[0]) + n = int(r.record()[0]) + nLO[(l, isrt)] = n + for ilo in range(1, n + 1): + toks = r.record() + ovl_LO_u[(ilo, l, isrt)] = to_float(toks[0]) + ovl_LO_udot[(ilo, l, isrt)] = to_float(toks[1]) + for ik in range(nk): + r.skip() # "IK = .." banner + r.skip() # 3-int line + head = r.record() + nbmin, nbmax = int(head[1]), int(head[2]) + nb = nbmax - nbmin + 1 + if kp[ik] is None: + kp[ik] = dict(nbmin=nbmin, nbmax=nbmax, eband=None, + weight=None, tetr=None) + if projectors: + kp[ik].update( + Alm=np.zeros((nlm, natom + 1, nb), dtype=complex), + Blm=np.zeros((nlm, natom + 1, nb), dtype=complex), + Clm=np.zeros((4, nlm, natom + 1, nb), dtype=complex)) + eband = np.empty(nb) + tetr = np.empty(nb) + for off in range(nb): + toks = r.record() + tetr[off] = to_float(toks[0]) + eband[off] = to_float(toks[1]) + eband = eband - eferm + if kp[ik]['eband'] is None: + kp[ik]['eband'] = eband + kp[ik]['weight'] = tetr[0] + kp[ik]['tetr'] = tetr + for imu in range(1, mult[isrt - 1] + 1): + iatom = sum(mult[:isrt - 1]) + imu + r.skip() # banner + r.record() # idum + for off in range(nb): + lm = 0 + for l in range(lmax + 1): + for m in range(-l, l + 1): + alm, blm = read_two_complex(r) + for ilo in range(nLO[(l, isrt)]): + clm = read_complex(r) + if projectors: + kp[ik]['Clm'][ilo, lm, iatom, off] = clm + if projectors: + kp[ik]['Alm'][lm, iatom, off] = alm + kp[ik]['Blm'][lm, iatom, off] = blm + lm += 1 + + return dict(elecn=elecn, eferm=eferm, nk=nk, nlm=nlm, natom=natom, + nLO=nLO, u_dot_norm=u_dot_norm, ovl_LO_u=ovl_LO_u, + ovl_LO_udot=ovl_LO_udot, kp=kp) + + +# --- band-window selection (set_projections.f, proj_mode==0) ----------------- + +def select_window(nbmin, nbmax, eband, e1, e2): + """proj_mode==0 contiguous band selection for one k-point over the energy + array `eband` (already Fermi-shifted). The first band with e1 < E <= e2 + opens the window; the first band above it with E > e2 closes it at the + preceding index; a window reaching nbmax closes at nbmax. Returns + (included, nb_bot, nb_top) with nb_bot=nb_top=0 when no band qualifies.""" + included = False + nb_bot = nb_top = 0 + for off, ib in enumerate(range(nbmin, nbmax + 1)): + e = eband[off] + if not included and e > e1 and e <= e2: + included = True + nb_bot = ib + elif included and e > e2: + nb_top = ib - 1 + break + elif ib == nbmax and e > e1 and e <= e2: + nb_top = ib + included = True + if not included: + nb_bot = nb_top = 0 + return included, nb_bot, nb_top + + +def select_band_window(nbmin, nbmax, b_bot, b_top): + """proj_mode 1/2 band-index selection for one k-point (set_projections.f + 70-88). e1/e2 are band indices, not energies: every k-point is included, + nb_bot = b_bot clamped up to nbmin (strict INT(e1) > nbmin), nb_top = b_top + clamped down to nbmax. Returns (included=True, nb_bot, nb_top).""" + nb_bot = b_bot if b_bot > nbmin else nbmin + nb_top = b_top if b_top < nbmax else nbmax + return True, nb_bot, nb_top + + +def band_index_window(info, spins): + """Resolve the (b_bot, b_top) band-index window for proj_mode 1 and 2. + + proj_mode 2 (dmftproj.f:233-237): b_bot=INT(e_bot), b_top=INT(e_top) taken + directly from the indmftpr window line. + + proj_mode 1 (dmftproj.f:704-722): e_bot/e_top are Fermi-shifted energies; + scan every spin and k-point for bands with e_bot < E <= e_top and take the + global min/max band index, seeded with b_bot=1000, b_top=1 so an empty scan + keeps that seed. `spins` is the list of read_almblm dicts (one per spin).""" + if info['proj_mode'] == 2: + return int(info['e_bot']), int(info['e_top']) + if info['proj_mode'] != 1: + raise ValueError('band_index_window is only valid for proj_mode 1 or 2') + e_bot, e_top = info['e_bot'], info['e_top'] + b_bot, b_top = 1000, 1 + for sp in spins: + for kp in sp['kp']: + for off, ib in enumerate(range(kp['nbmin'], kp['nbmax'] + 1)): + e = kp['eband'][off] + if e > e_bot and e <= e_top: + if ib > b_top: + b_top = ib + if ib < b_bot: + b_bot = ib + return b_bot, b_top + + +# --- gfortran-style real formatters ------------------------------------------ + +def fmt(x): + """One list-directed real, gfortran-style (leading sign space, ~17 sig).""" + return ' %.16E' % float(x) + + +def write_row(f, arr): + f.write(''.join(fmt(x) for x in arr) + '\n') + + +def fmt_scalar(x): + x = float(x) + return '%.16f' % x if abs(x) < 1e5 else '%.16E' % x diff --git a/python/triqs_dftkit/wien2k/ctqmcout.py b/python/triqs_dftkit/wien2k/ctqmcout.py new file mode 100644 index 0000000..b46bd80 --- /dev/null +++ b/python/triqs_dftkit/wien2k/ctqmcout.py @@ -0,0 +1,433 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python generation of the dmftproj correlated-shell projector file +(case.ctqmcout), replacing the projector path of the dmftproj Fortran +executable (outputqmc.f subroutine outqmc). + +Given the alm/blm coefficient files (case.almblmup / case.almblmdn, one per +spin), the projector definition (case.indmftpr), the structure +(case.struct) and the symmetry input (case.dmftsym), this rebuilds the +correlated (Wannier) projector pr_crorb%mat_rep and writes case.ctqmcout in +the format the converter reads. + +It follows the Fortran path field by field: + +- almblm read order (dmftproj.f:559-689): header, per-sort per-l overlap + block, then per-k banners + idum/nbmin/nbmax + rtetr/eband lines, then the + per-(l,m) (Alm,Blm) / Clm complex coefficients in the canonical Wien2k lm + packing lm = l*l + (m+l) + 1. +- band-window selection (set_projections.f:89-129, proj_mode==0). +- raw correlated projector P(m,ib) = Alm(lm) + sum_ilo Clm(ilo,lm)*ovl_LO_u + (set_projections.f:243-267); Blm and the radial s12 do not enter pr_crorb. +- local rotation rot_projectmat (Wigner-D of rotloc, identity here) then the + angular-basis transform mat_rep = transmat . (Rloc . P) where transmat = + is the cubic-harmonics transform (set_projections.f:450-478). +- Loewdin orthonormalization of the stacked correlated projectors, + P <- O^{-1/2} P with O = D D^H over all correlated rows + (orthogonal_wannier_SO, dmftproj.f:847). This step is what the ctqmcout + numbers carry; it is applied per k over the full ndim x nbands stack. +- the Rloc spinor block rotloc%rotrep (outputqmc.f:303-313), built from the + symmetry operation mapping the representative atom onto each equivalent one + (set_rotloc.f / setsym.f). + +ctqmcout layout is outputqmc.f:66-613. The cubic transform uses the exact +analytic harmonics; with the precision-fixed dmftproj (full double precision +templates and KIND=8 casts) the port reproduces case.ctqmcout to machine +precision on a full-rank window. +""" + +import os +import numpy as np +from scipy.linalg.lapack import zheev +from scipy.linalg.blas import zgemm + +from ._dmftproj import (band_index_window, dmat, fmt_scalar, read_almblm, + read_dmftsym, read_fromfile, read_indmftpr, reptrans, + rotloc_rotl_so, select_band_window, select_window, + tmat, write_row) + + +def _sqrt_inv(O): + """O^{-1/2} of a Hermitian matrix, reproducing orthogonal.f sqrtm + (inv=.TRUE.: Z diag(w^{-1/2}) Z^H). Use the same LAPACK routine the Fortran + calls, ZHEEV('V','U'), via scipy so the eigenvectors match rather than the + divide-and-conquer ZHEEVD of numpy.linalg.eigh. dmftproj takes 1/sqrt of the + eigenvalue as a *complex* sqrt (W_comp = CMPLX(W,0)); reproduce that with a + complex power. The result D1 @ conj(Z).T matches the Fortran's ZGEMM('N','T'). + + With a full-rank overlap (enough bands for the correlated spin-orbitals) the + eigenvectors are unique and ctqmcout matches dmftproj to machine precision. + A rank-deficient overlap (narrow window, more orbitals than bands) makes the + near-null eigenvectors non-unique, so O^{-1/2} amplifies the last-ULP libm + difference; that is a numerical property of the degenerate case, not the + port (see the ctqmcout test, which uses a full-rank window).""" + w, Z, info = zheev(O, compute_v=1, lower=0) # 'V', 'U' + D1 = Z * (w.astype(complex) ** -0.5) # Z @ diag(w^{-1/2}) + return zgemm(1.0, D1, np.conj(Z), trans_b=1) # ZGEMM('N','T'): D1 @ conj(Z)^T + + +# --- correlated / included orbital descriptors ------------------------------- + +def _build_crorbs(info): + crorbs = [] + for isort in range(1, info['nsort'] + 1): + sortinfo = info['sorts'][isort - 1] + for l in sortinfo['correlated_ls']: + for imu in range(1, info['mult'][isort - 1] + 1): + atom = sum(info['mult'][:isort - 1]) + imu + crorbs.append(dict(atom=atom, sort=isort, l=l, + basis=sortinfo['basis'], first=(imu == 1))) + return crorbs + + +def _build_orbs(info): + orbs = [] + for isort in range(1, info['nsort'] + 1): + sortinfo = info['sorts'][isort - 1] + for l in sortinfo['included_ls']: + for imu in range(1, info['mult'][isort - 1] + 1): + atom = sum(info['mult'][:isort - 1]) + imu + orbs.append(dict(atom=atom, sort=isort, l=l)) + return orbs + + +# --- Rloc spinor representation (set_rotloc.f / setsym.f) --------------------- + +def _rloc_rotrep(op, l, transmat, ifSO): + """rotloc%rotrep(l)%mat, the Rloc rotation in the new basis for a non-mixing + shell, with identity struct local rotation (rotloc_ref Euler = 0). + + Under SO it is the 2(2l+1) spinor rotation: rotloc%rotl = + blkdiag(ephase*D, conj(ephase)*D), rotrep = S rotl S^H, S = + blkdiag(transmat, transmat). Without SO srot%timeinv is always false, there + is no spin phase, and it reduces to the bare (2l+1) transmat D transmat^H + (set_rotloc.f non-SO branch). Returns (rotrep, timeinv).""" + a, b, g, iprop = op['a'], op['b'], op['g'], op['iprop'] + D = dmat(l, a, b, g, float(iprop)) + if not ifSO: + return transmat @ D @ np.conj(transmat.T), False + krotm = op['krotm'] + det2 = krotm[0, 0] * krotm[1, 1] - krotm[0, 1] * krotm[1, 0] + timeinv = det2 < 0.0 + phase = (g - a) if timeinv else (a + g) + if timeinv: + D = tmat(l) @ np.conj(D) # setsym.f:320-326 orbital time reversal + ephase = np.exp(1j * phase / 2) + d = 2 * l + 1 + rotl = np.zeros((2 * d, 2 * d), dtype=complex) + rotl[:d, :d] = ephase * D + rotl[d:, d:] = np.conj(ephase) * D + S = np.zeros((2 * d, 2 * d), dtype=complex) + S[:d, :d] = transmat + S[d:, d:] = transmat + rotrep = S @ rotl @ np.conj(S.T) + return rotrep, timeinv + + +def _rloc_rotrep_mixing(l, ref, ops, iatom, iref, P): + """rotloc(iatom)%rotrep(l)%mat for a mixing SO shell: the composed Rloc + spinor rotation (rotloc_rotl_so) put into the new basis with the full + 2(2l+1) transmat P (set_rotloc.f mixing branch). Returns (rotrep, timeinv).""" + rotl, timeinv = rotloc_rotl_so(l, ref, ops, iatom, iref) + rotrep = (P @ rotl @ P.T) if timeinv else (P @ rotl @ np.conj(P.T)) + return rotrep, timeinv + + +# --- ctqmcout writer --------------------------------------------------------- + +def write_ctqmcout(case): + """Read .almblm{up,dn}, .indmftpr, .struct, + .dmftsym and write .ctqmcout in the dmftproj format.""" + info = read_indmftpr(case + '.indmftpr') + nsym, ops, rotloc_ref = read_dmftsym(case + '.dmftsym', rotloc=True) + + up, dn = case + '.almblmup', case + '.almblmdn' + if os.path.exists(up) and os.path.exists(dn): + spin_files = [up, dn] + else: + spin_files = [case + '.almblm'] + ifSP = len(spin_files) == 2 + ifSO = bool(info['so']) + ns = 2 if ifSP else 1 + + spins = [read_almblm(p, info, projectors=True) for p in spin_files] + nk = spins[0]['nk'] + elecn = spins[0]['elecn'] + + crorbs = _build_crorbs(info) + orbs = _build_orbs(info) + ncrorb = len(crorbs) + norb = len(orbs) + + # band-index window for proj_mode 1/2 (set_projections is called with band + # indices, not energies). proj_mode 1 scans all spins for the global window. + bw = band_index_window(info, spins) if info['proj_mode'] != 0 else None + + # window in [e_bot, e_top] (proj_mode 0) or [b_bot, b_top] (mode 1/2) + windows = [] + for ik in range(nk): + kp = spins[0]['kp'][ik] + if info['proj_mode'] == 0: + windows.append(select_window( + kp['nbmin'], kp['nbmax'], kp['eband'], + info['e_bot'], info['e_top'])) + else: + windows.append(select_band_window( + kp['nbmin'], kp['nbmax'], bw[0], bw[1])) + + # window below e_bot (mode 0) or below b_bot (mode 1/2), for qbbot. + # Mode 1/2: set_projections(1, b_bot-1) -> select_band_window with top=b_bot-1. + win_below = [] + for ik in range(nk): + kp = spins[0]['kp'][ik] + if info['proj_mode'] == 0: + win_below.append(select_window( + kp['nbmin'], kp['nbmax'], kp['eband'], -1e6, info['e_bot'])) + else: + win_below.append(select_band_window( + kp['nbmin'], kp['nbmax'], 1, bw[0] - 1)) + + # qbbot: point integration over bands below e_bot, is=1 only under SO + qbbot = 0.0 + for ispin in range(ns): + for ik in range(nk): + incl, nb_bot, nb_top = win_below[ik] + if incl: + qbbot += (nb_top - nb_bot + 1) * spins[ispin]['kp'][ik]['weight'] + if ifSO: + break + + transmats = {} + mixing = {} + for cr in crorbs: + key = (cr['l'], cr['sort']) + if cr['basis'] == 'fromfile': + transmats[key], mixing[key] = read_fromfile( + info['sorts'][cr['sort'] - 1]['sourcefile'], cr['l']) + else: + transmats[key], mixing[key] = reptrans(cr['basis'], cr['l']), False + + # rotloc Euler angles per crorb: the symmetry op mapping the representative + # atom of the sort onto this atom (set_rotloc.f). With identity struct + # local rotation, rotloc%(a,b,g,iprop) are that op's Euler angles, and + # rot_projectmat applies dmat(l, a, b, g, iprop) in the |lm> basis + # (rot_projectmat.f:59-65). For atom 2 this is a non-trivial in-plane + # rotation (a=270) that mixes the m-rows; omitting it flips the m=1,2 rows. + rotloc_op = {} + for icr, cr in enumerate(crorbs): + iref = sum(info['mult'][:cr['sort'] - 1]) + 1 + rotloc_op[icr] = next(o for o in ops + if o['perm'][iref - 1] == cr['atom']) + + # ---- raw correlated projector mat_rep, then Loewdin orthonormalize ---- + # Non-mixing: mat_rep[(icr, ik, is)] -> (2l+1, nbsel) per spin block. + # Mixing: mat_rep[(icr, ik)] -> (2*(2l+1), nbsel), the stacked spinor block. + mat_rep = {} + for icr, cr in enumerate(crorbs): + l = cr['l'] + atom = cr['atom'] + sort = cr['sort'] + d = 2 * l + 1 + transmat = transmats[(l, sort)] + ismix = mixing[(l, sort)] + op = rotloc_op[icr] + rot = dmat(l, op['a'], op['b'], op['g'], float(op['iprop'])) + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + kp0 = spins[0]['kp'][ik] + off_bot = nb_bot - kp0['nbmin'] + off_top = nb_top - kp0['nbmin'] + nbsel = off_top - off_bot + 1 + spin_blocks = [] + for ispin in range(ns): + sp = spins[ispin] + kp = sp['kp'][ik] + nlo = sp['nLO'][(l, sort)] + P = np.zeros((d, nbsel), dtype=complex) + for mi, m in enumerate(range(-l, l + 1)): + lm = l * l + (m + l) # 0-based packed index + for j, off in enumerate(range(off_bot, off_top + 1)): + val = kp['Alm'][lm, atom, off] + for ilo in range(nlo): + val += kp['Clm'][ilo, lm, atom, off] * \ + sp['ovl_LO_u'][(ilo + 1, l, sort)] + P[mi, j] = val + spin_blocks.append(rot @ P) # rot_projectmat per spin + if ismix: + stack = np.vstack(spin_blocks) # (2*(2l+1), nbsel), up then dn + mat_rep[(icr, ik)] = transmat @ stack + else: + for ispin in range(ns): + mat_rep[(icr, ik, ispin)] = transmat @ spin_blocks[ispin] + + # Loewdin orthonormalization. Under SO (orthogonal_wannier_SO) the up+dn + # blocks of each crorb are stacked together and a single overlap is + # orthonormalized per k. Without SO (orthogonal_wannier) spin is a good + # quantum number, so each spin is orthonormalized independently over the + # stack of (2l+1)-wide crorb blocks of that spin. + if ifSO: + ortho_groups = [[(ik, None)] for ik in range(nk)] + else: + ortho_groups = [[(ik, ispin)] for ik in range(nk) for ispin in range(ns)] + for group in ortho_groups: + (ik, gspin) = group[0] + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + blocks = [] + layout = [] # (key, nrows) + for icr, cr in enumerate(crorbs): + l = cr['l'] + if ifSO and mixing[(l, cr['sort'])]: + blocks.append(mat_rep[(icr, ik)]) + layout.append(((icr, ik), 2 * (2 * l + 1))) + elif ifSO: + for ispin in range(ns): + blocks.append(mat_rep[(icr, ik, ispin)]) + layout.append(((icr, ik, ispin), 2 * l + 1)) + else: + blocks.append(mat_rep[(icr, ik, gspin)]) + layout.append(((icr, ik, gspin), 2 * l + 1)) + D = np.vstack(blocks) # ndim x nbnd + # match the Fortran's exact BLAS calls (orthogonal_wannier[_SO]): the + # near-singular O^{-1/2} amplifies any last-bit difference, so use the + # identical ZGEMM trans flags rather than numpy's conj-transpose copies. + O = zgemm(1.0, D, D, trans_b=2) # ZGEMM('N','C'): D @ D^H + S = _sqrt_inv(O) + D_orth = zgemm(1.0, S, D) # ZGEMM('N','N'): O^{-1/2} @ D + row = 0 + for key, nrows in layout: + mat_rep[key] = D_orth[row:row + nrows, :] + row += nrows + + # ---- Rloc rotrep per crorb ---- + rloc_blocks = [] + for cr in crorbs: + l = cr['l'] + transmat = transmats[(l, cr['sort'])] + iref = sum(info['mult'][:cr['sort'] - 1]) + 1 + if mixing[(l, cr['sort'])]: + rloc_blocks.append(_rloc_rotrep_mixing( + l, rotloc_ref[cr['sort'] - 1], ops, cr['atom'], iref, transmat)) + else: + op = next(o for o in ops if o['perm'][iref - 1] == cr['atom']) + rloc_blocks.append(_rloc_rotrep(op, l, transmat, ifSO)) + + # ---- write ---- + with open(case + '.ctqmcout', 'w') as f: + f.write('13.605698\n') + f.write('%6d\n' % nk) + f.write('%6d\n' % (1 if ifSP else 0)) + f.write('%6d\n' % (1 if ifSO else 0)) + f.write(' %s\n' % fmt_scalar(qbbot)) + f.write(' %s\n' % fmt_scalar(elecn)) + + f.write('%6d\n' % norb) + for o in orbs: + dim = 2 * (2 * o['l'] + 1) if ifSO else 2 * o['l'] + 1 + f.write('%6d %6d %6d %6d \n' % (o['atom'], o['sort'], o['l'], dim)) + + f.write('%6d\n' % ncrorb) + for cr in crorbs: + l = cr['l'] + size = 2 * (2 * l + 1) if ifSO else 2 * l + 1 + f.write('%6d %6d %6d %6d %6d %6d \n' % + (cr['atom'], cr['sort'], l, size, 1 if ifSO else 0, 1)) + + # Rloc block per crorb. SO writes the 2*(2l+1) spinor whole shell; + # non-SO the bare (2l+1) shell. The time-reversal flag follows under + # SO always, under non-SO only when ifSP (outputqmc.f:347-351). + for rotrep, timeinv in rloc_blocks: + for m in range(rotrep.shape[0]): + write_row(f, rotrep[m, :].real) + for m in range(rotrep.shape[0]): + write_row(f, rotrep[m, :].imag) + if ifSO or ifSP: + f.write('%6d\n' % (1 if timeinv else 0)) + + # complex-harmonics -> basis transform block (crorb%first only). Mixing + # writes the full 2(2l+1) transmat; non-mixing the spin block-diagonal. + for cr in crorbs: + if not cr['first']: + continue + l = cr['l'] + transmat = transmats[(l, cr['sort'])] + d = 2 * l + 1 + if mixing[(l, cr['sort'])]: + spinrot = transmat + elif ifSO: + spinrot = np.zeros((2 * d, 2 * d), dtype=complex) + spinrot[:d, :d] = transmat + spinrot[d:, d:] = transmat + else: + spinrot = transmat # bare (2l+1) transform, non-SO + dim = spinrot.shape[0] + f.write('%6d %6d \n' % (1, dim)) + for m in range(dim): + write_row(f, spinrot[m, :].real) + for m in range(dim): + write_row(f, spinrot[m, :].imag) + + # number of bands per k (skip is=2 under SO) + for ispin in range(ns): + if ifSP and ifSO and ispin == 1: + continue + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + f.write('%6d\n' % abs(nb_top - nb_bot + 1)) + + # projector block: DO ik, DO icrorb. Mixing writes the full 2(2l+1) + # block from is=1; non-mixing the two (2l+1) spin blocks. + for ik in range(nk): + for icr, cr in enumerate(crorbs): + l = cr['l'] + if mixing[(l, cr['sort'])]: + P = mat_rep[(icr, ik)] + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].real) + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].imag) + continue + for ispin in range(ns): + P = mat_rep[(icr, ik, ispin)] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].real) + for ispin in range(ns): + P = mat_rep[(icr, ik, ispin)] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].imag) + + # k-weights + for ik in range(nk): + f.write(' %s\n' % fmt_scalar(spins[0]['kp'][ik]['weight'])) + + # H(k) eigenvalues (skip is=2 under SO) + for ispin in range(ns): + if ifSP and ifSO and ispin == 1: + continue + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + kp = spins[ispin]['kp'][ik] + for ib in range(nb_bot, nb_top + 1): + f.write(' %s\n' % fmt_scalar(kp['eband'][ib - kp['nbmin']])) diff --git a/python/triqs_dftkit/wien2k/dmftproj.py b/python/triqs_dftkit/wien2k/dmftproj.py new file mode 100644 index 0000000..bbaa927 --- /dev/null +++ b/python/triqs_dftkit/wien2k/dmftproj.py @@ -0,0 +1,70 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python drop-in for the dmftproj Fortran executable. + +`run_dmftproj(case)` reads the Wien2k projector inputs (case.almblm{up,dn}, +case.indmftpr, case.struct, case.dmftsym) and writes every case.* file the +Wien2k converter consumes: case.ctqmcout, case.symqmc, case.sympar, +case.parproj and case.oubwin{,up,dn}. With `band=True` it writes case.outband +from the band k-path (case.klist_band) instead, the dmftproj -band mode that +feeds convert_bands_input. Each output is produced by the corresponding +generator, all validated to machine precision against the precision-fixed +dmftproj. + +Run as a script (`python -m triqs_dftkit.wien2k.dmftproj -sp -so [-band]`) it +mimics the Fortran binary: the case name is the working-directory basename. +""" + +import os +import sys + +from . import ctqmcout, outband, oubwin, parproj, symqmc, sympar + + +def run_dmftproj(case, band=False): + """Write the dmftproj output files for `case` (a path prefix). The band + mode (dmftproj -band) writes case.outband; otherwise the SCF projector + files the converter's convert_dft_input / convert_parproj_input read.""" + if band: + outband.write_outband(case) + return + symqmc.write_symqmc(case) + ctqmcout.write_ctqmcout(case) + sympar.write_sympar(case) + parproj.write_parproj(case) + oubwin.write_oubwin(case) + + +def main(argv=None): + # The Fortran dmftproj takes the case name from the working directory; -sp + # and -so are inferred from the input files, so they are accepted for + # compatibility and ignored. -band selects the band-structure output. + argv = sys.argv[1:] if argv is None else argv + for flag in argv: + if flag not in ('-sp', '-so', '-band'): + raise SystemExit(f'dmftproj: unknown flag {flag}') + case = os.path.basename(os.getcwd()) + run_dmftproj(case, band='-band' in argv) + + +if __name__ == '__main__': + main() diff --git a/python/triqs_dftkit/wien2k/oubwin.py b/python/triqs_dftkit/wien2k/oubwin.py new file mode 100644 index 0000000..798757a --- /dev/null +++ b/python/triqs_dftkit/wien2k/oubwin.py @@ -0,0 +1,123 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python generation of the dmftproj band-window file (case.oubwin), +replacing the corresponding output of the dmftproj Fortran executable. + +Given the alm/blm coefficient file (case.almblm, or the spin pair +case.almblmup / case.almblmdn) and the projector definition (case.indmftpr), +this selects, per k-point and spin, the contiguous band range whose Fermi- +shifted Kohn-Sham eigenvalues fall in the energy window, and writes the +result in the case.oubwin format read by the charge self-consistency. + +It reproduces the Fortran path: read elecn/nk/nloat/eferm from the almblm +header (outbwin.f / dmftproj.f), parse the energy window (e_bot, e_top, +proj_mode) from the last line of case.indmftpr, shift every band eigenvalue +by eferm, and apply the set_projections.f selection. For proj_mode==0 this is +the energy-window rule (strict lower bound e_bot < E, inclusive upper bound +E <= e_top, yielding a single contiguous [nb_bot, nb_top] per k). For +proj_mode 1 and 2 the window is a pair of band indices (b_bot, b_top): every +k-point is included with nb_bot/nb_top those indices clamped to the local +nbmin/nbmax (set_projections.f:70-88). In mode 2 the indices come straight +from the window line; in mode 1 they are the global min/max band index over +all spins/k whose Fermi-shifted energy lies in (e_bot, e_top] +(dmftproj.f:704-722). The weight written per included k-point is the +tetrahedron weight of the lowest band nbmin. + +Spin-polarization is detected from the input files: case.almblmup / +case.almblmdn present => two spin files (case.oubwinup / case.oubwindn), +otherwise the single case.oubwin. The spin-orbit flag (ifSO) comes from +case.indmftpr; with -so the up and dn windows must coincide and dmftproj +aborts otherwise, a check this generator also performs. +""" + +import os + +from ._dmftproj import (band_index_window, read_almblm, read_indmftpr, + select_band_window, select_window) + + +def _windows_from_spin(sp, info, band_window): + """Per-k (included, nb_bot, nb_top, weight) for one already-read spin dict. + proj_mode==0 uses the energy window; modes 1/2 use the band-index window + (b_bot, b_top) precomputed in band_window.""" + out = [] + for kp in sp['kp']: + if info['proj_mode'] == 0: + incl, nb_bot, nb_top = select_window( + kp['nbmin'], kp['nbmax'], kp['eband'], + info['e_bot'], info['e_top']) + else: + incl, nb_bot, nb_top = select_band_window( + kp['nbmin'], kp['nbmax'], band_window[0], band_window[1]) + out.append((incl, nb_bot, nb_top, kp['weight'])) + return out + + +def _write_oubwin_file(path, ifso, windows): + """Write one case.oubwin spin file (outbwin.f). Integer fields are i6; + the per-k weight is a list-directed real. Not-included k-points emit only + the flag line.""" + with open(path, 'w') as f: + f.write('%6d\n' % len(windows)) + f.write('%6d\n' % (1 if ifso else 0)) + for incl, nb_bot, nb_top, weight in windows: + f.write('%6d\n' % (1 if incl else 0)) + if incl: + f.write('%6d%6d\n' % (nb_bot, nb_top)) + f.write(' %.16f \n' % weight) + + +def write_oubwin(case): + """Read .almblm{up,dn} (or .almblm) and write the matching + .oubwin{up,dn} (or .oubwin) in the dmftproj format. + + Spin-polarization is inferred from the input files. The spin-orbit flag + written into every file comes from case.indmftpr; under -sp+-so the up/dn + windows must coincide (dmftproj aborts otherwise).""" + info = read_indmftpr(case + '.indmftpr') + ifso = bool(info['so']) + + up, dn = case + '.almblmup', case + '.almblmdn' + spin_polarized = os.path.exists(up) and os.path.exists(dn) + + if spin_polarized: + sp_up = read_almblm(up, info) + sp_dn = read_almblm(dn, info) + # mode 1 scans both spins for the global band-index window. + bw = (band_index_window(info, [sp_up, sp_dn]) + if info['proj_mode'] != 0 else None) + win_up = _windows_from_spin(sp_up, info, bw) + win_dn = _windows_from_spin(sp_dn, info, bw) + if ifso: + for u, d in zip(win_up, win_dn): + if u[0] != d[0] or u[1] != d[1] or u[2] != d[2]: + raise ValueError( + 'spin-orbit run requires identical up/dn band ' + 'windows at every k-point') + _write_oubwin_file(case + '.oubwinup', ifso, win_up) + _write_oubwin_file(case + '.oubwindn', ifso, win_dn) + else: + sp = read_almblm(case + '.almblm', info) + bw = (band_index_window(info, [sp]) + if info['proj_mode'] != 0 else None) + win = _windows_from_spin(sp, info, bw) + _write_oubwin_file(case + '.oubwin', ifso, win) diff --git a/python/triqs_dftkit/wien2k/outband.py b/python/triqs_dftkit/wien2k/outband.py new file mode 100644 index 0000000..c4e3a12 --- /dev/null +++ b/python/triqs_dftkit/wien2k/outband.py @@ -0,0 +1,329 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python generation of the dmftproj band-structure projector file +(case.outband), replacing the -band path of the dmftproj Fortran executable +(outband.f). + +case.outband feeds the converter method convert_bands_input: it is the +band-structure analog of case.ctqmcout. The correlated-shell projectors are +built exactly as in ctqmcout.py (raw Alm/Clm projector -> rot_projectmat local +rotation -> cubic/fromfile transmat -> Loewdin orthonormalization +orthogonal_wannier_SO), but evaluated on a band k-path and written in the +outband layout. case.outband also carries the raw radial-normalized Theta +projector pr_orb%matn_rep for every included shell (the parproj.py path, no +Loewdin) and the k-path labels. + +Two band-mode differences from the ctqmcout path (dmftproj.f:557-581): + +- nkband, the number of k-points along the plotted k-path, is read from + .klist_band (read_k_list.f). It is written in the header and drives the + k-label block; the per-k projector/band data loop over the almblm nk, which is + the single representative k-point lapw2 -almd writes in band mode. +- the Fermi energy is read from the LAST line of .indmftpr, not from the + almblm header; the band almblm keeps the eferm record as a placeholder that + the reader skips (READ(iualmblm,*) with no target). + +outband layout is outband.f:56-278: nkband, the per-spin per-k band counts, the +Loewdin correlated projectors (DO ik, DO icrorb), H(k) eigenvalues, the +included-orbital radial sizes, the raw Theta projectors, and the k-labels. +""" + +import os +import tempfile +import numpy as np +from scipy.linalg.blas import zgemm + +from ._dmftproj import (dmat, read_almblm, read_dmftsym, read_fromfile, + read_indmftpr, reptrans, select_window, to_float, + write_row) +from .ctqmcout import _build_crorbs, _sqrt_inv +from .parproj import (_build_matn_rep, _build_matn_rep_mixing, _build_orbs) + + +def _read_indmftpr_band(indmftpr): + """case.indmftpr in band mode: the standard parse, plus the Fermi energy + appended as the last physical line after the (e_bot e_top proj_mode) window + line. The trailing scalar would be mistaken for the window line, so feed + read_indmftpr the file without that record and return eferm separately.""" + raw = [l.split('!')[0].rstrip('\n') for l in open(indmftpr)] + nonblank = [i for i, l in enumerate(raw) if l.strip() != ''] + eferm = to_float(raw[nonblank[-1]].split()[0]) + tmp = tempfile.NamedTemporaryFile('w', suffix='.indmftpr', delete=False, + dir=os.path.dirname(os.path.abspath(indmftpr))) + tmp.write('\n'.join(raw[:nonblank[-1]]) + '\n') + tmp.close() + try: + info = read_indmftpr(tmp.name) + finally: + os.unlink(tmp.name) + return info, eferm + + +def _read_almblm_band(path, info, eferm): + """Band-mode almblm read: identical to read_almblm but the header eferm + record is a placeholder the band path ignores; the Fermi shift uses the + eferm passed in (from case.indmftpr, dmftproj.f:576-581). read_almblm reads + the 4th record as eferm, so overwrite that record with the indmftpr value.""" + text = open(path).read().splitlines() + text[3] = ' %.16E' % eferm # Reader record 4 (physical line index 3) + tmp = tempfile.NamedTemporaryFile('w', suffix='.almblm', delete=False) + tmp.write('\n'.join(text) + '\n') + tmp.close() + try: + return read_almblm(tmp.name, info, projectors=True) + finally: + os.unlink(tmp.name) + + +def read_k_list(path): + """nkband and the k-path labels from .klist_band (read_k_list.f). + + Every physical line up to the END marker is a k-point; a line whose first + character is not a blank carries a label, whose position is the k-point + index and whose name is the leading non-blank token. Returns + (nkband, [(pos, name), ...]).""" + lines = open(path).read().splitlines() + nkband = 0 + labels = [] + for line in lines: + if line[:3] == 'END': + break + nkband += 1 + if line[:1] != ' ': + labels.append((nkband, line.split()[0])) + return nkband, labels + + +def write_outband(case): + """Read .almblm{up,dn}, .indmftpr, .struct, + .dmftsym and .klist_band and write .outband in the + dmftproj band format.""" + info, eferm = _read_indmftpr_band(case + '.indmftpr') + nsym, ops, rotloc_ref = read_dmftsym(case + '.dmftsym', rotloc=True) + + up, dn = case + '.almblmup', case + '.almblmdn' + if os.path.exists(up) and os.path.exists(dn): + spin_files = [up, dn] + else: + spin_files = [case + '.almblm'] + ifSP = len(spin_files) == 2 + ifSO = bool(info['so']) + ns = 2 if ifSP else 1 + + spins = [_read_almblm_band(p, info, eferm) for p in spin_files] + nk = spins[0]['nk'] + info['nk'] = nk + + nkband, labels = read_k_list(case + '.klist_band') + + crorbs = _build_crorbs(info) + orbs = _build_orbs(info) + ncrorb = len(crorbs) + norb = len(orbs) + + # proj_mode 0 energy window [e_bot, e_top] per k (band path: proj_mode 0). + windows = [] + for ik in range(nk): + kp = spins[0]['kp'][ik] + windows.append(select_window(kp['nbmin'], kp['nbmax'], kp['eband'], + info['e_bot'], info['e_top'])) + + transmats = {} + mixing = {} + for o in orbs: + key = (o['l'], o['sort']) + if key in transmats: + continue + if o['basis'] == 'fromfile': + transmats[key], mixing[key] = read_fromfile( + info['sorts'][o['sort'] - 1]['sourcefile'], o['l']) + else: + transmats[key], mixing[key] = reptrans(o['basis'], o['l']), False + + # rot_projectmat local rotation: the op mapping the sort representative onto + # this atom (set_projections.f via rot_projectmat). Same as ctqmcout/parproj. + rotloc_op = {} + for o in orbs: + iref = sum(info['mult'][:o['sort'] - 1]) + 1 + rotloc_op[o['atom']] = next(op for op in ops + if op['perm'][iref - 1] == o['atom']) + + # ---- correlated projector mat_rep, then Loewdin orthonormalize ---- + mat_rep = {} + for icr, cr in enumerate(crorbs): + l = cr['l'] + atom = cr['atom'] + sort = cr['sort'] + d = 2 * l + 1 + transmat = transmats[(l, sort)] + ismix = mixing[(l, sort)] + op = rotloc_op[atom] + rot = dmat(l, op['a'], op['b'], op['g'], float(op['iprop'])) + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + kp0 = spins[0]['kp'][ik] + off_bot = nb_bot - kp0['nbmin'] + off_top = nb_top - kp0['nbmin'] + nbsel = off_top - off_bot + 1 + spin_blocks = [] + for ispin in range(ns): + sp = spins[ispin] + kp = sp['kp'][ik] + nlo = sp['nLO'][(l, sort)] + P = np.zeros((d, nbsel), dtype=complex) + for mi, m in enumerate(range(-l, l + 1)): + lm = l * l + (m + l) + for j, off in enumerate(range(off_bot, off_top + 1)): + val = kp['Alm'][lm, atom, off] + for ilo in range(nlo): + val += kp['Clm'][ilo, lm, atom, off] * \ + sp['ovl_LO_u'][(ilo + 1, l, sort)] + P[mi, j] = val + spin_blocks.append(rot @ P) + if ismix: + stack = np.vstack(spin_blocks) + mat_rep[(icr, ik)] = transmat @ stack + else: + for ispin in range(ns): + mat_rep[(icr, ik, ispin)] = transmat @ spin_blocks[ispin] + + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + blocks = [] + layout = [] + for icr, cr in enumerate(crorbs): + l = cr['l'] + if mixing[(l, cr['sort'])]: + blocks.append(mat_rep[(icr, ik)]) + layout.append(((icr, ik), 2 * (2 * l + 1))) + else: + for ispin in range(ns): + blocks.append(mat_rep[(icr, ik, ispin)]) + layout.append(((icr, ik, ispin), 2 * l + 1)) + D = np.vstack(blocks) + # match the Fortran's exact BLAS calls (orthogonal_wannier_SO): the + # near-singular O^{-1/2} amplifies any last-bit difference, so use the + # identical ZGEMM trans flags rather than numpy's conj-transpose copies. + O = zgemm(1.0, D, D, trans_b=2) # ZGEMM('N','C'): D @ D^H + S = _sqrt_inv(O) + D_orth = zgemm(1.0, S, D) # ZGEMM('N','N'): O^{-1/2} @ D + row = 0 + for key, nrows in layout: + mat_rep[key] = D_orth[row:row + nrows, :] + row += nrows + + # ---- raw Theta projectors matn_rep per included orbital (parproj path) ---- + matn_reps = {} + for o in orbs: + l = o['l'] + transmat = transmats[(l, o['sort'])] + op = rotloc_op[o['atom']] + rot = dmat(l, op['a'], op['b'], op['g'], float(op['iprop'])) + if mixing[(l, o['sort'])]: + matn_reps[o['atom']] = _build_matn_rep_mixing( + o, info, spins, windows, transmat, rot) + else: + matn_reps[o['atom']] = _build_matn_rep( + o, info, spins, ns, windows, transmat, rot) + + # ---- write ---- + with open(case + '.outband', 'w') as f: + f.write('%6d\n' % nkband) + + # number of bands per k (skip is=2 under SP+SO) + for ispin in range(ns): + if ifSP and ifSO and ispin == 1: + continue + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + f.write('%6d\n' % abs(nb_top - nb_bot + 1)) + + # correlated projector block: DO ik, DO icrorb (Loewdin orthonormalized). + for ik in range(nk): + for icr, cr in enumerate(crorbs): + l = cr['l'] + if mixing[(l, cr['sort'])]: + P = mat_rep[(icr, ik)] + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].real) + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].imag) + continue + for ispin in range(ns): + P = mat_rep[(icr, ik, ispin)] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].real) + for ispin in range(ns): + P = mat_rep[(icr, ik, ispin)] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].imag) + + # H(k) eigenvalues (skip is=2 under SO) + for ispin in range(ns): + if ifSO and ispin == 1: + continue + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + kp = spins[ispin]['kp'][ik] + for ib in range(nb_bot, nb_top + 1): + f.write(' %.16E\n' % kp['eband'][ib - kp['nbmin']]) + + # included-orbital radial sizes norm_radf%n + for o in orbs: + n = spins[0]['nLO'][(o['l'], o['sort'])] + 2 + f.write('%6d\n' % n) + + # Theta projector block: DO iorb, DO ik, DO ir. Mixing writes the full + # 2(2l+1) block from is=1; non-mixing the two (2l+1) spin blocks. + for o in orbs: + l = o['l'] + atom = o['atom'] + n = spins[0]['nLO'][(l, o['sort'])] + 2 + ismix = mixing[(l, o['sort'])] + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + for ir in range(n): + if ismix: + P = matn_reps[atom][ik][:, :, ir] + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].real) + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].imag) + continue + for ispin in range(ns): + P = matn_reps[atom][(ik, ispin)][:, :, ir] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].real) + for ispin in range(ns): + P = matn_reps[atom][(ik, ispin)][:, :, ir] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].imag) + + # k-labels + for i, (pos, name) in enumerate(labels, start=1): + f.write('%6d%6d%s\n' % (i, pos, name)) diff --git a/python/triqs_dftkit/wien2k/parproj.py b/python/triqs_dftkit/wien2k/parproj.py new file mode 100644 index 0000000..2fb5957 --- /dev/null +++ b/python/triqs_dftkit/wien2k/parproj.py @@ -0,0 +1,641 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by L. Pourovskii, V. Vildosola, C. Martins, M. Aichhorn +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python generation of the dmftproj partial-projector file +(case.parproj), replacing the parproj path of the dmftproj Fortran executable +(outputqmc.f). + +This is the sibling of ctqmcout.py. Where ctqmcout covers the correlated +shells (crorb, l_inc==2) and runs them through the Loewdin orthonormalization, +parproj covers ALL included shells (orb, l_inc in {1,2}) and writes the RAW +radial-normalized Theta projector. The three structural differences from +ctqmcout are: + +1. No Loewdin orthonormalization. pr_orb%matn_rep is never touched by + orthogonal_wannier; the only normalization is the per-orbital radial + transform s12 = O_radial^{+1/2} (orthogonal_r with inv=.FALSE.) applied as + coeff.s12 per (m, ib) in set_projections.f:273-332. + +2. The Theta projector keeps the full radial vector coeff = [Alm, Blm, Clm...] + of length n = nLO+2; s12 is built from u_dot_norm, ovl_LO_u and the second + LO-overlap token ovl_LO_udot (set_projections.f:163-197). All n radial + channels are written separately (the ir loop). + +3. Three extra per-orbital blocks: the BZ-symmetrized, tetrahedron-weighted, + Rloc-rotated density matrix densmat (density.f + symmetrize_mat + rotdens_mat), + the per-orbital Rloc spinor rotrep (set_rotloc.f), and a time-reversal flag. + +The reference case CaOs2 is SP+SO (ifSP=ifSO=1, ns=2), so every per-orbital +matrix is the full 2*(2l+1)=10 spin+orbital block. The exact cubic transmat and +the rot_projectmat local rotation are applied to matn_rep before writing, +exactly as in ctqmcout (dmftproj reads the same full-precision templates after +the precision fix). + +outputqmc.f parproj writer: 897-1183. set_projections.f s12/projector: +163-197/273-622. density.f Theta path: 588-915. symmetrize_mat.f / +rot_dens.f / setsym.f / set_rotloc.f for the symmetrization and Rloc rotation. +""" + +import math +import os +import numpy as np + +from ._dmftproj import (dmat, mixing_rotrep, read_almblm, read_dmftsym, + read_fromfile, read_indmftpr, reptrans, + rotloc_rotl_so, select_window, tmat, write_row) + + +def _op_timeinv(op, ifSO): + det2 = (op['krotm'][0, 0] * op['krotm'][1, 1] + - op['krotm'][0, 1] * op['krotm'][1, 0]) + return bool(ifSO and det2 < 0.0) + + +def _sqrtm_real_sym(O): + """O^{+1/2} of a real symmetric matrix (orthogonal_r with inv=.FALSE.: + Z diag(sqrt(w)) Z^T, real part kept). dmftproj evaluates sqrt of the + eigenvalue as a complex sqrt (W_comp = CMPLX(W,0)); reproduce that with a + complex power so a negative eigenvalue gives i*sqrt(|w|).""" + w, Z = np.linalg.eigh(O) + D1 = Z * np.sqrt(w.astype(complex)) + return (D1 @ Z.T).real + + +# --- included orbital descriptors -------------------------------------------- + +def _build_orbs(info): + orbs = [] + for isort in range(1, info['nsort'] + 1): + sortinfo = info['sorts'][isort - 1] + for l in sortinfo['included_ls']: + for imu in range(1, info['mult'][isort - 1] + 1): + atom = sum(info['mult'][:isort - 1]) + imu + orbs.append(dict(atom=atom, sort=isort, l=l, + basis=sortinfo['basis'])) + return orbs + + +# --- s12 radial transform (set_projections.f:163-197) ------------------------ + +def _build_s12(l, isrt, n, spin): + """O_radial^{+1/2} for one (l, sort, spin): the n x n radial overlap built + from u_dot_norm + ovl_LO_u + ovl_LO_udot, then its matrix square root.""" + s = np.zeros((n, n)) + s[0, 0] = 1.0 + s[1, 1] = spin['u_dot_norm'][(l, isrt)] + for ilo in range(1, spin['nLO'][(l, isrt)] + 1): + s[1 + ilo, 1 + ilo] = 1.0 + s[1 + ilo, 0] = spin['ovl_LO_u'][(ilo, l, isrt)] + s[0, 1 + ilo] = spin['ovl_LO_u'][(ilo, l, isrt)] + s[1 + ilo, 1] = spin['ovl_LO_udot'][(ilo, l, isrt)] + s[1, 1 + ilo] = spin['ovl_LO_udot'][(ilo, l, isrt)] + return _sqrtm_real_sym(s) + + +# --- srot rotrep (setsym.f) -------------------------------------------------- + +def _srot_rotrep_nonmixing(op, l, transmat, ifSP, ifSO): + """srot(isym)%rotrep(l,isrt)%mat, the (2l+1) up/up block of the symmetry op + in the new basis: transmat . D(R)_{lm} . transmat^H, with the orbital + time-reversal operator applied for the magnetic (timeinv) operations. + + Returns (rotrep[2l+1,2l+1], timeinv, phase).""" + a, b, g, iprop = op['a'], op['b'], op['g'], op['iprop'] + krotm = op['krotm'] + det2 = krotm[0, 0] * krotm[1, 1] - krotm[0, 1] * krotm[1, 0] + if ifSP and ifSO: + timeinv = det2 < 0.0 + phase = (g - a) if timeinv else (a + g) + else: + timeinv = False + phase = 0.0 + rotl = dmat(l, a, b, g, float(iprop)) + rotrep = transmat @ rotl @ np.conj(transmat.T) + if timeinv: + # timeinv_op in the new basis: reptrans T reptrans^T applied to conj. + tinv = transmat @ tmat(l) @ transmat.T + rotrep = tinv @ np.conj(rotrep) + return rotrep, timeinv, phase + + +# --- rotloc rotrep (set_rotloc.f) under SP+SO, non-mixing -------------------- + +def _rotloc_rotrep_nonso(orb, ops, info, transmat): + """rotloc(iatom)%rotrep(l)%mat without SO: the bare (2l+1) Rloc rotation in + the new basis, transmat D(Rloc)_{lm} transmat^H with D(Rloc) the symmetry op + mapping the sort representative onto this atom (set_rotloc.f non-SO branch). + srot%timeinv is always false under non-SO, so timeinv=False.""" + l = orb['l'] + iref = sum(info['mult'][:orb['sort'] - 1]) + 1 + op = next(o for o in ops if o['perm'][iref - 1] == orb['atom']) + D = dmat(l, op['a'], op['b'], op['g'], float(op['iprop'])) + return transmat @ D @ np.conj(transmat.T), False + + +def _rotloc_rotrep_so(orb, ops, info, ref, transmat, mixing): + """rotloc(iatom)%rotrep(l)%mat, the full 2*(2l+1) Rloc spinor rotation in + the new basis under SP+SO (set_rotloc.f), plus timeinv flag. + + ref is the representative-sort rotloc; rotloc_rotl_so composes the + representative spinor rotloc with the first symmetry op mapping the sort + representative onto this atom. The new-basis transform is the full transmat + for a mixing (spin-coupling) basis, and blkdiag(transmat, transmat) for a + spin-diagonal one.""" + l = orb['l'] + iref = sum(info['mult'][:orb['sort'] - 1]) + 1 + d = 2 * l + 1 + rotl, timeinv = rotloc_rotl_so(l, ref, ops, orb['atom'], iref) + if mixing: + S = transmat + else: + S = np.zeros((2 * d, 2 * d), dtype=complex) + S[:d, :d] = transmat + S[d:, d:] = transmat + rotrep = (S @ rotl @ S.T) if timeinv else (S @ rotl @ np.conj(S.T)) + return rotrep, timeinv + + +# --- projector matn_rep (set_projections.f Theta path) ----------------------- + +def _build_matn_rep(orb, info, spins, ns, windows, transmat, rot): + """matn_rep[(ik, is)] -> (2l+1, nbsel, n): the raw radial-normalized Theta + projector with the local rotation and the basis transform applied per + radial channel (non-mixing SP+SO path, set_projections.f:591-621).""" + l = orb['l'] + atom = orb['atom'] + sort = orb['sort'] + out = {} + for ik in range(info['nk']): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + kp0 = spins[0]['kp'][ik] + off_bot = nb_bot - kp0['nbmin'] + off_top = nb_top - kp0['nbmin'] + nbsel = off_top - off_bot + 1 + for ispin in range(ns): + sp = spins[ispin] + kp = sp['kp'][ik] + n = sp['nLO'][(l, sort)] + 2 + s12 = _build_s12(l, sort, n, sp) + matn = np.zeros((2 * l + 1, nbsel, n), dtype=complex) + for mi, m in enumerate(range(-l, l + 1)): + lm = l * l + (m + l) + for j, off in enumerate(range(off_bot, off_top + 1)): + coeff = np.zeros(n, dtype=complex) + coeff[0] = kp['Alm'][lm, atom, off] + coeff[1] = kp['Blm'][lm, atom, off] + for ilo in range(n - 2): + coeff[2 + ilo] = kp['Clm'][ilo, lm, atom, off] + matn[mi, j, :] = coeff @ s12 + # rot_projectmat then the basis transform, per radial channel. + for ir in range(n): + matn[:, :, ir] = transmat @ (rot @ matn[:, :, ir]) + out[(ik, ispin)] = matn + return out + + +def _raw_matn(orb, sp, ik, nb_bot, nb_top, rot): + """The rot_projectmat'd (2l+1, nbsel, n) Theta projector in the |lm> basis + for one spin, before the angular transform (set_projections.f matn_rep).""" + l, atom, sort = orb['l'], orb['atom'], orb['sort'] + kp = sp['kp'][ik] + off_bot = nb_bot - kp['nbmin'] + off_top = nb_top - kp['nbmin'] + nbsel = off_top - off_bot + 1 + n = sp['nLO'][(l, sort)] + 2 + s12 = _build_s12(l, sort, n, sp) + matn = np.zeros((2 * l + 1, nbsel, n), dtype=complex) + for mi, m in enumerate(range(-l, l + 1)): + lm = l * l + (m + l) + for j, off in enumerate(range(off_bot, off_top + 1)): + coeff = np.zeros(n, dtype=complex) + coeff[0] = kp['Alm'][lm, atom, off] + coeff[1] = kp['Blm'][lm, atom, off] + for ilo in range(n - 2): + coeff[2 + ilo] = kp['Clm'][ilo, lm, atom, off] + matn[mi, j, :] = coeff @ s12 + for ir in range(n): + matn[:, :, ir] = rot @ matn[:, :, ir] + return matn + + +def _build_matn_rep_mixing(orb, info, spins, windows, transmat, rot): + """matn_rep[ik] -> (2*(2l+1), nbsel, n): the mixing Theta projector. Each + spin's rot_projectmat'd |lm> block is stacked (up then dn) and multiplied by + the full 2(2l+1) transmat per radial channel (set_projections.f:515-585).""" + l = orb['l'] + d = 2 * l + 1 + out = {} + for ik in range(info['nk']): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + up = _raw_matn(orb, spins[0], ik, nb_bot, nb_top, rot) + dn = _raw_matn(orb, spins[1], ik, nb_bot, nb_top, rot) + nbsel, n = up.shape[1], up.shape[2] + matn = np.zeros((2 * d, nbsel, n), dtype=complex) + matn[:d] = up + matn[d:] = dn + for ir in range(n): + matn[:, :, ir] = transmat @ matn[:, :, ir] + out[ik] = matn + return out + + +def _orbital_densmat_mixing(orb, info, spins, windows, matn_rep): + """The single 2*(2l+1) raw density block for a mixing orbital, point- + integrated with the geometric k-weight (density.f:786-812): D = sum over k + and radial channels of matn_rep matn_rep^H, already in the new basis.""" + l = orb['l'] + d = 2 * l + 1 + n = spins[0]['nLO'][(l, orb['sort'])] + 2 + dens = np.zeros((2 * d, 2 * d), dtype=complex) + for ik in range(info['nk']): + incl, _, _ = windows[ik] + if not incl: + continue + weight = spins[0]['kp'][ik]['weight'] + for i in range(n): + mat = matn_rep[orb['atom']][ik][:, :, i] + dens += (mat @ np.conj(mat.T)) * weight + return dens + + +def _symmetrize_densmat_mixing(orb, ops, nsym, rotreps, dens_raw): + """symmetrize_mat for a mixing orbital (symmetrize_mat.f:140-188). For the + representative atom: sum over symmetry ops of rotrep (conj(D) if magnetic) + rotrep^H, divided by nsym. rotreps[isym] is srot%rotrep (mixing_rotrep).""" + d = 2 * (2 * orb['l'] + 1) + sym = np.zeros((d, d), dtype=complex) + for isym in range(nsym): + rotrep, timeinv = rotreps[isym] + tmp = np.conj(dens_raw) if timeinv else dens_raw + sym += rotrep @ (tmp @ np.conj(rotrep.T)) + return sym / nsym + + +def _rotdens_densmat_mixing(blk, rotrep_loc, timeinv): + """rotdens_mat for a mixing orbital (rot_dens.f:119-141): inverse(Rloc) D + Rloc on the single 2*(2l+1) block.""" + if timeinv: + return rotrep_loc.T @ np.conj(blk @ rotrep_loc) + return np.conj(rotrep_loc.T) @ (blk @ rotrep_loc) + + +# --- density matrix (density.f Theta path, non-mixing SP+SO) ----------------- + +def _orbital_densmat_blocks(orb, info, spins, ns, windows, matn_reps): + """The nsp=4 raw density-matrix blocks (up/up, dn/dn, up/dn, dn/up) for one + orbital, point-integrated with the geometric k-weight (density.f:889-907, + tetr=.FALSE. path). The window is the bands below e_bot (dmftproj.f:798).""" + l = orb['l'] + d = 2 * l + 1 + blocks = [np.zeros((d, d), dtype=complex) for _ in range(4)] + for ik in range(info['nk']): + incl, nb_bot, nb_top = windows[ik] + if not incl: + continue + kp0 = spins[0]['kp'][ik] + off_bot = nb_bot - kp0['nbmin'] + off_top = nb_top - kp0['nbmin'] + n = spins[0]['nLO'][(l, orb['sort'])] + 2 + for iss in range(1, 5): + if iss <= 2: + is_, is1 = iss, iss + else: + is_ = iss - 2 + is1 = 3 - is_ + isp, isp1 = is_ - 1, is1 - 1 + weight = spins[isp]['kp'][ik]['weight'] + acc = np.zeros((d, d), dtype=complex) + for i in range(n): + mat = matn_reps[orb['atom']][(ik, isp)][:, :, i] + cmat = matn_reps[orb['atom']][(ik, isp1)][:, :, i] + acc += mat @ np.conj(cmat.T) + blocks[iss - 1] += acc * weight + return blocks + + +def _symmetrize_densmat(orbs, info, ops, nsym, srot_rotreps, dens_raw, ns, + ifSP, ifSO): + """symmetrize_mat for the non-mixing SP+SO path (symmetrize_mat.f:196-276). + dens_raw[atom] -> [4 blocks]. Returns symmetrized blocks per atom. + + The blocks are summed over symmetry ops with srot%rotrep, the spin block + phase ephase (up/dn, dn/up), and the orbital-time-reversal conjugation for + magnetic ops; equivalent atoms of a sort scatter into one another via the + permutation. Result divided by nsym.""" + out = {} + # group orbitals by sort, in orb order (they are already sort-major). + isort_groups = {} + for o in orbs: + isort_groups.setdefault(o['sort'], []).append(o) + for isrt, group in isort_groups.items(): + l = group[0]['l'] + d = 2 * l + 1 + mult = len(group) + sym = [[np.zeros((d, d), dtype=complex) for _ in range(4)] + for _ in range(mult)] + for imult in range(mult): + iatom = group[imult]['atom'] + for isym in range(nsym): + op = ops[isym] + rotrep, timeinv, phase = srot_rotreps[(isrt, isym)] + jorb = op['perm'][iatom - 1] - iatom + imult # 0-based target + for iss in range(1, 5): + is_ = iss if iss <= 2 else iss - 2 + isp = is_ - 1 + tmp = dens_raw[iatom][iss - 1].copy() + if ifSP and timeinv: + tmp = np.conj(tmp) + ephase = 1.0 + if iss == 3: + ephase = np.exp(1j * phase) + elif iss == 4: + ephase = np.exp(-1j * phase) + val = rotrep @ (tmp @ np.conj(rotrep.T)) * ephase + sym[jorb][iss - 1] += val + for imult in range(mult): + iatom = group[imult]['atom'] + out[iatom] = [sym[imult][k] / nsym for k in range(4)] + return out + + +def _symmetrize_densmat_nonso(orbs, info, ops, nsym, srot_rotreps, dens_raw): + """symmetrize_mat for the non-SO non-mixing path (symmetrize_mat.f:196-262, + nsp=2). Only the two diagonal blocks (up/up, dn/dn) exist; srot%timeinv is + always false so the ephase phase factors are 1. Each block is summed over + symmetry ops as rotrep block rotrep^H, equivalent atoms scattering via the + permutation, divided by nsym. Returns per-atom [up/up, dn/dn].""" + out = {} + isort_groups = {} + for o in orbs: + isort_groups.setdefault(o['sort'], []).append(o) + for isrt, group in isort_groups.items(): + l = group[0]['l'] + d = 2 * l + 1 + mult = len(group) + sym = [[np.zeros((d, d), dtype=complex) for _ in range(2)] + for _ in range(mult)] + for imult in range(mult): + iatom = group[imult]['atom'] + for isym in range(nsym): + op = ops[isym] + rotrep, _, _ = srot_rotreps[(isrt, isym)] + jorb = op['perm'][iatom - 1] - iatom + imult + for iss in range(2): + blk = dens_raw[iatom][iss] + sym[jorb][iss] += rotrep @ (blk @ np.conj(rotrep.T)) + for imult in range(mult): + iatom = group[imult]['atom'] + out[iatom] = [sym[imult][k] / nsym for k in range(2)] + return out + + +def _rotdens_densmat_nonso(blocks, rotrep_loc): + """rotdens_mat for the non-SO non-mixing path (rot_dens.f:197-228, nsp=2): + each (2l+1) spin block is rotated as conj(Rloc^T) D Rloc with the bare + (2l+1) rotloc rotrep (timeinv always false). Returns [up/up, dn/dn].""" + return [np.conj(rotrep_loc.T) @ (blk @ rotrep_loc) for blk in blocks] + + +def _rotdens_densmat(orb, blocks, rotrep_loc, timeinv): + """rotdens_mat for non-mixing SP+SO (rot_dens.f:151-193): assemble the four + blocks into a 2*(2l+1) matrix, apply inverse(Rloc) D Rloc, return it as the + full 2*(2l+1) densprint matrix.""" + l = orb['l'] + d = 2 * l + 1 + rd = np.zeros((2 * d, 2 * d), dtype=complex) + rd[:d, :d] = blocks[0] + rd[d:, d:] = blocks[1] + rd[:d, d:] = blocks[2] + rd[d:, :d] = blocks[3] + if timeinv: + rd = np.conj(rd @ rotrep_loc) + rd = rotrep_loc.T @ rd + else: + rd = rd @ rotrep_loc + rd = np.conj(rotrep_loc.T) @ rd + return rd + + +# --- parproj writer ---------------------------------------------------------- + +def write_parproj(case): + """Read .almblm{up,dn}, .indmftpr, .struct, + .dmftsym and write .parproj in the dmftproj format.""" + info = read_indmftpr(case + '.indmftpr') + nsym, ops, rotloc_ref = read_dmftsym(case + '.dmftsym', rotloc=True) + + up, dn = case + '.almblmup', case + '.almblmdn' + if os.path.exists(up) and os.path.exists(dn): + spin_files = [up, dn] + else: + spin_files = [case + '.almblm'] + ifSP = len(spin_files) == 2 + ifSO = bool(info['so']) + ns = 2 if ifSP else 1 + + spins = [read_almblm(p, info, projectors=True) for p in spin_files] + nk = spins[0]['nk'] + info['nk'] = nk + + orbs = _build_orbs(info) + norb = len(orbs) + + # Two band ranges (dmftproj.f:757,836): the energy window [e_bot, e_top] + # for the written Theta projector (block A), and the full band range + # (-Elarge, Elarge) over which the density matrix is integrated. dmftproj + # computes the density matrix FIRST over the full range, then overwrites + # the projectors with the energy window before outputqmc. + # Two band ranges (dmftproj.f:798,836): the energy window [e_bot, e_top] + # for the written Theta projector (block A), and the bands below e_bot + # (-Elarge, e_bot) for the density matrix. dmftproj computes the density + # matrix over the below-e_bot range with point integration LAST (the third + # density call is correlated-only), so densmat in outputqmc is that one. + windows = [] + below_windows = [] + for ik in range(nk): + kp = spins[0]['kp'][ik] + windows.append(select_window(kp['nbmin'], kp['nbmax'], kp['eband'], + info['e_bot'], info['e_top'])) + below_windows.append(select_window(kp['nbmin'], kp['nbmax'], + kp['eband'], -1e6, info['e_bot'])) + + transmats = {} + mixing = {} + for o in orbs: + key = (o['l'], o['sort']) + if o['basis'] == 'fromfile': + transmats[key], mixing[key] = read_fromfile( + info['sorts'][o['sort'] - 1]['sourcefile'], o['l']) + else: + transmats[key], mixing[key] = reptrans(o['basis'], o['l']), False + + # rot_projectmat local rotation: the op mapping the representative atom of + # the sort onto this atom (set_projections.f via rot_projectmat). + rotloc_op = {} + for o in orbs: + iref = sum(info['mult'][:o['sort'] - 1]) + 1 + rotloc_op[o['atom']] = next(op for op in ops + if op['perm'][iref - 1] == o['atom']) + + # ---- projectors matn_rep per orbital (energy window for block A, full + # band range for the density matrix) ---- + matn_reps = {} + matn_reps_full = {} + for o in orbs: + l = o['l'] + transmat = transmats[(l, o['sort'])] + op = rotloc_op[o['atom']] + rot = dmat(l, op['a'], op['b'], op['g'], float(op['iprop'])) + if mixing[(l, o['sort'])]: + matn_reps[o['atom']] = _build_matn_rep_mixing( + o, info, spins, windows, transmat, rot) + matn_reps_full[o['atom']] = _build_matn_rep_mixing( + o, info, spins, below_windows, transmat, rot) + else: + matn_reps[o['atom']] = _build_matn_rep( + o, info, spins, ns, windows, transmat, rot) + matn_reps_full[o['atom']] = _build_matn_rep( + o, info, spins, ns, below_windows, transmat, rot) + + # ---- rotloc rotrep per orbital ---- + rotloc_rotrep = {} + for o in orbs: + transmat = transmats[(o['l'], o['sort'])] + if not ifSO: + rotloc_rotrep[o['atom']] = _rotloc_rotrep_nonso(o, ops, info, transmat) + else: + ref = rotloc_ref[o['sort'] - 1] + rotloc_rotrep[o['atom']] = _rotloc_rotrep_so( + o, ops, info, ref, transmat, mixing[(o['l'], o['sort'])]) + + # ---- density matrices: raw -> symmetrize -> rotdens ---- + # Non-mixing sorts use the block path; mixing sorts the single-block path. + # Under SO each non-mixing density is the 2*(2l+1) 4-block matrix; without + # SO it is two independent (2l+1) spin blocks (density.f nsp=2 path). + nonmix_orbs = [o for o in orbs if not mixing[(o['l'], o['sort'])]] + densprint = {} + + if nonmix_orbs: + srot_rotreps = {} + for isrt in range(1, info['nsort'] + 1): + ls = info['sorts'][isrt - 1]['included_ls'] + if not ls or mixing[(ls[0], isrt)]: + continue + l = ls[0] + for isym in range(nsym): + srot_rotreps[(isrt, isym)] = _srot_rotrep_nonmixing( + ops[isym], l, transmats[(l, isrt)], ifSP, ifSO) + dens_raw = {o['atom']: _orbital_densmat_blocks( + o, info, spins, ns, below_windows, matn_reps_full) + for o in nonmix_orbs} + if ifSO: + dens_sym = _symmetrize_densmat(nonmix_orbs, info, ops, nsym, + srot_rotreps, dens_raw, ns, ifSP, ifSO) + for o in nonmix_orbs: + rotrep_loc, timeinv = rotloc_rotrep[o['atom']] + densprint[o['atom']] = _rotdens_densmat( + o, dens_sym[o['atom']], rotrep_loc, timeinv) + else: + dens_sym = _symmetrize_densmat_nonso(nonmix_orbs, info, ops, nsym, + srot_rotreps, dens_raw) + for o in nonmix_orbs: + rotrep_loc, _ = rotloc_rotrep[o['atom']] + densprint[o['atom']] = _rotdens_densmat_nonso( + dens_sym[o['atom']], rotrep_loc) + + for o in orbs: + l, sort = o['l'], o['sort'] + if not mixing[(l, sort)]: + continue + rotreps = [] + for isym in range(nsym): + ti = _op_timeinv(ops[isym], ifSO) + rotreps.append( + (mixing_rotrep(ops[isym], l, transmats[(l, sort)], ti), ti)) + raw = _orbital_densmat_mixing(o, info, spins, below_windows, + matn_reps_full) + sym = _symmetrize_densmat_mixing(o, ops, nsym, rotreps, raw) + rotrep_loc, timeinv = rotloc_rotrep[o['atom']] + densprint[o['atom']] = _rotdens_densmat_mixing(sym, rotrep_loc, timeinv) + + # ---- write ---- + with open(case + '.parproj', 'w') as f: + for o in orbs: + n = spins[0]['nLO'][(o['l'], o['sort'])] + 2 + f.write('%6d\n' % n) + + for o in orbs: + l = o['l'] + atom = o['atom'] + n = spins[0]['nLO'][(l, o['sort'])] + 2 + ismix = mixing[(l, o['sort'])] + + # (A) Theta projector (outputqmc.f:935-973). Mixing writes the full + # 2(2l+1) block from is=1 only; non-mixing the two (2l+1) spin blocks. + for ik in range(nk): + incl, nb_bot, nb_top = windows[ik] + for ir in range(n): + if ismix: + P = matn_reps[atom][ik][:, :, ir] + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].real) + for m in range(2 * (2 * l + 1)): + write_row(f, P[m, :].imag) + continue + for ispin in range(ns): + P = matn_reps[atom][(ik, ispin)][:, :, ir] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].real) + for ispin in range(ns): + P = matn_reps[atom][(ik, ispin)][:, :, ir] + for mi in range(2 * l + 1): + write_row(f, P[mi, :].imag) + + # (B) density matrix (outputqmc.f:1012-1066). SO writes the single + # 2*(2l+1) block; mixing too; non-SO the two (2l+1) spin blocks + # (each real then imag, per spin, outputqmc.f:1052-1064). + dp = densprint[atom] + if ifSO or ismix: + for m in range(2 * (2 * l + 1)): + write_row(f, dp[m, :].real) + for m in range(2 * (2 * l + 1)): + write_row(f, dp[m, :].imag) + else: + for ispin in range(ns): + for m in range(2 * l + 1): + write_row(f, dp[ispin][m, :].real) + for ispin in range(ns): + for m in range(2 * l + 1): + write_row(f, dp[ispin][m, :].imag) + + # (C) Rloc rotrep (outputqmc.f:1130-1177). SO/mixing 2*(2l+1); + # non-SO bare (2l+1). The time-reversal flag follows under ifSP. + rotrep_loc, timeinv = rotloc_rotrep[atom] + for m in range(rotrep_loc.shape[0]): + write_row(f, rotrep_loc[m, :].real) + for m in range(rotrep_loc.shape[0]): + write_row(f, rotrep_loc[m, :].imag) + if ifSP: + f.write('%6d\n' % (1 if timeinv else 0)) diff --git a/python/triqs_dftkit/wien2k/sympar.py b/python/triqs_dftkit/wien2k/sympar.py new file mode 100644 index 0000000..dddd7dc --- /dev/null +++ b/python/triqs_dftkit/wien2k/sympar.py @@ -0,0 +1,188 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by M. Aichhorn, L. Pourovskii, V. Vildosola +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python generation of the dmftproj included-shell symmetry file +(case.sympar), replacing the corresponding output of the dmftproj Fortran +executable (outputqmc.f, unit ousympar). + +case.sympar is the sibling of case.symqmc. Both write the same per-operation +spinor symmetry matrix srot(isym)%rotrep(l,isrt)%mat (setsym.f), built +identically for every shell as transmat . D(R)_lm . transmat^dag. They differ +only in the shell list: symqmc covers the CORRELATED shells (l_inc==2), sympar +covers ALL INCLUDED shells (l_inc in {1,2}), iterating orb(1:norb) instead of +crorb(1:ncrorb). The orb ordering is (sort, l, atom) per dmftproj.f:357-387. + +The per-shell basis transmat is per sort: a complex shell uses the exact +identity, a cubic shell uses the exact double-precision cubic-d harmonics (the +same full-precision templates dmftproj reads after the precision fix), as +ctqmcout does. Mixed within one file (Ca complex, Os cubic for CaOs2). + +sympar drops three things symqmc/ctqmcout carry: no orbital-description block +at the top, no ifsplit/irep sub-block selection (always the full matrix), and +no crorb%ifSOat/correp metadata. It is purely group-theoretic: header, perms, +optional timeflag line (ifSP), the representation matrices, and (only when +.not.ifSP) a paramagnetic time-reversal operator per orbital. + +This reference case (CaOs2) is SP+SO: indmftpr SO flag=1 sets ifSO, and +ifSO=>ifSP, so it exercises the non-mixing 2*(2l+1)=10-wide block-diag spinor +path and writes the timeflag line; the paramagnetic tail is absent. +""" + +import os +import numpy as np + +from ._dmftproj import (dmat, fmt, mixing_rotrep, read_dmftsym, read_fromfile, + read_indmftpr, reptrans, timeinv_orbital, tmat, + write_row) + + +# --- included shells --------------------------------------------------------- + +def _included_shells(info): + """One entry per INCLUDED shell (l_inc in {1,2}), one per atom of its sort, + in orb order (sort, l, atom). Each shell carries l, basis name, a mixing + flag and the transform P: a spin-coupling fromfile basis gives the full + 2(2l+1) P (P spinrot P^dag matrix), otherwise the (2l+1) up/up block (the + single-precision-cast cubic harmonics dmftproj writes).""" + shells = [] + for isort in range(info['nsort']): + s = info['sorts'][isort] + for l in s['included_ls']: + if s['basis'] == 'fromfile': + P, mixing = read_fromfile(s['sourcefile'], l) + else: + P, mixing = reptrans(s['basis'], l), False + for imu in range(1, info['mult'][isort] + 1): + atom = sum(info['mult'][:isort]) + imu + shells.append(dict(l=l, sort=isort + 1, atom=atom, + basis=s['basis'], P=P, mixing=mixing)) + return shells + + +# --- matrix construction (shared with symqmc) -------------------------------- + +def _phase(op, ti): + a, c = op['a'], op['c'] + return (c - a) if ti else (a + c) # (g-a) on magnetic ops, else (a+g) + + +def _l0_matrix(op, ti): + e = np.exp(1j * _phase(op, ti) / 2) + return np.array([[e, 0], [0, np.conj(e)]], dtype=complex) + + +def _nonmixing_matrix(op, shell, ti): + """Non-mixing SP+SO whole shell: the up/up block scaled by +-(a+g)/2, + block-diagonal over spin, with the orbital time-reversal operator on the + magnetic operations (setsym.f, outputqmc.f:1292-1339).""" + l, P = shell['l'], shell['P'] + rotl = dmat(l, op['a'], op['b'], op['c'], float(op['iprop'])) + if ti: + rotl = timeinv_orbital(l, rotl) + rotrep = P @ rotl @ np.conj(P.T) + e = np.exp(1j * _phase(op, ti) / 2) + d = 2 * l + 1 + mat = np.zeros((2 * d, 2 * d), dtype=complex) + mat[:d, :d] = e * rotrep + mat[d:, d:] = np.conj(e) * rotrep + return mat + + +def _nonmixing_orbital(op, shell): + """Non-SO spin-diagonal basis: the bare (2l+1) representation + P D(R)_{lm} P^H (setsym.f non-SO branch, outputqmc.f:1342-1349). Under + non-SO srot%timeinv is always false, so no time-reversal or phase.""" + l, P = shell['l'], shell['P'] + rotl = dmat(l, op['a'], op['b'], op['c'], float(op['iprop'])) + return P @ rotl @ np.conj(P.T) + + +def _shell_matrix(op, shell, ti, ifSO): + l = shell['l'] + if l == 0: + return _l0_matrix(op, ti) + if shell['mixing']: + return mixing_rotrep(op, l, shell['P'], bool(ti)) + if not ifSO: + return _nonmixing_orbital(op, shell) + return _nonmixing_matrix(op, shell, ti) + + +# --- output ------------------------------------------------------------------ + +def _write_matrix(f, mat): + for m in range(mat.shape[0]): + write_row(f, mat[m, :].real) + for m in range(mat.shape[0]): + write_row(f, mat[m, :].imag) + + +def write_sympar(case): + """Write .sympar from .dmftsym, .indmftpr, .struct. + + Detects ifSP/ifSO from the presence of .almblm{up,dn} and the indmftpr + SO flag, exactly as oubwin/symqmc/ctqmcout. For SP+SO the file carries the + timeflag line and 2*(2l+1)-wide block-diag spinor matrices; the paramagnetic + time-reversal tail is written only when .not.ifSP.""" + info = read_indmftpr(case + '.indmftpr') + shells, so = _included_shells(info), info['so'] + nsym, ops = read_dmftsym(case + '.dmftsym') + natom = len(ops[0]['perm']) + + ifSP = os.path.exists(case + '.almblmup') and os.path.exists(case + '.almblmdn') + ifSO = bool(so) + ifSP = ifSP or ifSO # ifSO => ifSP + + timeflag = [] + for op in ops: + det2 = (op['krotm'][0, 0] * op['krotm'][1, 1] + - op['krotm'][0, 1] * op['krotm'][1, 0]) + timeflag.append(1 if (ifSO and det2 < 0.0) else 0) + + with open(case + '.sympar', 'w') as f: + f.write('%6d %6d\n' % (nsym, natom)) + for op in ops: + f.write(''.join('%6d ' % p for p in op['perm']) + '\n') + if ifSP: + f.write(''.join('%6d ' % t for t in timeflag) + '\n') + + for isym, op in enumerate(ops): + for sh in shells: + l = sh['l'] + ti = bool(timeflag[isym]) + if l == 0 and not (ifSP and ifSO): + f.write(fmt(1.0) + '\n') + f.write(fmt(0.0) + '\n') + continue + _write_matrix(f, _shell_matrix(op, sh, ti, ifSO)) + + if not ifSP: + for sh in shells: + l = sh['l'] + if l == 0: + f.write(fmt(1.0) + '\n') + f.write(fmt(0.0) + '\n') + continue + tm = tmat(l) + op = sh['P'] @ tm @ sh['P'].T + ident = np.eye(2 * l + 1, dtype=complex) + time_op = op @ np.conj(ident) + _write_matrix(f, time_op) diff --git a/python/triqs_dftkit/wien2k/symqmc.py b/python/triqs_dftkit/wien2k/symqmc.py new file mode 100644 index 0000000..412c452 --- /dev/null +++ b/python/triqs_dftkit/wien2k/symqmc.py @@ -0,0 +1,197 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by M. Aichhorn, L. Pourovskii, V. Vildosola +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +"""Pure-Python generation of the dmftproj correlated-shell symmetry file +(case.symqmc), replacing the corresponding output of the dmftproj Fortran +executable. + +Given the dmftproj symmetry input (case.dmftsym), the projector definition +(case.indmftpr) and the structure (case.struct), this builds the spinor symmetry +matrices and writes them in the case.symqmc format the converter reads. It +reproduces the Fortran construction: the Wigner D matrix (dmat), the orbital +time-reversal operator for the magnetic (SP+SO) operations, the basis transform +to the chosen angular harmonics, and the spin-1/2 phase blocks. + +Covers all dmftproj spin-orbit cases: + +- non-mixing spin-diagonal bases (complex, cubic, and a fromfile basis whose + spin-up and spin-down blocks coincide): the spin-reduced up/up block scaled + by the +-(a+g)/2 phase, with the orbital time-reversal operator on the + magnetic operations; +- mixing bases (a fromfile basis that couples spin, e.g. the |j, m_j> basis): + the full 2(2l+1) spinor representation P spinrot P^dag, with the spinor + time-reversal operator -i sigma_y (x) T applied to the magnetic operations; +- l = 0 (s) shells: the 2x2 spin phase block. + +The mixing fromfile path is the one dft_tools #148 singles out. dmftproj reads +that basis with a single-precision CMPLX cast and a 250-column line cap (Fortran +set_ang_trans.f), so its case.symqmc carries a ~1e-7 error there; this generator +is full double precision. +""" + +import os + +import numpy as np + +from ._dmftproj import (dmat, mixing_rotrep, read_dmftsym, read_fromfile, + read_indmftpr, reptrans, timeinv_orbital, tmat) + + +# --- correlated shells ------------------------------------------------------- + +def _correlated_shells(info): + """One entry per correlated atom (l_inc==2), in sort order. Each shell + carries l, basis name, its transform matrix P = and a mixing flag + (True for a spin-coupling fromfile basis). symqmc builds its symmetry + matrices from the EXACT cubic harmonics (no single-precision cast).""" + shells = [] + for isort in range(info['nsort']): + s = info['sorts'][isort] + basis = s['basis'] + for l in s['correlated_ls']: + if basis == 'fromfile': + P, mixing = read_fromfile(s['sourcefile'], l) + else: + P, mixing = reptrans(basis, l, cast=False), False + for _ in range(info['mult'][isort]): + shells.append(dict(l=l, basis=basis, P=P, mixing=mixing)) + return shells + + +# The symqmc test reaches into these two names directly; keep them as the +# module's parsing entry points. +_read_dmftsym = read_dmftsym + + +def _read_correlated_shells(indmftpr, struct): + info = read_indmftpr(indmftpr) + return _correlated_shells(info), info['so'] + + +def write_symqmc(case): + """Write .symqmc from .dmftsym, .indmftpr, .struct. + + ifSO comes from the indmftpr SO flag; ifSP from the presence of + .almblm{up,dn} (ifSO => ifSP). With SO the matrices are the 2*(2l+1) + block-diag spinor representation and a timeflag line is written; without SO + they are the bare (2l+1) representation, with a timeflag line (all zero) + only when ifSP. The paramagnetic time-reversal tail follows when .not.ifSP.""" + nsym, ops = read_dmftsym(case + '.dmftsym') + info = read_indmftpr(case + '.indmftpr') + shells, so = _correlated_shells(info), info['so'] + natom = len(ops[0]['perm']) + + ifSO = bool(so) + ifSP = (os.path.exists(case + '.almblmup') + and os.path.exists(case + '.almblmdn')) or ifSO + + timeinv = [] + for op in ops: + det2 = op['krotm'][0, 0] * op['krotm'][1, 1] - op['krotm'][0, 1] * op['krotm'][1, 0] + timeinv.append(1 if (ifSO and det2 < 0.0) else 0) + + with open(case + '.symqmc', 'w') as f: + f.write('%6d %6d\n' % (nsym, natom)) + for op in ops: + f.write(''.join('%6d ' % p for p in op['perm']) + '\n') + if ifSP: + f.write(''.join('%6d ' % t for t in timeinv) + '\n') + for isym, op in enumerate(ops): + for sh in shells: + f.write(_format_matrix(_shell_matrix(op, sh, timeinv[isym], ifSO))) + if not ifSP: + for sh in shells: + f.write(_format_matrix(_time_op_matrix(sh))) + + +def _time_op_matrix(shell): + """Paramagnetic time-reversal operator for one correlated shell (.not.ifSP, + outputqmc.f:835-887): the (2l+1) operator P T P^T in the new basis; the s + shell reduces to the 1x1 identity.""" + l = shell['l'] + if l == 0: + return np.array([[1.0 + 0j]], dtype=complex) + P = shell['P'] + return (P @ tmat(l) @ P.T) @ np.eye(2 * l + 1, dtype=complex) + + +def _shell_matrix(op, shell, ti, ifSO): + """Symmetry matrix for one correlated shell under one operation: the + 2*(2l+1) block-diag spinor representation under SO, the bare (2l+1) + representation otherwise.""" + l = shell['l'] + if l == 0: + return _l0_matrix(op, ti) if ifSO else np.array([[1.0 + 0j]], dtype=complex) + if shell['mixing']: + return _mixing_matrix(op, shell, ti) + if not ifSO: + return _nonmixing_orbital(op, shell) + return _nonmixing_matrix(op, shell, ti) + + +def _phase(op, ti): + a, c = op['a'], op['c'] + return (c - a) if ti else (a + c) # (g-a) on magnetic ops, else (a+g) + + +def _l0_matrix(op, ti): + """s shell: 2x2 spin phase block diag(e, conj(e)) (outputqmc.f l==0).""" + e = np.exp(1j * _phase(op, ti) / 2) + return np.array([[e, 0], [0, np.conj(e)]], dtype=complex) + + +def _nonmixing_matrix(op, shell, ti): + """Spin-diagonal basis: the up/up block scaled by +-(a+g)/2, with the + orbital time-reversal operator on the magnetic operations.""" + l, P = shell['l'], shell['P'] + rotl = dmat(l, op['a'], op['b'], op['c'], float(op['iprop'])) + if ti: + rotl = timeinv_orbital(l, rotl) + rotrep = P @ rotl @ np.conj(P.T) + e = np.exp(1j * _phase(op, ti) / 2) + d = 2 * l + 1 + mat = np.zeros((2 * d, 2 * d), dtype=complex) + mat[:d, :d] = e * rotrep + mat[d:, d:] = np.conj(e) * rotrep + return mat + + +def _nonmixing_orbital(op, shell): + """Non-SO spin-diagonal basis: the bare (2l+1) representation + P D(R)_{lm} P^H (setsym.f non-SO branch). Under non-SO srot%timeinv is + always false, so no orbital time-reversal or spin phase enters.""" + l, P = shell['l'], shell['P'] + rotl = dmat(l, op['a'], op['b'], op['c'], float(op['iprop'])) + return P @ rotl @ np.conj(P.T) + + +def _mixing_matrix(op, shell, ti): + """Spin-coupling basis: full 2(2l+1) spinor representation (setsym.f, + timeinv.f), shared with sympar via _dmftproj.mixing_rotrep.""" + return mixing_rotrep(op, shell['l'], shell['P'], bool(ti)) + + +def _format_matrix(mat): + out = [] + for part in (mat.real, mat.imag): + for row in part: + out.append(''.join(' %.14E' % x for x in row) + '\n') + return ''.join(out) diff --git a/test/python/wien2k/CMakeLists.txt b/test/python/wien2k/CMakeLists.txt index d9968e3..0c7ef2d 100644 --- a/test/python/wien2k/CMakeLists.txt +++ b/test/python/wien2k/CMakeLists.txt @@ -11,3 +11,166 @@ add_test(NAME Py_wien2k_convert WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set_property(TEST Py_wien2k_convert APPEND PROPERTY ENVIRONMENT PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Spin-orbit + spin-polarized converter test (CaOs2: cubic, two equivalent +# correlated atoms, 8 time-reversal symmetry operations). +file(COPY CaOs2.ctqmcout CaOs2.symqmc CaOs2.struct CaOs2.outputs + CaOs2.oubwinup CaOs2.oubwindn wien2k_soc_convert.ref.h5 + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +add_test(NAME Py_wien2k_soc_convert + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_soc_convert.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_soc_convert APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Pure-Python case.symqmc generator vs the dmftproj Fortran output (reuses the +# SOC reference h5; adds only the small text inputs the generator reads). +file(COPY CaOs2.dmftsym CaOs2.indmftpr DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_symqmc_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_symqmc_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_symqmc_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Generator on the two paths the cubic test does not reach: the spin-mixing +# fromfile (|j,m_j>) basis and an l=0 shell. Reuses CaOs2.dmftsym/struct; the +# references are the dmftproj matrix data (single precision, ~26 kB total). +file(COPY CaOs2_jbasis.indmftpr CaOs2_l0.indmftpr jbasis_d.dat + wien2k_symqmc_jbasis.ref.npy wien2k_symqmc_l0.ref.npy + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_symqmc_mixing + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_symqmc_mixing.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_symqmc_mixing APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Pure-Python case.oubwin band-window generator vs the dmftproj Fortran output. +# Reuses the committed CaOs2.oubwin{up,dn} references and the gzipped CaOs2 +# almblm inputs (shared with the ctqmcout test). CaOs2_mode1 adds the band-index +# projection path (proj_mode 1, window 60..76) against its own dmftproj refs. +file(COPY CaOs2.almblmup.gz CaOs2.almblmdn.gz + CaOs2_mode1.indmftpr CaOs2_mode1.oubwinup CaOs2_mode1.oubwindn + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_oubwin_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_oubwin_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_oubwin_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Wide-window fromfile (|j, m_j>) inputs and references shared by the ctqmcout, +# sympar and parproj generator tests (the spin-mixing dft_tools #148 path). +file(COPY CaOs2_jbasis_full.indmftpr CaOs2_jbasis_full.ctqmcout.gz + CaOs2_jbasis_full.sympar.gz CaOs2_jbasis_full.parproj.gz + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +# Pure-Python case.ctqmcout correlated-shell projector generator vs the dmftproj +# Fortran output. Reuses CaOs2.ctqmcout / indmftpr / struct / dmftsym and the +# gzipped almblm; floats compared at 1e-11 (full-rank wide window). The +# CaOs2_mode{1,2}_full fixtures exercise the band-index projection modes +# (proj_mode 1 scan, proj_mode 2 explicit indices), both resolving to bands +# 43..92, against their own precision-fixed dmftproj references. +file(COPY CaOs2_mode1_full.indmftpr CaOs2_mode1_full.ctqmcout.gz + CaOs2_mode2_full.indmftpr CaOs2_mode2_full.ctqmcout.gz + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_ctqmcout_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_ctqmcout_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_ctqmcout_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Pure-Python case.sympar partial-shell symmetry generator vs the dmftproj +# Fortran output. The CaOs2_partial fixture adds an uncorrelated Ca d-shell to +# the correlated Os d-shells; inputs reuse the CaOs2 struct/dmftsym/almblm. +file(COPY CaOs2_partial.indmftpr CaOs2_partial.sympar.gz + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_sympar_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_sympar_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_sympar_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Pure-Python case.parproj partial projectors + density matrices vs the dmftproj +# Fortran output. Same CaOs2_partial fixture as the sympar test. +file(COPY CaOs2_partial.parproj.gz DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_parproj_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_parproj_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_parproj_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Unit tests for the shared dmftproj machinery (_dmftproj), the module the five +# case.* generators are built on. Reuses CaOs2 / CaOs2_partial indmftpr + dmftsym. +add_test(NAME Py_wien2k_dmftproj_common + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_dmftproj_common_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_dmftproj_common APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) +# Pure-Python case.outband band-structure projector generator (the -band path +# that feeds convert_bands_input) vs the precision-fixed dmftproj -band output. +# The CaOs2_band fixture is the spin-mixing fromfile (|j, m_j>) Os d shell on a +# 4-point k-path; the band almblm carries a single representative k-point and the +# Fermi energy comes from the last line of the band indmftpr. Reuses +# CaOs2.struct/dmftsym and jbasis_d.dat; floats compared at 1e-11 (full-rank +# wide window). +file(COPY CaOs2_band.indmftpr CaOs2_band.klist_band + CaOs2_band.almblmup.gz CaOs2_band.almblmdn.gz CaOs2_band.outband.gz + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_outband_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_outband_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_outband_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Pure-Python generators on the non-spin-orbit path (ifSO=0, the common DMFT +# case): dmftproj writes (2l+1) matrices, per-spin orthonormalization. Validated +# against the precision-fixed dmftproj run without -so. Reuses CaOs2.struct/dmftsym. +file(COPY CaOs2_noso.indmftpr CaOs2_noso.almblmup.gz CaOs2_noso.almblmdn.gz + CaOs2_noso.ctqmcout.gz CaOs2_noso.symqmc.gz + CaOs2_noso_partial.indmftpr CaOs2_noso_partial.sympar.gz CaOs2_noso_partial.parproj.gz + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_noso_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_noso_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_noso_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Odd-l shells (p l=1, f l=3): the improper-rotation parity (-1)^l is invisible +# for the even-l (d) fixtures, so these pin dmat's use of iprop. p uses the +# standard almblm (wide window, full rank); f uses a high-band-cutoff almblm so +# the high-energy window carries real l=3 character and the Loewdin overlap is +# full rank. Both reproduce the precision-fixed dmftproj to machine precision. +file(COPY CaOs2_pshell.indmftpr CaOs2_pshell.ctqmcout.gz CaOs2_pshell.symqmc.gz + CaOs2_fshell.indmftpr CaOs2_fshell.almblmup.gz CaOs2_fshell.almblmdn.gz + CaOs2_fshell.ctqmcout.gz CaOs2_fshell.symqmc.gz + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_oddl_python + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_oddl_python.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_oddl_python APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) + +# Capstone: the pure-Python run_dmftproj driver replaces the Fortran executable. +# Both tests run the driver through the Wien2k converter and h5diff the result at +# machine precision (1e-12). The Loewdin overlap must be full rank: the physical +# narrow window is rank-deficient (more correlated spin-orbitals than bands, so +# O^{-1/2} has non-unique null eigenvectors), which is why the wide window is +# used here. The narrow physical case is still locked exactly by the +# Fortran-output converter test wien2k_soc_convert. +# Non-SO partial: convert_dft_input on the SP/non-SO oubwin path + convert_parproj_input. +# SO full-rank: convert_dft_input on a wide-window SO cell. +file(COPY CaOs2_noso_partial.indmftpr CaOs2_noso.almblmup.gz CaOs2_noso.almblmdn.gz + CaOs2.struct CaOs2.dmftsym CaOs2.outputs wien2k_noso_convert.ref.h5 + CaOs2_socfull.indmftpr CaOs2.almblmup.gz CaOs2.almblmdn.gz + wien2k_socfull_convert.ref.h5 + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME Py_wien2k_noso_convert + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_noso_convert.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_noso_convert APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) +add_test(NAME Py_wien2k_socfull_convert + COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wien2k_socfull_convert.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_property(TEST Py_wien2k_socfull_convert APPEND PROPERTY ENVIRONMENT + PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD}) diff --git a/test/python/wien2k/CaOs2.almblmdn.gz b/test/python/wien2k/CaOs2.almblmdn.gz new file mode 100644 index 0000000..b8fabd6 Binary files /dev/null and b/test/python/wien2k/CaOs2.almblmdn.gz differ diff --git a/test/python/wien2k/CaOs2.almblmup.gz b/test/python/wien2k/CaOs2.almblmup.gz new file mode 100644 index 0000000..b8a7d3d Binary files /dev/null and b/test/python/wien2k/CaOs2.almblmup.gz differ diff --git a/test/python/wien2k/CaOs2.ctqmcout b/test/python/wien2k/CaOs2.ctqmcout new file mode 100644 index 0000000..f0f6b70 --- /dev/null +++ b/test/python/wien2k/CaOs2.ctqmcout @@ -0,0 +1,134 @@ +13.605698 + 1 + 1 + 1 + 59.000000000000000 + 65.999999999899998 + 2 + 2 2 2 10 + 3 2 2 10 + 2 + 2 2 2 10 1 1 + 3 2 2 10 1 1 + -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.70710678118655135 1.4765966227514582E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.4765966227514582E-014 0.70710678118655135 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.4384942649885488E-015 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654391 -7.4384942649885488E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118655135 -1.4765966227514582E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4765966227514582E-014 0.70710678118655135 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.4384942649885488E-015 0.70710678118654391 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654391 -7.4384942649885488E-015 + 0.70710678118654380 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654391 1.4765966227514582E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.4765966227514582E-014 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 7.3829831137572910E-015 -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 7.3829831137572910E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654391 1.4765966227514582E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.4765966227514582E-014 0.70710678118654391 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.3829831137572910E-015 -0.70710678118655124 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 -7.3829831137572910E-015 + 0 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0 + 1 10 + 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.70710678118654757 0.0000000000000000 -0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.70710678118654757 0.0000000000000000 0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654757 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 0.0000000000000000 -0.70710678118654757 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654757 0.0000000000000000 0.70710678118654757 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 17 + -1.6364737630493277E-009 -8.0888580725012358E-009 -1.5073029468734900E-009 3.9125565708416238E-009 -0.22604523778910127 -8.5019869066658420E-010 -1.4187713677944467E-009 -1.7703175882762738E-006 0.63346496101916416 4.5676245507321725E-009 1.5871259379114100E-010 6.3028484878877605E-009 -9.9996340688402678E-010 -2.8646318384193197E-008 7.9677698266477674E-009 -1.1581990243364088E-008 -0.19390347890876408 + 2.7875320727334552E-002 3.8009442999480978E-009 -3.9500288317967722E-009 -1.1788397060873433E-009 -4.5514785274318637E-010 2.9663661576540072E-009 -8.0694023614837972E-010 -5.1944669240485263E-002 7.2541333040723273E-007 7.4583849446314001E-009 4.2091825644866673E-009 1.3239830131143230E-008 2.3620513131834740E-010 2.8049672864679444E-008 -9.5249947599798597E-009 -1.5752412382940841E-009 -6.7496732202006374E-009 + 0.19110210807023098 -8.3316935337577537E-008 -3.5104925200946670E-008 5.3430576914173581E-009 1.2722675775929680E-008 -1.2949630709638371E-008 -4.5194740638146307E-010 -3.4444008106951406E-003 4.9209227645008261E-008 -1.9113364262590849E-009 -1.1461163163064751E-009 -1.5288821845741855E-008 1.2727575557688944E-008 -3.1162266842011540E-007 7.4961918091694824E-008 -6.6492784117367224E-008 6.8759250839698748E-008 + -4.9388629252584230E-009 0.29092631454868900 -1.5885931072284031E-007 -0.26186273671481425 8.0539611164703330E-008 0.13228893266070882 -6.1805276250495673E-008 -1.1079887676563146E-008 5.3173233879045139E-010 -2.3840147529573242E-002 -1.0608106442841662E-002 0.14437186320991247 9.7191033993625750E-008 -4.7713932481133646E-003 5.1171312951558291E-007 2.1964099794077409E-002 3.2400036566811004E-007 + 1.8592746163798155E-009 0.29092646296782387 4.8441700280963662E-008 0.26186268702601345 -9.9842993354526051E-009 -0.13228898591171678 1.8184892086969941E-008 3.3517932105639359E-009 -4.2586751776201810E-010 -2.3840148278003584E-002 1.0608102453760544E-002 -0.14437181732446680 -2.8926941569162286E-008 -4.7707401468565225E-003 -1.4504517662227057E-007 -2.1963827329681194E-002 -4.0589252956389349E-008 + 1.3006696899978029E-009 0.18297860272758862 6.6105447730274154E-009 2.6699977239241286E-009 -7.2860931617780095E-009 2.6706936640113406E-009 -2.7420975896170643E-009 -6.3845930993881882E-009 4.6437991070965278E-009 -0.44807657053580940 -5.6321642543075172E-009 -3.5831648061960114E-009 -8.7704023764065650E-009 1.5170843870321297E-002 -1.8386433216578399E-008 -1.7861132437565136E-008 -2.1565000285449407E-008 + 2.3893728172146132E-011 -5.8621641607927665E-009 -4.7384080530992929E-009 0.16250576882794018 2.2024603974671464E-010 0.11724038428184635 -1.9094457224568921E-008 -2.8002757235361795E-009 1.2563600890478659E-009 -5.3842324955590105E-009 0.35421161006985175 8.7769738380358300E-002 -1.2413796631434059E-008 -2.5522095869749546E-008 2.9450812436724036E-008 0.14251485370955291 5.4371433324732525E-009 + -1.5236083225149538E-009 -1.9345731894701970E-008 -1.8405071672535539E-008 -0.15563645491315550 6.7335927729939222E-009 -0.49211255646386814 1.0042068649617921E-008 -1.7406941738124803E-010 1.3096659286419698E-009 2.9637998217792738E-009 -2.4850483673703155E-002 -0.14074232206643406 8.8573385670315238E-009 -2.7047485419311018E-008 4.2695771179307555E-008 5.9909611100427487E-002 2.6235520044645383E-008 + -0.40614676845385977 -5.5326408415975868E-008 -9.8551064905514207E-009 8.9405754409816131E-010 0.35500916387514836 -1.4850464068693635E-008 -1.6981627411048823E-008 -2.5927854792783937E-003 -4.4846238299319691E-002 -2.3610729165662912E-009 -6.1981372798689336E-010 -1.3308623144893715E-008 5.3517099407272490E-009 -2.3470650786659528E-007 7.7647948907330766E-008 -2.7547831649394795E-008 -6.1732102405569381E-002 + -0.40614673849569044 1.7227729145971521E-008 6.1509173627593437E-009 2.4681191141917476E-009 -0.35500916980606606 1.4130259422996842E-008 3.9662489693809647E-009 -2.5930378594641442E-003 4.4846312179011541E-002 2.0951472180287700E-009 5.4256729990038056E-010 4.9600369929685963E-009 9.2563740408443708E-009 8.7502036481521710E-008 -3.8776236724741492E-008 -4.5556174024477548E-009 6.1732136084814260E-002 + -2.9375681845920077E-010 -5.4996044474491380E-009 -8.9874871604376554E-010 -1.7286616428843901E-009 -0.18214494389185584 -4.9425806497296206E-009 1.3341248710820386E-009 -8.0222427225665845E-008 -0.30620242356549132 4.3010703135895242E-010 9.9675407716276727E-010 -1.1708638180509657E-009 4.5806177761915576E-011 2.2972194100486450E-009 -1.7341048936631688E-009 -6.4077302744847920E-010 -0.61492130856835681 + 1.6762973200700901E-002 8.3757111802912033E-009 -0.27082885938954970 7.1929776703982158E-009 1.7747191133215382E-009 -9.2059275821354266E-009 -7.3945719574441751E-002 0.70189401345399727 1.6172347103871265E-006 -1.2000664471106977E-009 -1.6061616339665583E-009 2.5313978520830045E-009 0.13535439378273573 6.3507988755650439E-009 0.63471485456001864 6.8403657486643410E-009 -1.8631379770672733E-009 + 0.11492028157002675 -6.6924049847962291E-008 -0.62205403742112542 -9.0731184993978598E-009 -2.8675878444658382E-008 -2.6356276320418915E-009 0.15344525864684783 4.6541890385691724E-002 1.1022809036555606E-007 -1.8294231895223204E-009 -9.8800668052124091E-010 -1.8503330702008538E-008 -0.22237925390573565 -1.9729670628751630E-009 -0.20012695331359981 1.5299584998451109E-008 6.8635818381152023E-009 + -2.5643977191075550E-009 -0.35224938002421180 5.9139080579439503E-010 -0.32529737378209117 -9.3811329532618534E-008 7.8572519339873789E-002 -3.7756390079974734E-009 -8.2440501208695438E-009 7.9284502728282035E-010 -2.8967098079511151E-002 1.8246437950490392E-002 -0.14705803567260523 8.1448394255010481E-010 0.20312432006570522 1.3795138452952988E-008 -9.4782925351665187E-002 -9.3789054526339713E-008 + -5.8830401784356914E-011 -0.35224924006447123 -2.9094474070747572E-009 0.32529741646115973 1.6818904155830553E-008 -7.8572484062731804E-002 1.0401410550747200E-009 1.1157780017376459E-009 -9.8806053873539545E-010 -2.8967090476840658E-002 -1.8246440377539450E-002 0.14705802609409765 4.8120744728587045E-009 0.20312435185006003 5.1889203035151739E-009 9.4783003107920510E-002 2.0617133292183437E-008 + -3.6059486385991273E-011 -0.22154767181960641 -4.3666837584732465E-009 -2.3700925023919114E-009 5.8745202249981382E-009 -1.8907495839802861E-009 -2.6460905332983103E-009 3.3991009495120138E-009 1.6478849788282492E-009 -0.54443778022841149 -8.3626721440915476E-010 -3.1722110562833976E-010 -2.5855588148992714E-009 -0.64591431417268008 5.3259903518536913E-009 -5.8965798836662491E-009 1.0650557018015385E-009 + -1.2150427926714141E-010 -4.0118973955998543E-009 2.3638013507327320E-009 0.20187185934300889 2.5429245229356206E-009 6.9634421363991228E-002 -1.5241739967259630E-009 -3.9392436219525426E-009 3.3412829840168361E-010 1.6930876672513725E-009 -0.60926070783466080 -8.9402795740053290E-002 -4.3117759119384675E-009 2.8057260935437424E-009 1.0264872708201556E-008 -0.61501096964091095 3.2484065827446341E-009 + -1.1172313740963202E-009 3.9429180505528409E-009 -3.7697853426112111E-009 -0.19333851645543204 -3.2436893733587295E-009 -0.29228817177237698 -2.6111437954460776E-009 1.0350119399947264E-009 -4.7388330047844555E-010 -1.3296972736845110E-010 4.2744002940343459E-002 0.14336099426169066 7.4418616796492475E-010 4.2116653256506721E-008 1.8519824222048552E-008 -0.25853516965252632 1.0375206847991757E-008 + -0.24423852360876522 -5.1646580628083888E-008 -0.12760982409050936 -1.0659668655112989E-008 0.28606273266739701 -1.0454024862025998E-008 -0.41400167750017902 3.5036324071657216E-002 2.1677742108702644E-002 -1.6010427777144940E-009 -1.7614192765886939E-009 -2.2476683811204583E-008 0.20257530446460467 -1.7254604170860407E-008 -0.14588209601226013 3.2651605199294944E-008 -0.19576969760255078 + -0.24423850300244257 1.9638041414349023E-008 -0.12760981741350305 5.9383972880259453E-009 -0.28606273790119507 -1.0504878225658375E-008 -0.41400170183241886 3.5036312238196220E-002 -2.1677579123179261E-002 -8.4932099343800901E-010 6.8693395947932463E-010 2.1763149811873753E-009 0.20257529433929861 1.6771639879642121E-008 -0.14588209000315056 -3.0328483776047447E-008 0.19576970510776853 + 1.5742593420368659E-009 2.7663536665404652E-009 1.8502466755381737E-009 4.1545534087880997E-009 -0.22604524330183060 3.3561777604142808E-009 1.4747450787935593E-009 1.7703142767497045E-006 -0.63346496101679717 -4.5584756646660029E-009 -1.4133293060279910E-010 9.0367639538542631E-009 -4.3079617306589231E-010 1.6823160391632297E-008 -7.9983581606319914E-009 -7.9660645582934864E-009 -0.19390348916968214 + -2.7875320516982997E-002 -9.8504411695241786E-009 -7.8371958516376568E-009 1.5129406281486946E-009 1.1316237388957151E-009 5.7953332962810498E-010 -1.2226862273360659E-009 5.1944669280297999E-002 -7.2536230720706391E-007 -7.4588525599505437E-009 -4.2166535087245802E-009 1.0869592216248509E-008 2.7808804725547166E-009 -2.8179038275099079E-008 4.2071397899902890E-009 -1.3387478020219511E-008 6.1286595168445476E-009 + -0.19110211207511088 7.3619775981124216E-008 2.3559333247811542E-008 -1.4784480513246270E-008 -1.1115226766187535E-008 1.1637569535744193E-008 -1.7722160752721371E-009 3.4444003936094959E-003 -5.0066090057178471E-008 2.0712533037166276E-009 1.2138071671031628E-009 1.2265849997915118E-008 -1.3412063354801199E-008 3.1502262751540708E-007 -7.4099555210789280E-008 6.6748946037724849E-008 -7.0377762743457329E-008 + 5.8867673959312925E-009 0.29092654611302515 1.6043118238196619E-007 -0.26186264729115688 -7.7583474149628449E-008 0.13228903780293455 4.5828382299185551E-008 1.1189847324048000E-008 -6.4161757077216673E-010 2.3840146743883548E-002 1.0608106405228556E-002 0.14437178223917738 -9.2510279707870297E-008 -4.7703121331356306E-003 -5.0710315484458914E-007 2.1963521355808605E-002 -3.2388085008271195E-007 + -2.0611763464110732E-009 0.29092640195832109 -4.1780328981358853E-008 0.26186269300196408 6.5145009521278771E-009 -0.13228898457668678 -1.2381655699153787E-008 -3.3817522539523969E-009 4.3891898722244074E-010 2.3840148525995981E-002 -1.0608102412027309E-002 -0.14437182636010429 2.6471724874926621E-008 -4.7709686247501808E-003 1.4546065062816202E-007 -2.1963788072849814E-002 4.0855522464531085E-008 + -1.4119917990111533E-009 0.18297859349654697 -4.5962238588814453E-009 -1.9925930663407642E-009 2.6096051413764505E-010 -2.9600964876233509E-009 -6.9093627752431666E-009 6.4351647809770088E-009 -4.6391106869871014E-009 0.44807657052396277 5.5933940202089487E-009 1.7132905980721300E-009 -1.3621071854369413E-009 1.5170798116606250E-002 2.0608663120491609E-008 1.0989432491835354E-008 8.5874429342512463E-009 + -3.2996234151727865E-011 5.5628681758493206E-009 9.5140043389568367E-009 0.16250577105738925 -6.0312180647196198E-009 0.11724038769308767 -1.4823777762351086E-008 2.8065403272227263E-009 -1.2684406390683123E-009 5.3780197928348473E-009 -0.35421161004201923 8.7769737148320204E-002 -2.1539468729564028E-008 1.7660724718389309E-008 -1.5884563977142187E-008 0.14251484359654584 -2.0085620692105112E-008 + 1.8384234868455688E-009 1.8514900688217580E-008 1.5655499847025844E-008 -0.15563646800806255 -8.4316077074118275E-009 -0.49211254887555472 1.3531033430693936E-008 2.2355024467665528E-010 -1.2918408467519571E-009 -2.8976718084908578E-009 2.4850483899222165E-002 -0.14074230046277000 -1.6751496664189300E-008 2.4400923412522542E-008 -4.3163273919020436E-008 5.9909731753925548E-002 -2.5735806120589130E-008 + 0.40614676611073364 5.7318190577374422E-008 2.2076147725745869E-008 -2.4974135851905523E-009 0.35500913394195077 2.0562514399998390E-008 2.7069392921030576E-009 2.5927862223980719E-003 4.4846238500052510E-002 2.5265093538242557E-009 5.0706685303566229E-010 1.2727421868984430E-008 5.3890158877803532E-009 2.3356505406810666E-007 -7.1822962672043274E-008 2.9319634161002884E-008 -6.1732208180109584E-002 + 0.40614673796945883 -2.1593234460881796E-008 -8.8401390543305508E-009 -1.1082150801032474E-009 -0.35500912348431773 -1.0290715571286910E-008 -1.5195442659818969E-008 2.5930377658901055E-003 -4.4846311604862694E-002 -2.1221874090835210E-009 -5.0536414900050731E-010 -7.8231853321640755E-009 -2.1554415376099141E-009 -8.8495970539629362E-008 4.0414586893298193E-008 8.4488285488055934E-010 6.1732175713997348E-002 + 5.0992271142369417E-010 4.6599282142188231E-009 9.3446623396195022E-010 9.7327162801908101E-010 -0.18214494212216939 -5.3573107428721319E-009 -2.9504519753454791E-010 8.0257447634623298E-008 0.30620242351428700 -4.2249656780723851E-010 -9.9778349719933987E-010 2.7309658904653166E-009 -1.9695127432732024E-009 7.1486199140908220E-009 -4.0683123379810595E-010 -9.4435123679549703E-009 -0.61492129564244624 + -1.6762973199701860E-002 -2.9426969349565142E-009 -0.27082885939648832 3.8782576739255932E-009 -1.7765090857923100E-009 -1.0124186916709490E-008 -7.3945720138237386E-002 -0.70189401344110103 -1.6172720797124096E-006 1.1705823355188979E-009 1.5966969712953837E-009 -9.9775396154796125E-010 0.13535439281086128 5.8443843662636267E-009 0.63471485619332590 1.0269302867014800E-008 -8.8157104489323579E-010 + -0.11492027822477965 6.7694678028205186E-008 -0.62205403359225053 2.2342683926840195E-008 1.8699330907773905E-008 8.1676527370455741E-009 0.15344526855196647 -4.6541890491933968E-002 -1.0971233021460377E-007 1.7229510241713816E-009 1.0500466741275098E-009 2.3254591277694101E-008 -0.22237924342687854 3.5100679340660536E-009 -0.20012697063281365 -2.3048694160675769E-008 -2.0471419143459975E-009 + 3.5271622814834441E-009 -0.35224914838542887 -3.5225121935369326E-009 -0.32529746639083307 8.8551442100024941E-008 7.8572427791505556E-002 6.4385694426295145E-009 8.0381310779977693E-009 -9.9751663228796189E-010 2.8967097721370329E-002 -1.8246438428526985E-002 -0.14705802375342400 -7.0275330142045251E-009 0.20312441859369038 -6.7548424524306092E-009 -9.4783079473931664E-002 9.5614138269067609E-008 + 1.3952373313671362E-010 -0.35224927618413732 1.4455955989094554E-010 0.32529741430357523 -1.3276187178202917E-008 -7.8572464395327335E-002 5.4904801009519814E-009 -1.1001610704872115E-009 1.0137971615894012E-009 2.8967090634768711E-002 1.8246440613480460E-002 0.14705803262703129 6.6806076064579093E-009 0.20312438512626860 -1.1491059936198912E-008 9.4783003797673682E-002 -1.9574697961566100E-008 + 1.9361544634676521E-011 -0.22154768180279524 -4.4635028219269060E-009 1.8884562931050695E-009 -2.6504861088999919E-009 2.5373722478085742E-009 -3.3036546558675735E-009 -3.3931586267152647E-009 -1.6404859039496945E-009 0.54443778027765288 8.1119964826220452E-010 -9.3895268045326840E-010 -2.4061645547839061E-009 -0.64591432122296211 7.3282704732187262E-009 2.2826705161791458E-009 -6.8361902293349349E-009 + 1.5099987235009866E-010 3.9085791329904687E-009 2.7197902189263675E-009 0.20187185973947180 9.5584212911557755E-009 6.9634421132944838E-002 -4.9396034311808418E-010 3.9530186904019645E-009 -3.3464319924958049E-010 -1.6703983974089809E-009 0.60926070784040942 -8.9402797225288710E-002 -4.4211580837835744E-009 -1.1430896889116693E-009 8.2534217955115856E-009 -0.61501097703679075 8.6409543543525274E-009 + 1.2692370470051071E-009 -3.3632447914108679E-009 2.7817690031500991E-009 -0.19333847723231190 6.0780715477958229E-009 -0.29228812716847979 9.0572109757205474E-009 -1.0543292728153569E-009 4.5881300520309981E-010 1.7833293749406573E-010 -4.2744003049157930E-002 0.14336097652304478 3.6376140861799886E-009 -4.1440144181854518E-008 -8.6513383736921835E-009 -0.25853520729997059 -1.0450496688074811E-008 + 0.24423852348107675 5.4303121395571919E-008 -0.12760981439406968 1.3545050409211572E-008 0.28606274835538148 -1.1009534975559398E-008 -0.41400169364682754 -3.5036324314588418E-002 -2.1677741702875800E-002 1.7643542180073014E-009 1.6819076556279465E-009 1.4102545031613096E-008 0.20257529503844063 1.8392694761220754E-008 -0.14588209020097798 -3.8684821490684642E-008 -0.19576960619363615 + 0.24423849905495446 -2.3160394495418732E-008 -0.12760983883351798 -5.4856564602087157E-009 -0.28606274404624205 -4.8315143197851219E-009 -0.41400168683919236 -3.5036312368052311E-002 2.1677579131180954E-002 8.5965184683648331E-010 -6.4978366769731779E-010 -1.3605097637932516E-008 0.20257531280783131 -1.6396565986282201E-008 -0.14588210560397749 2.3135718924320573E-008 0.19576960103086796 + 1.0000000000000000 + -0.14719728634143203 + -6.2687483552602008E-002 + -5.6791699157407005E-002 + -4.6939855280641041E-002 + -2.3731054975468013E-002 + -5.9289132889430718E-003 + 0.0000000000000000 + 7.0047796896619996E-002 + 7.0116347318387007E-002 + 0.10027100453936799 + 0.10379476904357798 + 0.14516977295802591 + 0.15348172411197192 + 0.20481842207514100 + 0.21209028506752292 + 0.21406914507310593 + 0.22096001200155491 diff --git a/test/python/wien2k/CaOs2.dmftsym b/test/python/wien2k/CaOs2.dmftsym new file mode 100644 index 0000000..aa6f374 --- /dev/null +++ b/test/python/wien2k/CaOs2.dmftsym @@ -0,0 +1,124 @@ + 16 + 1 3 2 + 1 2 3 + 1 2 3 + 1 3 2 + 1 2 3 + 1 3 2 + 1 3 2 + 1 2 3 + 1 2 3 + 1 3 2 + 1 3 2 + 1 2 3 + 1 3 2 + 1 2 3 + 1 2 3 + 1 3 2 + +Sym. op. : 1 + 0.0 0.0 0.0 -1 - euler angles: a,b,c; iprop + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 2 + 270.0 0.0 0.0 -1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 3 + 90.0 0.0 0.0 -1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 4 + 180.0 0.0 0.0 -1 - euler angles: a,b,c; iprop + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 5 + 180.0 0.0 0.0 1 - euler angles: a,b,c; iprop + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 6 + 90.0 0.0 0.0 1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 7 + 270.0 0.0 0.0 1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 8 + 0.0 0.0 0.0 1 - euler angles: a,b,c; iprop + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + +Sym. op. : 9 + 0.0 180.0 180.0 1 - euler angles: a,b,c; iprop + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 10 + 0.0 180.0 90.0 1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 11 + 0.0 180.0 270.0 1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 12 + 0.0 180.0 0.0 1 - euler angles: a,b,c; iprop + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 13 + 0.0 180.0 0.0 -1 - euler angles: a,b,c; iprop + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 14 + 0.0 180.0 270.0 -1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + -1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 15 + 0.0 180.0 90.0 -1 - euler angles: a,b,c; iprop + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + +Sym. op. : 16 + 0.0 180.0 180.0 -1 - euler angles: a,b,c; iprop + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 -1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 -1.00000000000000 + Global->local coordinates rotation matrices + 1 + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + 0.0 0.0 0.0 1 - euler angles: a,b,c; iprop + 2 + 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 + 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 + 0.000000000000000E+000 0.000000000000000E+000 1.00000000000000 + 0.0 0.0 0.0 1 - euler angles: a,b,c; iprop diff --git a/test/python/wien2k/CaOs2.indmftpr b/test/python/wien2k/CaOs2.indmftpr new file mode 100644 index 0000000..abca02f --- /dev/null +++ b/test/python/wien2k/CaOs2.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +1 +-0.15 0.30 diff --git a/test/python/wien2k/CaOs2.oubwindn b/test/python/wien2k/CaOs2.oubwindn new file mode 100644 index 0000000..778773d --- /dev/null +++ b/test/python/wien2k/CaOs2.oubwindn @@ -0,0 +1,5 @@ + 1 + 1 + 1 + 60 76 + 1.0000000000000000 diff --git a/test/python/wien2k/CaOs2.oubwinup b/test/python/wien2k/CaOs2.oubwinup new file mode 100644 index 0000000..778773d --- /dev/null +++ b/test/python/wien2k/CaOs2.oubwinup @@ -0,0 +1,5 @@ + 1 + 1 + 1 + 60 76 + 1.0000000000000000 diff --git a/test/python/wien2k/CaOs2.outputs b/test/python/wien2k/CaOs2.outputs new file mode 100644 index 0000000..e97a1f8 --- /dev/null +++ b/test/python/wien2k/CaOs2.outputs @@ -0,0 +1,562 @@ +CaOs2 fluorite test s-o calc. M|| 0.00 0.00 1.00 + Bravais Matrix: + 0.00000 0.50000 0.50000 + 0.50000 0.00000 0.50000 + 0.50000 0.50000 0.00000 + ATOMIC POSITIONS: + 1 0.00000000 0.00000000 0.00000000 + 2 3.00000000 3.00000000 3.00000000 + 3 9.00000000 9.00000000 9.00000000 + PGLSYM: THE CRYSTAL SYSTEM IS CUBIC + PGLSYM: ORDER OF LATTICE POINT GROUP (NO BASE) = 48 + PGBSYM: ORDER OF LATTICE SPACE GROUP (WITH BASE) = 48 + PGBSYM: SPACE GROUP IS SYMMORPHIC + PGBSYM: SPACE GROUP CONTAINS INVERSION + Symmetry operation 1 + 1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 1 in struct file + Symmetry operation 2 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 2 in struct file + Symmetry operation 3 + -1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 3 in struct file + Symmetry operation 4 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 4 in struct file + Symmetry operation 5 + 0.00000 -1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 5 in struct file + Symmetry operation 6 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 -1.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 6 in struct file + Symmetry operation 7 + 0.00000 1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 7 in struct file + Symmetry operation 8 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 -1.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 8 in struct file + Symmetry operation 9 + 0.00000 0.00000 -1.00000 + 1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 9 in struct file + Symmetry operation 10 + 0.00000 0.00000 -1.00000 + 0.00000 -1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 10 in struct file + Symmetry operation 11 + 0.00000 0.00000 1.00000 + 1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 11 in struct file + Symmetry operation 12 + 0.00000 0.00000 1.00000 + 0.00000 -1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 12 in struct file + Symmetry operation 13 + 0.00000 -1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 13 in struct file + Symmetry operation 14 + 0.00000 1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 14 in struct file + Symmetry operation 15 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 -1.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 15 in struct file + Symmetry operation 16 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 -1.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 16 in struct file + Symmetry operation 17 + 1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 17 in struct file + Symmetry operation 18 + -1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + this is operation 18 in struct file + Symmetry operation 19 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 19 in struct file + Symmetry operation 20 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 -1.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + this is operation 20 in struct file + Symmetry operation 21 + 0.00000 0.00000 -1.00000 + -1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 21 in struct file + Symmetry operation 22 + 0.00000 0.00000 -1.00000 + 0.00000 -1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 22 in struct file + Symmetry operation 23 + 0.00000 0.00000 1.00000 + -1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 23 in struct file + Symmetry operation 24 + 0.00000 0.00000 1.00000 + 0.00000 -1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 24 in struct file + Symmetry operation 25 + 0.00000 0.00000 -1.00000 + 0.00000 1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 25 in struct file + Symmetry operation 26 + 0.00000 0.00000 -1.00000 + 1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 26 in struct file + Symmetry operation 27 + 0.00000 0.00000 1.00000 + 0.00000 1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 27 in struct file + Symmetry operation 28 + 0.00000 0.00000 1.00000 + 1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 28 in struct file + Symmetry operation 29 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 29 in struct file + Symmetry operation 30 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 30 in struct file + Symmetry operation 31 + 1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 31 in struct file + Symmetry operation 32 + -1.00000 0.00000 0.00000 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 32 in struct file + Symmetry operation 33 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 1.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 33 in struct file + Symmetry operation 34 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 1.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 34 in struct file + Symmetry operation 35 + 0.00000 -1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 35 in struct file + Symmetry operation 36 + 0.00000 1.00000 0.00000 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + 0.0000 1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 36 in struct file + Symmetry operation 37 + 0.00000 0.00000 -1.00000 + 0.00000 1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 37 in struct file + Symmetry operation 38 + 0.00000 0.00000 -1.00000 + -1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + this is operation 38 in struct file + Symmetry operation 39 + 0.00000 0.00000 1.00000 + 0.00000 1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 39 in struct file + Symmetry operation 40 + 0.00000 0.00000 1.00000 + -1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + this is operation 40 in struct file + Symmetry operation 41 + 0.00000 -1.00000 0.00000 + 0.00000 0.00000 1.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 41 in struct file + Symmetry operation 42 + 0.00000 -1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 42 in struct file + Symmetry operation 43 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 1.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + 0.0000 0.0000 -1.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 43 in struct file + Symmetry operation 44 + 0.00000 1.00000 0.00000 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + 0.0000 -1.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 44 in struct file + Symmetry operation 45 + 1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 45 in struct file + Symmetry operation 46 + 1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 46 in struct file + Symmetry operation 47 + -1.00000 0.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + this is operation 47 in struct file + Symmetry operation 48 + -1.00000 0.00000 0.00000 + 0.00000 1.00000 0.00000 + 0.00000 0.00000 1.00000 + 0.00000 0.00000 0.00000 + -1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 1.0000 0.0000 + this is operation 48 in struct file + + + +DETERMINATION OF POINTGROUP FOR ALL POSITIONS +CaOs2 fluorite test s-o calc. M|| 0.00 0.00 1.00 + 1 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 + 2 6.0000000 6.0000000 0.0000000 0.5000000 0.5000000 0.0000000 + 3 6.0000000 0.0000000 6.0000000 0.5000000 0.0000000 0.5000000 + 4 0.0000000 6.0000000 6.0000000 0.0000000 0.5000000 0.5000000 +Ca : 4 Atoms, Index 1 to 4 + 5 3.0000000 3.0000000 3.0000000 0.2500000 0.2500000 0.2500000 + 6 9.0000000 9.0000000 3.0000000 0.7500000 0.7500000 0.2500000 + 7 9.0000000 3.0000000 9.0000000 0.7500000 0.2500000 0.7500000 + 8 3.0000000 9.0000000 9.0000000 0.2500000 0.7500000 0.7500000 + 9 9.0000000 9.0000000 9.0000000 0.7500000 0.7500000 0.7500000 + 10 3.0000000 3.0000000 9.0000000 0.2500000 0.2500000 0.7500000 + 11 3.0000000 9.0000000 3.0000000 0.2500000 0.7500000 0.2500000 + 12 9.0000000 3.0000000 3.0000000 0.7500000 0.2500000 0.2500000 +Os : 8 Atoms, Index 5 to 12 +number of atoms: 12 + + ATOM: 1 +Ca operation # 1 1 +Ca operation # 2 -1 +Ca operation # 3 2 || x +Ca operation # 4 2 || y +Ca operation # 5 2 || z +Ca operation # 6 m n z +Ca operation # 7 m n y +Ca operation # 8 m n x +Ca operation # 9 4 || x +Ca operation # 10 4 || y +Ca operation # 11 4 || z +Ca operation # 12 m n 110 +Ca operation # 13 m n -110 +Ca operation # 14 m n 101 +Ca operation # 15 m n 011 +Ca operation # 16 m n -101 +Ca operation # 17 m n 0-11 +Ca operation # 18 2 || 110 +Ca operation # 19 2 || -110 +Ca operation # 20 2 || 101 +Ca operation # 21 2 || 011 +Ca operation # 22 2 || -101 +Ca operation # 23 2 || 0-11 +Ca operation # 24 3 || 111 +Ca operation # 25 3 || 11-1 +Ca operation # 26 3 || -111 +Ca operation # 27 3 || 1-11 +Ca operation # 28 S6 || 111 +Ca operation # 29 S6 || -1-11 +Ca operation # 30 S6 || 1-1-1 +Ca operation # 31 S6 || 1-11 +Ca operation # 32 S4 || x +Ca operation # 33 S4 || y +Ca operation # 34 S4 || z +Ca operation # 35 4 || x +Ca operation # 36 4 || y +Ca operation # 37 4 || z +Ca operation # 38 3 || 111 +Ca operation # 39 3 || 11-1 +Ca operation # 40 3 || -111 +Ca operation # 41 3 || 1-11 +Ca operation # 42 S6 || 111 +Ca operation # 43 S6 || -1-11 +Ca operation # 44 S6 || 1-1-1 +Ca operation # 45 S6 || 1-11 +Ca operation # 46 S4 || x +Ca operation # 47 S4 || y +Ca operation # 48 S4 || z + pointgroup is m3m (pos. iatnr!!) + axes should be: any + z-rotation vector: 0.0000 0.0000 1.0000 + y-rotation vector: 0.0000 0.0000 0.0000 0 +LOCAL ROT MATRIX: NEW OLD + 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 + 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 + 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 +lm: 0 0 4 0 4 4 6 0 6 4 + ============================================== + + ATOM: 2 +Os operation # 1 1 +Os operation # 3 2 || x +Os operation # 4 2 || y +Os operation # 5 2 || z +Os operation # 12 m n 110 +Os operation # 13 m n -110 +Os operation # 14 m n 101 +Os operation # 15 m n 011 +Os operation # 16 m n -101 +Os operation # 17 m n 0-11 +Os operation # 24 3 || 111 +Os operation # 25 3 || 11-1 +Os operation # 26 3 || -111 +Os operation # 27 3 || 1-11 +Os operation # 32 S4 || x +Os operation # 33 S4 || y +Os operation # 34 S4 || z +Os operation # 38 3 || 111 +Os operation # 39 3 || 11-1 +Os operation # 40 3 || -111 +Os operation # 41 3 || 1-11 +Os operation # 46 S4 || x +Os operation # 47 S4 || y +Os operation # 48 S4 || z + pointgroup is -43m (pos. iatnr!!) + axes should be: any + z-rotation vector: 0.0000 0.0000 1.0000 + y-rotation vector: 1.0000 0.0000 0.0000 0 +LOCAL ROT MATRIX: NEW OLD + 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 + 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 + 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 +lm: 0 0 4 0 4 4 6 0 6 4 -3 2 + ============================================== diff --git a/test/python/wien2k/CaOs2.struct b/test/python/wien2k/CaOs2.struct new file mode 100644 index 0000000..0db2f5f --- /dev/null +++ b/test/python/wien2k/CaOs2.struct @@ -0,0 +1,82 @@ +CaOs2 fluorite test s-o calc. M|| 0.00 0.00 1.00 +F 2 + RELA + 12.000000 12.000000 12.000000 90.000000 90.000000 90.000000 +ATOM -1: X=0.00000000 Y=0.00000000 Z=0.00000000 + MULT= 1 ISPLIT=-2 +Ca NPT= 781 R0=.000010000 RMT= 2.30000 Z: 20.00000 +LOCAL ROT MATRIX: 1.0000000 0.0000000 0.0000000 + 0.0000000 1.0000000 0.0000000 + 0.0000000 0.0000000 1.0000000 +ATOM -2: X=0.25000000 Y=0.25000000 Z=0.25000000 + MULT= 2 ISPLIT=-2 + -2: X=0.75000000 Y=0.75000000 Z=0.75000000 +Os NPT= 781 R0=.000005000 RMT= 2.00000 Z: 76.00000 +LOCAL ROT MATRIX: 1.0000000 0.0000000 0.0000000 + 0.0000000 1.0000000 0.0000000 + 0.0000000 0.0000000 1.0000000 + 16 NUMBER OF SYMMETRY OPERATIONS +-1 0 0 0.00000000 + 0-1 0 0.00000000 + 0 0-1 0.00000000 + 1 A 3 so. oper. type orig. index + 0 1 0 0.00000000 +-1 0 0 0.00000000 + 0 0-1 0.00000000 + 2 A 5 + 0-1 0 0.00000000 + 1 0 0 0.00000000 + 0 0-1 0.00000000 + 3 A 14 + 1 0 0 0.00000000 + 0 1 0 0.00000000 + 0 0-1 0.00000000 + 4 A 17 +-1 0 0 0.00000000 + 0-1 0 0.00000000 + 0 0 1 0.00000000 + 5 A 32 + 0 1 0 0.00000000 +-1 0 0 0.00000000 + 0 0 1 0.00000000 + 6 A 35 + 0-1 0 0.00000000 + 1 0 0 0.00000000 + 0 0 1 0.00000000 + 7 A 44 + 1 0 0 0.00000000 + 0 1 0 0.00000000 + 0 0 1 0.00000000 + 8 A 46 + 1 0 0 0.00000000 + 0-1 0 0.00000000 + 0 0-1 0.00000000 + 9 B 1 + 0 1 0 0.00000000 + 1 0 0 0.00000000 + 0 0-1 0.00000000 + 10 B 7 + 0-1 0 0.00000000 +-1 0 0 0.00000000 + 0 0-1 0.00000000 + 11 B 13 +-1 0 0 0.00000000 + 0 1 0 0.00000000 + 0 0-1 0.00000000 + 12 B 18 + 1 0 0 0.00000000 + 0-1 0 0.00000000 + 0 0 1 0.00000000 + 13 B 31 + 0 1 0 0.00000000 + 1 0 0 0.00000000 + 0 0 1 0.00000000 + 14 B 36 + 0-1 0 0.00000000 +-1 0 0 0.00000000 + 0 0 1 0.00000000 + 15 B 42 +-1 0 0 0.00000000 + 0 1 0 0.00000000 + 0 0 1 0.00000000 + 16 B 48 diff --git a/test/python/wien2k/CaOs2.symqmc b/test/python/wien2k/CaOs2.symqmc new file mode 100644 index 0000000..76b4983 --- /dev/null +++ b/test/python/wien2k/CaOs2.symqmc @@ -0,0 +1,658 @@ + 16 3 + 1 3 2 + 1 2 3 + 1 2 3 + 1 3 2 + 1 2 3 + 1 3 2 + 1 3 2 + 1 2 3 + 1 2 3 + 1 3 2 + 1 3 2 + 1 2 3 + 1 3 2 + 1 2 3 + 1 2 3 + 1 3 2 + 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.70710678118655124 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 0.70710678118655135 1.4813100786493514E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 1.4813100786493514E-014 0.70710678118655135 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932468359E-015 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118654391 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118655135 -1.4813100786493514E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4813100786493514E-014 0.70710678118655135 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.4065503932468359E-015 0.70710678118654391 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654391 -7.4065503932468359E-015 + 0.70710678118654380 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654391 1.4813100786493672E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.4813100786493672E-014 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 7.4065503932467570E-015 -0.70710678118655135 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655135 7.4065503932467570E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 0.70710678118654391 1.4813100786493672E-014 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 1.4813100786493672E-014 0.70710678118654391 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932467570E-015 -0.70710678118655135 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118655135 -7.4065503932467570E-015 + -0.70710678118655124 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 0.70710678118655135 1.4813100786493514E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 1.4813100786493514E-014 0.70710678118655135 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932468359E-015 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118654391 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118655135 -1.4813100786493514E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4813100786493514E-014 0.70710678118655135 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.4065503932468359E-015 0.70710678118654391 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654391 -7.4065503932468359E-015 + 0.70710678118654380 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654391 1.4813100786493672E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.4813100786493672E-014 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 7.4065503932467570E-015 -0.70710678118655135 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655135 7.4065503932467570E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 0.70710678118654391 1.4813100786493672E-014 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 1.4813100786493672E-014 0.70710678118654391 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932467570E-015 -0.70710678118655135 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118655135 -7.4065503932467570E-015 + 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654635 4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -2.4688501310822614E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 -0.70710678118654891 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654891 -2.4688501310822614E-015 + 0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.9377002621645228E-015 -0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822701E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -2.4688501310822701E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645228E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.4688501310822701E-015 -0.70710678118654635 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 2.4688501310822701E-015 + 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654635 4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -2.4688501310822614E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 -0.70710678118654891 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654891 -2.4688501310822614E-015 + 0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.9377002621645228E-015 -0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822701E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -2.4688501310822701E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645228E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.4688501310822701E-015 -0.70710678118654635 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 2.4688501310822701E-015 + -3.4914813388431334E-015 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -3.4914813388431341E-015 -1.3965925355372535E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -1.3965925355372535E-014 -3.4914813388431341E-015 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 3.4914813388431341E-015 -6.9829626776862675E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -6.9829626776862675E-015 3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431341E-015 1.3965925355372535E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.3965925355372535E-014 -3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 3.4914813388431341E-015 6.9829626776862675E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.9829626776862675E-015 3.4914813388431341E-015 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 -4.8761767757959364E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.8761767757959364E-029 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000002 -2.4380883878979682E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4380883878979682E-029 -1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -1.0000000000000002 -4.8761767757959364E-029 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -4.8761767757959364E-029 -1.0000000000000002 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 1.0000000000000002 -2.4380883878979682E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -2.4380883878979682E-029 1.0000000000000002 + -3.4914813388431334E-015 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -3.4914813388431341E-015 -1.3965925355372535E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -1.3965925355372535E-014 -3.4914813388431341E-015 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 3.4914813388431341E-015 -6.9829626776862675E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -6.9829626776862675E-015 3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431341E-015 1.3965925355372535E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.3965925355372535E-014 -3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 3.4914813388431341E-015 6.9829626776862675E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.9829626776862675E-015 3.4914813388431341E-015 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 -4.8761767757959364E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.8761767757959364E-029 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000002 -2.4380883878979682E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4380883878979682E-029 -1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -1.0000000000000002 -4.8761767757959364E-029 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -4.8761767757959364E-029 -1.0000000000000002 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 1.0000000000000002 -2.4380883878979682E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -2.4380883878979682E-029 1.0000000000000002 + -3.4914813388431334E-015 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -3.4914813388431341E-015 -1.3965925355372535E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -1.3965925355372535E-014 -3.4914813388431341E-015 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 3.4914813388431341E-015 -6.9829626776862675E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -6.9829626776862675E-015 3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431341E-015 1.3965925355372535E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.3965925355372535E-014 -3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 3.4914813388431341E-015 6.9829626776862675E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.9829626776862675E-015 3.4914813388431341E-015 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 -4.8761767757959364E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.8761767757959364E-029 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000002 -2.4380883878979682E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4380883878979682E-029 -1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -1.0000000000000002 -4.8761767757959364E-029 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -4.8761767757959364E-029 -1.0000000000000002 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 1.0000000000000002 -2.4380883878979682E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -2.4380883878979682E-029 1.0000000000000002 + -3.4914813388431334E-015 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -3.4914813388431341E-015 -1.3965925355372535E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -1.3965925355372535E-014 -3.4914813388431341E-015 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 3.4914813388431341E-015 -6.9829626776862675E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -6.9829626776862675E-015 3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431341E-015 1.3965925355372535E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.3965925355372535E-014 -3.4914813388431341E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 3.4914813388431341E-015 6.9829626776862675E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.9829626776862675E-015 3.4914813388431341E-015 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 -4.8761767757959364E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.8761767757959364E-029 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000002 -2.4380883878979682E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4380883878979682E-029 -1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -1.0000000000000002 -4.8761767757959364E-029 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -4.8761767757959364E-029 -1.0000000000000002 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 1.0000000000000002 -2.4380883878979682E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -2.4380883878979682E-029 1.0000000000000002 + 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654635 4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -2.4688501310822614E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 -0.70710678118654891 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654891 -2.4688501310822614E-015 + 0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.9377002621645228E-015 -0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822701E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -2.4688501310822701E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645228E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.4688501310822701E-015 -0.70710678118654635 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 2.4688501310822701E-015 + 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654635 4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -2.4688501310822614E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -4.9377002621645402E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645402E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822614E-015 -0.70710678118654891 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654891 -2.4688501310822614E-015 + 0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -4.9377002621645228E-015 -0.70710678118654891 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.4688501310822701E-015 -0.70710678118654635 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 -2.4688501310822701E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654891 -4.9377002621645228E-015 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.9377002621645228E-015 0.70710678118654891 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.4688501310822701E-015 -0.70710678118654635 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654635 2.4688501310822701E-015 + -0.70710678118655124 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 0.70710678118655135 1.4813100786493514E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 1.4813100786493514E-014 0.70710678118655135 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932468359E-015 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118654391 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118655135 -1.4813100786493514E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4813100786493514E-014 0.70710678118655135 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.4065503932468359E-015 0.70710678118654391 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654391 -7.4065503932468359E-015 + 0.70710678118654380 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654391 1.4813100786493672E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.4813100786493672E-014 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 7.4065503932467570E-015 -0.70710678118655135 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655135 7.4065503932467570E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 0.70710678118654391 1.4813100786493672E-014 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 1.4813100786493672E-014 0.70710678118654391 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932467570E-015 -0.70710678118655135 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118655135 -7.4065503932467570E-015 + -0.70710678118655124 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 0.70710678118655135 1.4813100786493514E-014 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 1.4813100786493514E-014 0.70710678118655135 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932468359E-015 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118654391 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118655135 -1.4813100786493514E-014 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4813100786493514E-014 0.70710678118655135 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -7.4065503932468359E-015 0.70710678118654391 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654391 -7.4065503932468359E-015 + 0.70710678118654380 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.70710678118654391 1.4813100786493672E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.4813100786493672E-014 -0.70710678118654391 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 7.4065503932467570E-015 -0.70710678118655135 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655135 7.4065503932467570E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 0.70710678118654391 1.4813100786493672E-014 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 1.4813100786493672E-014 0.70710678118654391 -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -7.4065503932467570E-015 -0.70710678118655135 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.0000000000000000 -0.70710678118655135 -7.4065503932467570E-015 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000002 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -3.4914813388431334E-015 -1.4744151969902386E-043 -0.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.4744151969902390E-043 -3.4914813388431349E-015 -1.3965925355372538E-014 2.4380883878979687E-029 -9.7523535515918749E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -5.8976607879609558E-043 -1.3965925355372538E-014 -3.4914813388431349E-015 9.7523535515918749E-029 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -4.2228929611829786E-029 2.4380883878979687E-029 4.8761767757959375E-029 3.4914813388431349E-015 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.4457859223659572E-029 -4.8761767757959375E-029 -2.4380883878979687E-029 -6.9829626776862691E-015 3.4914813388431349E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 -1.4744151969902386E-043 0.0000000000000000 -4.2228929611829775E-029 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4744151969902390E-043 -3.4914813388431349E-015 1.3965925355372538E-014 2.4380883878979687E-029 9.7523535515918749E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 5.8976607879609558E-043 1.3965925355372538E-014 -3.4914813388431349E-015 -9.7523535515918749E-029 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 2.4380883878979687E-029 -4.8761767757959375E-029 3.4914813388431349E-015 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.4457859223659572E-029 4.8761767757959375E-029 -2.4380883878979687E-029 6.9829626776862691E-015 3.4914813388431349E-015 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 -4.8761767757959375E-029 -6.9829626776862691E-015 -3.4050160435183584E-043 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0591572583992568E-057 -4.8761767757959375E-029 1.0000000000000004 3.4050160435183584E-043 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.2094846145109831E-014 -6.9829626776862691E-015 1.7025080217591792E-043 -1.0000000000000004 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9488303939804779E-043 -1.7025080217591792E-043 6.9829626776862691E-015 -2.4380883878979687E-029 -1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 -1.2094846145109828E-014 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 -1.0000000000000004 -4.8761767757959375E-029 6.9829626776862691E-015 -3.4050160435183584E-043 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0591572583992568E-057 -4.8761767757959375E-029 -1.0000000000000004 3.4050160435183584E-043 -6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 1.7025080217591792E-043 1.0000000000000004 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9488303939804779E-043 -1.7025080217591792E-043 -6.9829626776862691E-015 -2.4380883878979687E-029 1.0000000000000004 + -3.4914813388431334E-015 -1.4744151969902386E-043 -0.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.4744151969902390E-043 -3.4914813388431349E-015 -1.3965925355372538E-014 2.4380883878979687E-029 -9.7523535515918749E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -5.8976607879609558E-043 -1.3965925355372538E-014 -3.4914813388431349E-015 9.7523535515918749E-029 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -4.2228929611829786E-029 2.4380883878979687E-029 4.8761767757959375E-029 3.4914813388431349E-015 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.4457859223659572E-029 -4.8761767757959375E-029 -2.4380883878979687E-029 -6.9829626776862691E-015 3.4914813388431349E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 -1.4744151969902386E-043 0.0000000000000000 -4.2228929611829775E-029 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4744151969902390E-043 -3.4914813388431349E-015 1.3965925355372538E-014 2.4380883878979687E-029 9.7523535515918749E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 5.8976607879609558E-043 1.3965925355372538E-014 -3.4914813388431349E-015 -9.7523535515918749E-029 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 2.4380883878979687E-029 -4.8761767757959375E-029 3.4914813388431349E-015 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.4457859223659572E-029 4.8761767757959375E-029 -2.4380883878979687E-029 6.9829626776862691E-015 3.4914813388431349E-015 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 -4.8761767757959375E-029 -6.9829626776862691E-015 -3.4050160435183584E-043 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0591572583992568E-057 -4.8761767757959375E-029 1.0000000000000004 3.4050160435183584E-043 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.2094846145109831E-014 -6.9829626776862691E-015 1.7025080217591792E-043 -1.0000000000000004 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9488303939804779E-043 -1.7025080217591792E-043 6.9829626776862691E-015 -2.4380883878979687E-029 -1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 -1.2094846145109828E-014 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 -1.0000000000000004 -4.8761767757959375E-029 6.9829626776862691E-015 -3.4050160435183584E-043 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0591572583992568E-057 -4.8761767757959375E-029 -1.0000000000000004 3.4050160435183584E-043 -6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 1.7025080217591792E-043 1.0000000000000004 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9488303939804779E-043 -1.7025080217591792E-043 -6.9829626776862691E-015 -2.4380883878979687E-029 1.0000000000000004 + 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774187E-029 -0.70710678118654657 4.9377002621645417E-015 4.9377002621645236E-015 3.4479776644296691E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.0851379681525983E-043 4.9377002621645417E-015 -0.70710678118654657 -3.4479776644296691E-029 -4.9377002621645236E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774187E-029 -1.7239888322148284E-029 -4.9377002621645417E-015 -2.4688501310822618E-015 0.70710678118654913 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.5523477266151499E-015 4.9377002621645417E-015 1.7239888322148284E-029 0.70710678118654913 -2.4688501310822618E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774187E-029 -0.70710678118654657 -4.9377002621645417E-015 4.9377002621645236E-015 -3.4479776644296691E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525983E-043 -4.9377002621645417E-015 -0.70710678118654657 3.4479776644296691E-029 -4.9377002621645236E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774187E-029 -1.7239888322148284E-029 4.9377002621645417E-015 -2.4688501310822618E-015 -0.70710678118654913 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151499E-015 -4.9377002621645417E-015 1.7239888322148284E-029 -0.70710678118654913 -2.4688501310822618E-015 + 0.70710678118654879 2.9860362490774288E-029 0.0000000000000000 8.5523477266151484E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774294E-029 -0.70710678118654913 -4.9377002621645236E-015 4.9377002621645417E-015 -3.4479776644296568E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0851379681525908E-043 -4.9377002621645236E-015 -0.70710678118654913 3.4479776644296568E-029 -4.9377002621645417E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774294E-029 -1.7239888322148345E-029 4.9377002621645236E-015 -2.4688501310822709E-015 -0.70710678118654657 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151200E-015 -4.9377002621645236E-015 1.7239888322148345E-029 -0.70710678118654657 -2.4688501310822709E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 -2.9860362490774288E-029 0.0000000000000000 -8.5523477266151484E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774294E-029 0.70710678118654913 -4.9377002621645236E-015 -4.9377002621645417E-015 -3.4479776644296568E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525908E-043 -4.9377002621645236E-015 0.70710678118654913 3.4479776644296568E-029 4.9377002621645417E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774294E-029 1.7239888322148345E-029 4.9377002621645236E-015 2.4688501310822709E-015 -0.70710678118654657 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151200E-015 -4.9377002621645236E-015 -1.7239888322148345E-029 -0.70710678118654657 2.4688501310822709E-015 + 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774187E-029 -0.70710678118654657 4.9377002621645417E-015 4.9377002621645236E-015 3.4479776644296691E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.0851379681525983E-043 4.9377002621645417E-015 -0.70710678118654657 -3.4479776644296691E-029 -4.9377002621645236E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774187E-029 -1.7239888322148284E-029 -4.9377002621645417E-015 -2.4688501310822618E-015 0.70710678118654913 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.5523477266151499E-015 4.9377002621645417E-015 1.7239888322148284E-029 0.70710678118654913 -2.4688501310822618E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774187E-029 -0.70710678118654657 -4.9377002621645417E-015 4.9377002621645236E-015 -3.4479776644296691E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525983E-043 -4.9377002621645417E-015 -0.70710678118654657 3.4479776644296691E-029 -4.9377002621645236E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774187E-029 -1.7239888322148284E-029 4.9377002621645417E-015 -2.4688501310822618E-015 -0.70710678118654913 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151499E-015 -4.9377002621645417E-015 1.7239888322148284E-029 -0.70710678118654913 -2.4688501310822618E-015 + 0.70710678118654879 2.9860362490774288E-029 0.0000000000000000 8.5523477266151484E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774294E-029 -0.70710678118654913 -4.9377002621645236E-015 4.9377002621645417E-015 -3.4479776644296568E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0851379681525908E-043 -4.9377002621645236E-015 -0.70710678118654913 3.4479776644296568E-029 -4.9377002621645417E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774294E-029 -1.7239888322148345E-029 4.9377002621645236E-015 -2.4688501310822709E-015 -0.70710678118654657 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151200E-015 -4.9377002621645236E-015 1.7239888322148345E-029 -0.70710678118654657 -2.4688501310822709E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 -2.9860362490774288E-029 0.0000000000000000 -8.5523477266151484E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774294E-029 0.70710678118654913 -4.9377002621645236E-015 -4.9377002621645417E-015 -3.4479776644296568E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525908E-043 -4.9377002621645236E-015 0.70710678118654913 3.4479776644296568E-029 4.9377002621645417E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774294E-029 1.7239888322148345E-029 4.9377002621645236E-015 2.4688501310822709E-015 -0.70710678118654657 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151200E-015 -4.9377002621645236E-015 -1.7239888322148345E-029 -0.70710678118654657 2.4688501310822709E-015 + -0.70710678118655124 -2.9860362490774389E-029 -0.0000000000000000 -8.5523477266151783E-015 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774400E-029 0.70710678118655157 1.4813100786493517E-014 -4.9377002621645583E-015 1.0343932993288934E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044577500E-043 1.4813100786493517E-014 0.70710678118655157 -1.0343932993288934E-028 4.9377002621645583E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.9581087472323184E-029 -5.1719664966445210E-029 4.9377002621645070E-015 -7.4065503932468359E-015 -0.70710678118654413 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266150900E-015 -4.9377002621645070E-015 5.1719664966445210E-029 -0.70710678118654413 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 -2.9860362490774389E-029 0.0000000000000000 -8.5523477266151783E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774400E-029 0.70710678118655157 -1.4813100786493517E-014 -4.9377002621645583E-015 -1.0343932993288934E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.2554139044577500E-043 -1.4813100786493517E-014 0.70710678118655157 1.0343932993288934E-028 4.9377002621645583E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472323184E-029 -5.1719664966445210E-029 -4.9377002621645070E-015 -7.4065503932468359E-015 0.70710678118654413 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.5523477266150900E-015 4.9377002621645070E-015 5.1719664966445210E-029 0.70710678118654413 -7.4065503932468359E-015 + 0.70710678118654380 2.9860362490774075E-029 0.0000000000000000 8.5523477266150884E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774086E-029 -0.70710678118654413 1.4813100786493672E-014 4.9377002621645070E-015 1.0343932993289042E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044578161E-043 1.4813100786493672E-014 -0.70710678118654413 -1.0343932993289042E-028 -4.9377002621645070E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.9581087472322242E-029 5.1719664966444672E-029 4.9377002621645583E-015 7.4065503932467586E-015 -0.70710678118655157 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151799E-015 -4.9377002621645583E-015 -5.1719664966444672E-029 -0.70710678118655157 7.4065503932467586E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -2.9860362490774075E-029 -0.0000000000000000 -8.5523477266150884E-015 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774086E-029 0.70710678118654413 1.4813100786493672E-014 -4.9377002621645070E-015 1.0343932993289042E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.2554139044578161E-043 1.4813100786493672E-014 0.70710678118654413 -1.0343932993289042E-028 4.9377002621645070E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472322242E-029 -5.1719664966444672E-029 4.9377002621645583E-015 -7.4065503932467586E-015 -0.70710678118655157 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151799E-015 -4.9377002621645583E-015 5.1719664966444672E-029 -0.70710678118655157 -7.4065503932467586E-015 + -0.70710678118655124 -2.9860362490774389E-029 -0.0000000000000000 -8.5523477266151783E-015 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774400E-029 0.70710678118655157 1.4813100786493517E-014 -4.9377002621645583E-015 1.0343932993288934E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044577500E-043 1.4813100786493517E-014 0.70710678118655157 -1.0343932993288934E-028 4.9377002621645583E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.9581087472323184E-029 -5.1719664966445210E-029 4.9377002621645070E-015 -7.4065503932468359E-015 -0.70710678118654413 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266150900E-015 -4.9377002621645070E-015 5.1719664966445210E-029 -0.70710678118654413 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 -2.9860362490774389E-029 0.0000000000000000 -8.5523477266151783E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774400E-029 0.70710678118655157 -1.4813100786493517E-014 -4.9377002621645583E-015 -1.0343932993288934E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.2554139044577500E-043 -1.4813100786493517E-014 0.70710678118655157 1.0343932993288934E-028 4.9377002621645583E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472323184E-029 -5.1719664966445210E-029 -4.9377002621645070E-015 -7.4065503932468359E-015 0.70710678118654413 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.5523477266150900E-015 4.9377002621645070E-015 5.1719664966445210E-029 0.70710678118654413 -7.4065503932468359E-015 + 0.70710678118654380 2.9860362490774075E-029 0.0000000000000000 8.5523477266150884E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774086E-029 -0.70710678118654413 1.4813100786493672E-014 4.9377002621645070E-015 1.0343932993289042E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044578161E-043 1.4813100786493672E-014 -0.70710678118654413 -1.0343932993289042E-028 -4.9377002621645070E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.9581087472322242E-029 5.1719664966444672E-029 4.9377002621645583E-015 7.4065503932467586E-015 -0.70710678118655157 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151799E-015 -4.9377002621645583E-015 -5.1719664966444672E-029 -0.70710678118655157 7.4065503932467586E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -2.9860362490774075E-029 -0.0000000000000000 -8.5523477266150884E-015 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774086E-029 0.70710678118654413 1.4813100786493672E-014 -4.9377002621645070E-015 1.0343932993289042E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.2554139044578161E-043 1.4813100786493672E-014 0.70710678118654413 -1.0343932993289042E-028 4.9377002621645070E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472322242E-029 -5.1719664966444672E-029 4.9377002621645583E-015 -7.4065503932467586E-015 -0.70710678118655157 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151799E-015 -4.9377002621645583E-015 5.1719664966444672E-029 -0.70710678118655157 -7.4065503932467586E-015 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.2228929611829786E-029 1.0000000000000004 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000004 0.0000000000000000 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.9829626776862691E-015 0.0000000000000000 1.0000000000000004 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -0.70710678118655124 -2.9860362490774389E-029 -0.0000000000000000 -8.5523477266151783E-015 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774400E-029 0.70710678118655157 1.4813100786493517E-014 -4.9377002621645583E-015 1.0343932993288934E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044577500E-043 1.4813100786493517E-014 0.70710678118655157 -1.0343932993288934E-028 4.9377002621645583E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.9581087472323184E-029 -5.1719664966445210E-029 4.9377002621645070E-015 -7.4065503932468359E-015 -0.70710678118654413 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266150900E-015 -4.9377002621645070E-015 5.1719664966445210E-029 -0.70710678118654413 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 -2.9860362490774389E-029 0.0000000000000000 -8.5523477266151783E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774400E-029 0.70710678118655157 -1.4813100786493517E-014 -4.9377002621645583E-015 -1.0343932993288934E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.2554139044577500E-043 -1.4813100786493517E-014 0.70710678118655157 1.0343932993288934E-028 4.9377002621645583E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472323184E-029 -5.1719664966445210E-029 -4.9377002621645070E-015 -7.4065503932468359E-015 0.70710678118654413 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.5523477266150900E-015 4.9377002621645070E-015 5.1719664966445210E-029 0.70710678118654413 -7.4065503932468359E-015 + 0.70710678118654380 2.9860362490774075E-029 0.0000000000000000 8.5523477266150884E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774086E-029 -0.70710678118654413 1.4813100786493672E-014 4.9377002621645070E-015 1.0343932993289042E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044578161E-043 1.4813100786493672E-014 -0.70710678118654413 -1.0343932993289042E-028 -4.9377002621645070E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.9581087472322242E-029 5.1719664966444672E-029 4.9377002621645583E-015 7.4065503932467586E-015 -0.70710678118655157 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151799E-015 -4.9377002621645583E-015 -5.1719664966444672E-029 -0.70710678118655157 7.4065503932467586E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -2.9860362490774075E-029 -0.0000000000000000 -8.5523477266150884E-015 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774086E-029 0.70710678118654413 1.4813100786493672E-014 -4.9377002621645070E-015 1.0343932993289042E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.2554139044578161E-043 1.4813100786493672E-014 0.70710678118654413 -1.0343932993289042E-028 4.9377002621645070E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472322242E-029 -5.1719664966444672E-029 4.9377002621645583E-015 -7.4065503932467586E-015 -0.70710678118655157 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151799E-015 -4.9377002621645583E-015 5.1719664966444672E-029 -0.70710678118655157 -7.4065503932467586E-015 + -0.70710678118655124 -2.9860362490774389E-029 -0.0000000000000000 -8.5523477266151783E-015 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774400E-029 0.70710678118655157 1.4813100786493517E-014 -4.9377002621645583E-015 1.0343932993288934E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044577500E-043 1.4813100786493517E-014 0.70710678118655157 -1.0343932993288934E-028 4.9377002621645583E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.9581087472323184E-029 -5.1719664966445210E-029 4.9377002621645070E-015 -7.4065503932468359E-015 -0.70710678118654413 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266150900E-015 -4.9377002621645070E-015 5.1719664966445210E-029 -0.70710678118654413 -7.4065503932468359E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118655124 -2.9860362490774389E-029 0.0000000000000000 -8.5523477266151783E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774400E-029 0.70710678118655157 -1.4813100786493517E-014 -4.9377002621645583E-015 -1.0343932993288934E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -6.2554139044577500E-043 -1.4813100786493517E-014 0.70710678118655157 1.0343932993288934E-028 4.9377002621645583E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472323184E-029 -5.1719664966445210E-029 -4.9377002621645070E-015 -7.4065503932468359E-015 0.70710678118654413 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.5523477266150900E-015 4.9377002621645070E-015 5.1719664966445210E-029 0.70710678118654413 -7.4065503932468359E-015 + 0.70710678118654380 2.9860362490774075E-029 0.0000000000000000 8.5523477266150884E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774086E-029 -0.70710678118654413 1.4813100786493672E-014 4.9377002621645070E-015 1.0343932993289042E-028 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 6.2554139044578161E-043 1.4813100786493672E-014 -0.70710678118654413 -1.0343932993289042E-028 -4.9377002621645070E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.9581087472322242E-029 5.1719664966444672E-029 4.9377002621645583E-015 7.4065503932467586E-015 -0.70710678118655157 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151799E-015 -4.9377002621645583E-015 -5.1719664966444672E-029 -0.70710678118655157 7.4065503932467586E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654380 -2.9860362490774075E-029 -0.0000000000000000 -8.5523477266150884E-015 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774086E-029 0.70710678118654413 1.4813100786493672E-014 -4.9377002621645070E-015 1.0343932993289042E-028 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 6.2554139044578161E-043 1.4813100786493672E-014 0.70710678118654413 -1.0343932993289042E-028 4.9377002621645070E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.9581087472322242E-029 -5.1719664966444672E-029 4.9377002621645583E-015 -7.4065503932467586E-015 -0.70710678118655157 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151799E-015 -4.9377002621645583E-015 5.1719664966444672E-029 -0.70710678118655157 -7.4065503932467586E-015 + 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774187E-029 -0.70710678118654657 4.9377002621645417E-015 4.9377002621645236E-015 3.4479776644296691E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.0851379681525983E-043 4.9377002621645417E-015 -0.70710678118654657 -3.4479776644296691E-029 -4.9377002621645236E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774187E-029 -1.7239888322148284E-029 -4.9377002621645417E-015 -2.4688501310822618E-015 0.70710678118654913 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.5523477266151499E-015 4.9377002621645417E-015 1.7239888322148284E-029 0.70710678118654913 -2.4688501310822618E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774187E-029 -0.70710678118654657 -4.9377002621645417E-015 4.9377002621645236E-015 -3.4479776644296691E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525983E-043 -4.9377002621645417E-015 -0.70710678118654657 3.4479776644296691E-029 -4.9377002621645236E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774187E-029 -1.7239888322148284E-029 4.9377002621645417E-015 -2.4688501310822618E-015 -0.70710678118654913 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151499E-015 -4.9377002621645417E-015 1.7239888322148284E-029 -0.70710678118654913 -2.4688501310822618E-015 + 0.70710678118654879 2.9860362490774288E-029 0.0000000000000000 8.5523477266151484E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774294E-029 -0.70710678118654913 -4.9377002621645236E-015 4.9377002621645417E-015 -3.4479776644296568E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0851379681525908E-043 -4.9377002621645236E-015 -0.70710678118654913 3.4479776644296568E-029 -4.9377002621645417E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774294E-029 -1.7239888322148345E-029 4.9377002621645236E-015 -2.4688501310822709E-015 -0.70710678118654657 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151200E-015 -4.9377002621645236E-015 1.7239888322148345E-029 -0.70710678118654657 -2.4688501310822709E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 -2.9860362490774288E-029 0.0000000000000000 -8.5523477266151484E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774294E-029 0.70710678118654913 -4.9377002621645236E-015 -4.9377002621645417E-015 -3.4479776644296568E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525908E-043 -4.9377002621645236E-015 0.70710678118654913 3.4479776644296568E-029 4.9377002621645417E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774294E-029 1.7239888322148345E-029 4.9377002621645236E-015 2.4688501310822709E-015 -0.70710678118654657 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151200E-015 -4.9377002621645236E-015 -1.7239888322148345E-029 -0.70710678118654657 2.4688501310822709E-015 + 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774187E-029 -0.70710678118654657 4.9377002621645417E-015 4.9377002621645236E-015 3.4479776644296691E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.0851379681525983E-043 4.9377002621645417E-015 -0.70710678118654657 -3.4479776644296691E-029 -4.9377002621645236E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774187E-029 -1.7239888322148284E-029 -4.9377002621645417E-015 -2.4688501310822618E-015 0.70710678118654913 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -8.5523477266151499E-015 4.9377002621645417E-015 1.7239888322148284E-029 0.70710678118654913 -2.4688501310822618E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.70710678118654624 2.9860362490774182E-029 0.0000000000000000 8.5523477266151168E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774187E-029 -0.70710678118654657 -4.9377002621645417E-015 4.9377002621645236E-015 -3.4479776644296691E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525983E-043 -4.9377002621645417E-015 -0.70710678118654657 3.4479776644296691E-029 -4.9377002621645236E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774187E-029 -1.7239888322148284E-029 4.9377002621645417E-015 -2.4688501310822618E-015 -0.70710678118654913 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151499E-015 -4.9377002621645417E-015 1.7239888322148284E-029 -0.70710678118654913 -2.4688501310822618E-015 + 0.70710678118654879 2.9860362490774288E-029 0.0000000000000000 8.5523477266151484E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.9860362490774294E-029 -0.70710678118654913 -4.9377002621645236E-015 4.9377002621645417E-015 -3.4479776644296568E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0851379681525908E-043 -4.9377002621645236E-015 -0.70710678118654913 3.4479776644296568E-029 -4.9377002621645417E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9860362490774294E-029 -1.7239888322148345E-029 4.9377002621645236E-015 -2.4688501310822709E-015 -0.70710678118654657 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.5523477266151200E-015 -4.9377002621645236E-015 1.7239888322148345E-029 -0.70710678118654657 -2.4688501310822709E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -0.70710678118654879 -2.9860362490774288E-029 0.0000000000000000 -8.5523477266151484E-015 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9860362490774294E-029 0.70710678118654913 -4.9377002621645236E-015 -4.9377002621645417E-015 -3.4479776644296568E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0851379681525908E-043 -4.9377002621645236E-015 0.70710678118654913 3.4479776644296568E-029 4.9377002621645417E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.9860362490774294E-029 1.7239888322148345E-029 4.9377002621645236E-015 2.4688501310822709E-015 -0.70710678118654657 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.5523477266151200E-015 -4.9377002621645236E-015 -1.7239888322148345E-029 -0.70710678118654657 2.4688501310822709E-015 + -3.4914813388431334E-015 -1.4744151969902386E-043 -0.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.4744151969902390E-043 -3.4914813388431349E-015 -1.3965925355372538E-014 2.4380883878979687E-029 -9.7523535515918749E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -5.8976607879609558E-043 -1.3965925355372538E-014 -3.4914813388431349E-015 9.7523535515918749E-029 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -4.2228929611829786E-029 2.4380883878979687E-029 4.8761767757959375E-029 3.4914813388431349E-015 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.4457859223659572E-029 -4.8761767757959375E-029 -2.4380883878979687E-029 -6.9829626776862691E-015 3.4914813388431349E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 -1.4744151969902386E-043 0.0000000000000000 -4.2228929611829775E-029 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4744151969902390E-043 -3.4914813388431349E-015 1.3965925355372538E-014 2.4380883878979687E-029 9.7523535515918749E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 5.8976607879609558E-043 1.3965925355372538E-014 -3.4914813388431349E-015 -9.7523535515918749E-029 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 2.4380883878979687E-029 -4.8761767757959375E-029 3.4914813388431349E-015 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.4457859223659572E-029 4.8761767757959375E-029 -2.4380883878979687E-029 6.9829626776862691E-015 3.4914813388431349E-015 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 -4.8761767757959375E-029 -6.9829626776862691E-015 -3.4050160435183584E-043 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0591572583992568E-057 -4.8761767757959375E-029 1.0000000000000004 3.4050160435183584E-043 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.2094846145109831E-014 -6.9829626776862691E-015 1.7025080217591792E-043 -1.0000000000000004 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9488303939804779E-043 -1.7025080217591792E-043 6.9829626776862691E-015 -2.4380883878979687E-029 -1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 -1.2094846145109828E-014 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 -1.0000000000000004 -4.8761767757959375E-029 6.9829626776862691E-015 -3.4050160435183584E-043 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0591572583992568E-057 -4.8761767757959375E-029 -1.0000000000000004 3.4050160435183584E-043 -6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 1.7025080217591792E-043 1.0000000000000004 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9488303939804779E-043 -1.7025080217591792E-043 -6.9829626776862691E-015 -2.4380883878979687E-029 1.0000000000000004 + -3.4914813388431334E-015 -1.4744151969902386E-043 -0.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -1.4744151969902390E-043 -3.4914813388431349E-015 -1.3965925355372538E-014 2.4380883878979687E-029 -9.7523535515918749E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -5.8976607879609558E-043 -1.3965925355372538E-014 -3.4914813388431349E-015 9.7523535515918749E-029 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -4.2228929611829786E-029 2.4380883878979687E-029 4.8761767757959375E-029 3.4914813388431349E-015 -6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 8.4457859223659572E-029 -4.8761767757959375E-029 -2.4380883878979687E-029 -6.9829626776862691E-015 3.4914813388431349E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -3.4914813388431334E-015 -1.4744151969902386E-043 0.0000000000000000 -4.2228929611829775E-029 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.4744151969902390E-043 -3.4914813388431349E-015 1.3965925355372538E-014 2.4380883878979687E-029 9.7523535515918749E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 5.8976607879609558E-043 1.3965925355372538E-014 -3.4914813388431349E-015 -9.7523535515918749E-029 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 2.4380883878979687E-029 -4.8761767757959375E-029 3.4914813388431349E-015 6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -8.4457859223659572E-029 4.8761767757959375E-029 -2.4380883878979687E-029 6.9829626776862691E-015 3.4914813388431349E-015 + 1.0000000000000000 4.2228929611829775E-029 0.0000000000000000 1.2094846145109828E-014 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 4.2228929611829786E-029 1.0000000000000004 -4.8761767757959375E-029 -6.9829626776862691E-015 -3.4050160435183584E-043 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + -2.0591572583992568E-057 -4.8761767757959375E-029 1.0000000000000004 3.4050160435183584E-043 6.9829626776862691E-015 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 1.2094846145109831E-014 -6.9829626776862691E-015 1.7025080217591792E-043 -1.0000000000000004 -2.4380883878979687E-029 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 2.9488303939804779E-043 -1.7025080217591792E-043 6.9829626776862691E-015 -2.4380883878979687E-029 -1.0000000000000004 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.0000000000000000 -4.2228929611829775E-029 -0.0000000000000000 -1.2094846145109828E-014 -0.0000000000000000 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -4.2228929611829786E-029 -1.0000000000000004 -4.8761767757959375E-029 6.9829626776862691E-015 -3.4050160435183584E-043 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -2.0591572583992568E-057 -4.8761767757959375E-029 -1.0000000000000004 3.4050160435183584E-043 -6.9829626776862691E-015 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 -1.2094846145109831E-014 6.9829626776862691E-015 1.7025080217591792E-043 1.0000000000000004 -2.4380883878979687E-029 + 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.9488303939804779E-043 -1.7025080217591792E-043 -6.9829626776862691E-015 -2.4380883878979687E-029 1.0000000000000004 diff --git a/test/python/wien2k/CaOs2_band.almblmdn.gz b/test/python/wien2k/CaOs2_band.almblmdn.gz new file mode 100644 index 0000000..0329e74 Binary files /dev/null and b/test/python/wien2k/CaOs2_band.almblmdn.gz differ diff --git a/test/python/wien2k/CaOs2_band.almblmup.gz b/test/python/wien2k/CaOs2_band.almblmup.gz new file mode 100644 index 0000000..3eccf62 Binary files /dev/null and b/test/python/wien2k/CaOs2_band.almblmup.gz differ diff --git a/test/python/wien2k/CaOs2_band.indmftpr b/test/python/wien2k/CaOs2_band.indmftpr new file mode 100644 index 0000000..6aa6f67 --- /dev/null +++ b/test/python/wien2k/CaOs2_band.indmftpr @@ -0,0 +1,13 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +fromfile +jbasis_d.dat +0 0 2 0 +0 0 0 0 +1 +-2.0 3.0 +0.6529001225 diff --git a/test/python/wien2k/CaOs2_band.klist_band b/test/python/wien2k/CaOs2_band.klist_band new file mode 100644 index 0000000..14790bc --- /dev/null +++ b/test/python/wien2k/CaOs2_band.klist_band @@ -0,0 +1,5 @@ +GAMMA 0 0 0 8 2.0 + 1 0 0 8 2.0 + 2 0 0 8 2.0 +X 4 0 0 8 2.0 +END diff --git a/test/python/wien2k/CaOs2_band.outband.gz b/test/python/wien2k/CaOs2_band.outband.gz new file mode 100644 index 0000000..606fec3 Binary files /dev/null and b/test/python/wien2k/CaOs2_band.outband.gz differ diff --git a/test/python/wien2k/CaOs2_fshell.almblmdn.gz b/test/python/wien2k/CaOs2_fshell.almblmdn.gz new file mode 100644 index 0000000..ff9c44c Binary files /dev/null and b/test/python/wien2k/CaOs2_fshell.almblmdn.gz differ diff --git a/test/python/wien2k/CaOs2_fshell.almblmup.gz b/test/python/wien2k/CaOs2_fshell.almblmup.gz new file mode 100644 index 0000000..0fbf89f Binary files /dev/null and b/test/python/wien2k/CaOs2_fshell.almblmup.gz differ diff --git a/test/python/wien2k/CaOs2_fshell.ctqmcout.gz b/test/python/wien2k/CaOs2_fshell.ctqmcout.gz new file mode 100644 index 0000000..2561edd Binary files /dev/null and b/test/python/wien2k/CaOs2_fshell.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_fshell.indmftpr b/test/python/wien2k/CaOs2_fshell.indmftpr new file mode 100644 index 0000000..9624e85 --- /dev/null +++ b/test/python/wien2k/CaOs2_fshell.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +complex +0 0 0 2 +0 0 0 0 +1 +3.0 10.0 diff --git a/test/python/wien2k/CaOs2_fshell.symqmc.gz b/test/python/wien2k/CaOs2_fshell.symqmc.gz new file mode 100644 index 0000000..541d819 Binary files /dev/null and b/test/python/wien2k/CaOs2_fshell.symqmc.gz differ diff --git a/test/python/wien2k/CaOs2_full.ctqmcout.gz b/test/python/wien2k/CaOs2_full.ctqmcout.gz new file mode 100644 index 0000000..3cca2cc Binary files /dev/null and b/test/python/wien2k/CaOs2_full.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_full.indmftpr b/test/python/wien2k/CaOs2_full.indmftpr new file mode 100644 index 0000000..227d144 --- /dev/null +++ b/test/python/wien2k/CaOs2_full.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +1 +-2.0 3.0 diff --git a/test/python/wien2k/CaOs2_jbasis.indmftpr b/test/python/wien2k/CaOs2_jbasis.indmftpr new file mode 100644 index 0000000..5589430 --- /dev/null +++ b/test/python/wien2k/CaOs2_jbasis.indmftpr @@ -0,0 +1,12 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +fromfile +jbasis_d.dat +0 0 2 0 +0 0 0 0 +1 +-0.15 0.30 diff --git a/test/python/wien2k/CaOs2_jbasis_full.ctqmcout.gz b/test/python/wien2k/CaOs2_jbasis_full.ctqmcout.gz new file mode 100644 index 0000000..c3c7a7c Binary files /dev/null and b/test/python/wien2k/CaOs2_jbasis_full.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_jbasis_full.indmftpr b/test/python/wien2k/CaOs2_jbasis_full.indmftpr new file mode 100644 index 0000000..dab1b92 --- /dev/null +++ b/test/python/wien2k/CaOs2_jbasis_full.indmftpr @@ -0,0 +1,12 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +fromfile +jbasis_d.dat +0 0 2 0 +0 0 0 0 +1 +-2.0 3.0 diff --git a/test/python/wien2k/CaOs2_jbasis_full.parproj.gz b/test/python/wien2k/CaOs2_jbasis_full.parproj.gz new file mode 100644 index 0000000..9a60325 Binary files /dev/null and b/test/python/wien2k/CaOs2_jbasis_full.parproj.gz differ diff --git a/test/python/wien2k/CaOs2_jbasis_full.sympar.gz b/test/python/wien2k/CaOs2_jbasis_full.sympar.gz new file mode 100644 index 0000000..a9abae8 Binary files /dev/null and b/test/python/wien2k/CaOs2_jbasis_full.sympar.gz differ diff --git a/test/python/wien2k/CaOs2_l0.indmftpr b/test/python/wien2k/CaOs2_l0.indmftpr new file mode 100644 index 0000000..15ca9ef --- /dev/null +++ b/test/python/wien2k/CaOs2_l0.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +complex +2 0 0 0 +0 0 0 0 +1 +-0.15 0.30 diff --git a/test/python/wien2k/CaOs2_mode1.indmftpr b/test/python/wien2k/CaOs2_mode1.indmftpr new file mode 100644 index 0000000..1cabe50 --- /dev/null +++ b/test/python/wien2k/CaOs2_mode1.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +1 +-0.15 0.30 1 diff --git a/test/python/wien2k/CaOs2_mode1.oubwindn b/test/python/wien2k/CaOs2_mode1.oubwindn new file mode 100644 index 0000000..778773d --- /dev/null +++ b/test/python/wien2k/CaOs2_mode1.oubwindn @@ -0,0 +1,5 @@ + 1 + 1 + 1 + 60 76 + 1.0000000000000000 diff --git a/test/python/wien2k/CaOs2_mode1.oubwinup b/test/python/wien2k/CaOs2_mode1.oubwinup new file mode 100644 index 0000000..778773d --- /dev/null +++ b/test/python/wien2k/CaOs2_mode1.oubwinup @@ -0,0 +1,5 @@ + 1 + 1 + 1 + 60 76 + 1.0000000000000000 diff --git a/test/python/wien2k/CaOs2_mode1_full.ctqmcout.gz b/test/python/wien2k/CaOs2_mode1_full.ctqmcout.gz new file mode 100644 index 0000000..38b1ece Binary files /dev/null and b/test/python/wien2k/CaOs2_mode1_full.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_mode1_full.indmftpr b/test/python/wien2k/CaOs2_mode1_full.indmftpr new file mode 100644 index 0000000..13e6507 --- /dev/null +++ b/test/python/wien2k/CaOs2_mode1_full.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +1 +-2.0 3.0 1 diff --git a/test/python/wien2k/CaOs2_mode2_full.ctqmcout.gz b/test/python/wien2k/CaOs2_mode2_full.ctqmcout.gz new file mode 100644 index 0000000..38b1ece Binary files /dev/null and b/test/python/wien2k/CaOs2_mode2_full.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_mode2_full.indmftpr b/test/python/wien2k/CaOs2_mode2_full.indmftpr new file mode 100644 index 0000000..7732eb7 --- /dev/null +++ b/test/python/wien2k/CaOs2_mode2_full.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +1 +43 92 2 diff --git a/test/python/wien2k/CaOs2_noso.almblmdn.gz b/test/python/wien2k/CaOs2_noso.almblmdn.gz new file mode 100644 index 0000000..10bba32 Binary files /dev/null and b/test/python/wien2k/CaOs2_noso.almblmdn.gz differ diff --git a/test/python/wien2k/CaOs2_noso.almblmup.gz b/test/python/wien2k/CaOs2_noso.almblmup.gz new file mode 100644 index 0000000..8080ae5 Binary files /dev/null and b/test/python/wien2k/CaOs2_noso.almblmup.gz differ diff --git a/test/python/wien2k/CaOs2_noso.ctqmcout.gz b/test/python/wien2k/CaOs2_noso.ctqmcout.gz new file mode 100644 index 0000000..7c8b27d Binary files /dev/null and b/test/python/wien2k/CaOs2_noso.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_noso.indmftpr b/test/python/wien2k/CaOs2_noso.indmftpr new file mode 100644 index 0000000..b54bf2f --- /dev/null +++ b/test/python/wien2k/CaOs2_noso.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +0 +-2.0 3.0 diff --git a/test/python/wien2k/CaOs2_noso.symqmc.gz b/test/python/wien2k/CaOs2_noso.symqmc.gz new file mode 100644 index 0000000..d18da41 Binary files /dev/null and b/test/python/wien2k/CaOs2_noso.symqmc.gz differ diff --git a/test/python/wien2k/CaOs2_noso_partial.indmftpr b/test/python/wien2k/CaOs2_noso_partial.indmftpr new file mode 100644 index 0000000..19b63bb --- /dev/null +++ b/test/python/wien2k/CaOs2_noso_partial.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 1 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +0 +-2.0 3.0 diff --git a/test/python/wien2k/CaOs2_noso_partial.parproj.gz b/test/python/wien2k/CaOs2_noso_partial.parproj.gz new file mode 100644 index 0000000..10156b7 Binary files /dev/null and b/test/python/wien2k/CaOs2_noso_partial.parproj.gz differ diff --git a/test/python/wien2k/CaOs2_noso_partial.sympar.gz b/test/python/wien2k/CaOs2_noso_partial.sympar.gz new file mode 100644 index 0000000..0547daa Binary files /dev/null and b/test/python/wien2k/CaOs2_noso_partial.sympar.gz differ diff --git a/test/python/wien2k/CaOs2_partial.indmftpr b/test/python/wien2k/CaOs2_partial.indmftpr new file mode 100644 index 0000000..afcca02 --- /dev/null +++ b/test/python/wien2k/CaOs2_partial.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 1 0 +0 0 0 0 +cubic +0 0 2 0 +0 0 0 0 +1 +-0.15 0.30 diff --git a/test/python/wien2k/CaOs2_partial.parproj.gz b/test/python/wien2k/CaOs2_partial.parproj.gz new file mode 100644 index 0000000..6507818 Binary files /dev/null and b/test/python/wien2k/CaOs2_partial.parproj.gz differ diff --git a/test/python/wien2k/CaOs2_partial.sympar.gz b/test/python/wien2k/CaOs2_partial.sympar.gz new file mode 100644 index 0000000..e4e2f53 Binary files /dev/null and b/test/python/wien2k/CaOs2_partial.sympar.gz differ diff --git a/test/python/wien2k/CaOs2_pshell.ctqmcout.gz b/test/python/wien2k/CaOs2_pshell.ctqmcout.gz new file mode 100644 index 0000000..5669218 Binary files /dev/null and b/test/python/wien2k/CaOs2_pshell.ctqmcout.gz differ diff --git a/test/python/wien2k/CaOs2_pshell.indmftpr b/test/python/wien2k/CaOs2_pshell.indmftpr new file mode 100644 index 0000000..db81ca3 --- /dev/null +++ b/test/python/wien2k/CaOs2_pshell.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +complex +0 2 0 0 +0 0 0 0 +1 +-2.0 3.0 diff --git a/test/python/wien2k/CaOs2_pshell.symqmc.gz b/test/python/wien2k/CaOs2_pshell.symqmc.gz new file mode 100644 index 0000000..29e2b7e Binary files /dev/null and b/test/python/wien2k/CaOs2_pshell.symqmc.gz differ diff --git a/test/python/wien2k/CaOs2_socfull.indmftpr b/test/python/wien2k/CaOs2_socfull.indmftpr new file mode 100644 index 0000000..ccd5795 --- /dev/null +++ b/test/python/wien2k/CaOs2_socfull.indmftpr @@ -0,0 +1,11 @@ +2 +1 2 +3 +complex +0 0 0 0 +0 0 0 0 +complex +0 0 2 0 +0 0 0 0 +1 +-2.0 3.0 diff --git a/test/python/wien2k/jbasis_d.dat b/test/python/wien2k/jbasis_d.dat new file mode 100644 index 0000000..95c4843 --- /dev/null +++ b/test/python/wien2k/jbasis_d.dat @@ -0,0 +1,10 @@ + -0.89442719 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.44721360 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 -0.77459667 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.63245553 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 0.00000000 -0.63245553 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.77459667 0.00000000 0.00000000 0.00000000 +*0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -0.44721360 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.89442719 0.00000000 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.44721360 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.89442719 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.63245553 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.77459667 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 0.00000000 0.77459667 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.63245553 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.89442719 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.44721360 0.00000000 +*0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 diff --git a/test/python/wien2k/wien2k_ctqmcout_python.py b/test/python/wien2k/wien2k_ctqmcout_python.py new file mode 100644 index 0000000..e870cca --- /dev/null +++ b/test/python/wien2k/wien2k_ctqmcout_python.py @@ -0,0 +1,85 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.ctqmcout generator (triqs_dftkit.wien2k.ctqmcout) +# reproduces the dmftproj Fortran correlated-shell projectors to machine +# precision: regenerate case.ctqmcout from the almblm/struct/dmftsym + a wide +# energy window and compare to the precision-fixed dmftproj reference. +# +# The window (-2.0, 3.0) keeps 50 bands, more than the 20 correlated spin-orbitals +# of the two SOC Os d shells, so the Loewdin overlap O is full rank. (The physical +# narrow-window CaOs2 of the SOC converter test makes O rank-deficient: O^{-1/2} +# then amplifies the last-ULP libm difference between gfortran and numpy, which is +# a numerical property of that degenerate case, not of the port.) Reference built +# with the precision-fixed dmftproj (PR #14) and full-precision templates. +# +# CaOs2_jbasis_full exercises the spin-mixing fromfile (|j, m_j>) path: the Os d +# shell is a 2(2l+1)=10 spinor basis (jbasis_d.dat), so the projector, Rloc +# rotrep and complex-harmonics transform blocks are the full mixing matrices the +# dft_tools #148 path singles out. Same wide window for the full-rank Loewdin. +# +# CaOs2_mode1_full and CaOs2_mode2_full exercise the band-index projection modes +# (set_projections.f:70-88). Mode 1 ("-2.0 3.0 1") scans all spins/k for the +# global band-index window; mode 2 ("43 92 2") takes the indices straight from +# the window line. Both resolve to bands 43..92 (50 bands > 20 correlated +# spin-orbitals), so the Loewdin overlap stays full rank and the projectors +# match the precision-fixed dmftproj to machine precision. + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import ctqmcout + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _compare(got_path, ref_lines): + got = open(got_path).read().split() + ref = ''.join(ref_lines).split() + assert len(got) == len(ref), (len(got), len(ref)) + max_int, max_float = 0, 0.0 + for a, b in zip(got, ref): + if a.lstrip('-').isdigit() and b.lstrip('-').isdigit(): + max_int = max(max_int, abs(int(a) - int(b))) + else: + max_float = max(max_float, abs(float(a) - float(b))) + assert max_int == 0, f'integer field differs (max {max_int})' + assert max_float < 1e-11, f'float field differs (max {max_float:.2e})' + + +def _check(case): + tmp = tempfile.mkdtemp() + try: + shutil.copy(os.path.join(HERE, f'{case}.indmftpr'), + os.path.join(tmp, f'{case}.indmftpr')) + if os.path.exists(os.path.join(HERE, 'jbasis_d.dat')): + shutil.copy(os.path.join(HERE, 'jbasis_d.dat'), + os.path.join(tmp, 'jbasis_d.dat')) + for ext in ('struct', 'dmftsym'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + for ext in ('almblmup', 'almblmdn'): + _gunzip(os.path.join(HERE, f'CaOs2.{ext}.gz'), + os.path.join(tmp, f'{case}.{ext}')) + ctqmcout.write_ctqmcout(os.path.join(tmp, case)) + with gzip.open(os.path.join(HERE, f'{case}.ctqmcout.gz'), 'rt') as fh: + _compare(os.path.join(tmp, f'{case}.ctqmcout'), fh.readlines()) + finally: + shutil.rmtree(tmp) + + +_check('CaOs2_full') +_check('CaOs2_jbasis_full') +_check('CaOs2_mode1_full') # proj_mode 1: band-index window 43..92 +_check('CaOs2_mode2_full') # proj_mode 2: explicit band indices 43 92 + +print('wien2k_ctqmcout_python: ok') diff --git a/test/python/wien2k/wien2k_dmftproj_common_python.py b/test/python/wien2k/wien2k_dmftproj_common_python.py new file mode 100644 index 0000000..3e46cab --- /dev/null +++ b/test/python/wien2k/wien2k_dmftproj_common_python.py @@ -0,0 +1,112 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Unit tests for the shared dmftproj machinery (triqs_dftkit.wien2k._dmftproj), +# the module the five case.* generators are built on. The generators' golden +# tests cover the assembled output; these exercise the isolated primitives +# directly so a regression in a shared unit is caught at its source. + +import os +import tempfile + +import numpy as np + +from triqs_dftkit.wien2k import _dmftproj as dp + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +# --- list-directed numeric parsing ------------------------------------------- + +assert dp.to_float('1.0D-3') == 1.0e-3 +assert dp.to_float('4.57E-002') == 4.57e-2 +assert dp.to_float('-2.5d0') == -2.5 + +assert dp.to_complex('(1.0,-2.0)') == complex(1.0, -2.0) + + +def _reader(text): + fh = tempfile.NamedTemporaryFile('w', suffix='.tmp', delete=False) + fh.write(text) + fh.close() + return dp.Reader(fh.name) + + +r = _reader('(1.0,2.0)\n(3.0,-4.0) (5.0,6.0)\n') +assert dp.read_complex(r) == complex(1.0, 2.0) +a, b = dp.read_two_complex(r) +assert a == complex(3.0, -4.0) and b == complex(5.0, 6.0) + + +# --- angular basis: cubic transform, with and without the float32 cast ------- + +exact = dp.reptrans('cubic', 2, cast=False) +cast = dp.reptrans('cubic', 2, cast=True) +assert exact.shape == (5, 5) +# unitary +assert np.max(np.abs(exact @ np.conj(exact.T) - np.eye(5))) < 1e-12 +# the cast truncates 1/sqrt2 to single precision (the dmftproj #148 noise) +assert abs(abs(exact[1, 0]) - 2 ** -0.5) < 1e-15 +assert 0 < abs(abs(cast[1, 0]) - 2 ** -0.5) < 1e-6 +assert dp.reptrans('complex', 2).shape == (5, 5) +assert np.allclose(dp.reptrans('complex', 2), np.eye(5)) + + +# --- Wigner D and orbital time reversal -------------------------------------- + +for l in (1, 2): + D0 = dp.dmat(l, 0.0, 0.0, 0.0, 1.0) + assert np.max(np.abs(D0 - np.eye(2 * l + 1))) < 1e-12 # zero rotation + D = dp.dmat(l, 0.3, 0.7, 1.1, 1.0) + assert np.max(np.abs(D @ np.conj(D.T) - np.eye(2 * l + 1))) < 1e-12 # unitary + T = dp.tmat(l) + for m in range(-l, l + 1): + assert T[-m + l, m + l] == (-1) ** m + + +# --- select_window: contiguous band range in (e1, e2] ------------------------ + +eband = np.array([-1.0, -0.1, 0.05, 0.2, 0.5]) # bands 10..14, window (-0.15, 0.30] +incl, lo, hi = dp.select_window(10, 14, eband, -0.15, 0.30) +assert incl and lo == 11 and hi == 13 + + +# --- band-index window (proj_mode 1/2) --------------------------------------- + +# set_projections.f:70-88: every k included, indices clamped to nbmin/nbmax. +incl, lo, hi = dp.select_band_window(1, 92, 60, 76) +assert incl and lo == 60 and hi == 76 +incl, lo, hi = dp.select_band_window(50, 80, 43, 92) # clamp both ends +assert incl and lo == 50 and hi == 80 + +# proj_mode 2 takes b_bot/b_top straight from the (rounded) window line. +m2 = {'proj_mode': 2, 'e_bot': 43.0, 'e_top': 92.0} +assert dp.band_index_window(m2, []) == (43, 92) + +# proj_mode 1 scans the (e_bot, e_top] energies for the global band-index range. +m1 = {'proj_mode': 1, 'e_bot': -0.15, 'e_top': 0.30} +spins = [{'kp': [{'nbmin': 1, 'nbmax': 5, + 'eband': np.array([-1.0, -0.1, 0.05, 0.2, 0.5])}]}] +assert dp.band_index_window(m1, spins) == (2, 4) + + +# --- case.indmftpr / case.dmftsym structured parse --------------------------- + +info = dp.read_indmftpr(os.path.join(HERE, 'CaOs2.indmftpr')) +assert info['nsort'] == 2 and info['mult'] == [1, 2] and info['lmax'] == 3 +assert info['so'] == 1 +assert info['sorts'][1]['correlated_ls'] == [2] # Os d correlated +assert info['sorts'][0]['correlated_ls'] == [] # Ca nothing + +part = dp.read_indmftpr(os.path.join(HERE, 'CaOs2_partial.indmftpr')) +assert part['sorts'][0]['included_ls'] == [2] # Ca d now an included shell +assert part['sorts'][0]['correlated_ls'] == [] +assert part['sorts'][1]['correlated_ls'] == [2] + +nsym, ops = dp.read_dmftsym(os.path.join(HERE, 'CaOs2.dmftsym')) +assert nsym == 16 and len(ops) == 16 +assert all(o['krotm'].shape == (3, 3) and len(o['perm']) == 3 for o in ops) + +print('wien2k_dmftproj_common: ok') diff --git a/test/python/wien2k/wien2k_noso_convert.py b/test/python/wien2k/wien2k_noso_convert.py new file mode 100644 index 0000000..18c1d30 --- /dev/null +++ b/test/python/wien2k/wien2k_noso_convert.py @@ -0,0 +1,52 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# End-to-end non-spin-orbit converter test. The Python dmftproj driver writes +# every case.* file, the Wien2k converter ingests them, and the HDF5 is compared +# at machine precision (1e-12) against the reference built from the Fortran +# dmftproj output. Beyond the SO converter test, this exercises convert_dft_input +# on the non-SO path (SP=1, SO=0: the .oubwinup/.oubwindn band windows) and +# convert_parproj_input (case.parproj + case.sympar) end to end. +# +# CaOs2_noso_partial is the spin-polarized non-SO CaOs2 with an uncorrelated Ca +# d shell added to the correlated Os d shells; the wide window (-2..3) keeps the +# Loewdin overlap full rank. The reference is precision-fixed dmftproj run +# without -so, so the agreement is double precision, not the 1e-6 SO floor. + +import gzip +import os +import shutil +import tempfile + +from triqs.utility.h5diff import h5diff +import triqs.utility.mpi as mpi +from triqs_dftkit.wien2k import Converter +from triqs_dftkit.wien2k.dmftproj import run_dmftproj + +HERE = os.path.dirname(os.path.abspath(__file__)) +CASE = 'CaOs2_noso_partial' + +tmp = tempfile.mkdtemp() +shutil.copy(os.path.join(HERE, f'{CASE}.indmftpr'), + os.path.join(tmp, f'{CASE}.indmftpr')) +for ext in ('struct', 'dmftsym', 'outputs'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{CASE}.{ext}')) +for spin in ('up', 'dn'): + with gzip.open(os.path.join(HERE, f'CaOs2_noso.almblm{spin}.gz'), 'rb') as fi, \ + open(os.path.join(tmp, f'{CASE}.almblm{spin}'), 'wb') as fo: + shutil.copyfileobj(fi, fo) + +run_dmftproj(os.path.join(tmp, CASE)) + +conv = Converter(filename=os.path.join(tmp, CASE)) +conv.hdf_file = os.path.join(tmp, 'wien2k_noso_convert.out.h5') +conv.convert_dft_input() +conv.convert_parproj_input() + +if mpi.is_master_node(): + h5diff(os.path.join(tmp, 'wien2k_noso_convert.out.h5'), + os.path.join(HERE, 'wien2k_noso_convert.ref.h5'), precision=1e-12) + print('wien2k_noso_convert: ok') diff --git a/test/python/wien2k/wien2k_noso_convert.ref.h5 b/test/python/wien2k/wien2k_noso_convert.ref.h5 new file mode 100644 index 0000000..ab87770 Binary files /dev/null and b/test/python/wien2k/wien2k_noso_convert.ref.h5 differ diff --git a/test/python/wien2k/wien2k_noso_python.py b/test/python/wien2k/wien2k_noso_python.py new file mode 100644 index 0000000..e340e4b --- /dev/null +++ b/test/python/wien2k/wien2k_noso_python.py @@ -0,0 +1,83 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.* generators on the non-spin-orbit path (ifSO=0), +# the common DMFT case (e.g. SrVO3). dmftproj writes (2l+1) matrices there, not +# the 2*(2l+1) spinor matrices of the SO path: the orthonormalization is +# per-spin (orthogonal_wannier), the symmetry and Rloc matrices are the bare +# (2l+1) representation, the density matrix splits into two independent spin +# blocks, and srot%timeinv is always false (setsym.f sets it only under SP+SO). +# +# CaOs2_noso is the spin-polarized, non-SO CaOs2 (indmftpr SO flag 0, wide +# window -2.0 3.0): two equivalent Os d shells, cubic harmonics. The wide window +# keeps the Loewdin overlap full rank. ctqmcout and symqmc are checked against +# the precision-fixed dmftproj reference for this case. +# +# CaOs2_noso_partial adds an uncorrelated Ca d shell, so sympar and parproj have +# an included-but-not-correlated shell to symmetrize. Same struct/dmftsym/almblm +# as the correlated-only case. References built with the precision-fixed +# dmftproj run without -so. + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import ctqmcout, symqmc, sympar, parproj + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _compare(got_path, ref_lines): + got = open(got_path).read().split() + ref = ''.join(ref_lines).split() + assert len(got) == len(ref), (len(got), len(ref)) + max_int, max_float = 0, 0.0 + for a, b in zip(got, ref): + if a.lstrip('-').isdigit() and b.lstrip('-').isdigit(): + max_int = max(max_int, abs(int(a) - int(b))) + else: + max_float = max(max_float, abs(float(a) - float(b))) + assert max_int == 0, f'integer field differs (max {max_int})' + assert max_float < 1e-11, f'float field differs (max {max_float:.2e})' + + +def _stage(case): + tmp = tempfile.mkdtemp() + shutil.copy(os.path.join(HERE, f'{case}.indmftpr'), + os.path.join(tmp, f'{case}.indmftpr')) + for ext in ('struct', 'dmftsym'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + for ext in ('almblmup', 'almblmdn'): + _gunzip(os.path.join(HERE, f'CaOs2_noso.{ext}.gz'), + os.path.join(tmp, f'{case}.{ext}')) + return tmp + + +def _check_output(case, ext, writer): + tmp = _stage(case) + try: + writer(os.path.join(tmp, case)) + with gzip.open(os.path.join(HERE, f'{case}.{ext}.gz'), 'rt') as fh: + _compare(os.path.join(tmp, f'{case}.{ext}'), fh.readlines()) + finally: + shutil.rmtree(tmp) + + +# Correlated-only: the projector and correlated-shell symmetry files. +_check_output('CaOs2_noso', 'ctqmcout', ctqmcout.write_ctqmcout) +_check_output('CaOs2_noso', 'symqmc', symqmc.write_symqmc) + +# Partial: the included-shell symmetry and partial-projector files. +_check_output('CaOs2_noso_partial', 'sympar', sympar.write_sympar) +_check_output('CaOs2_noso_partial', 'parproj', parproj.write_parproj) + +print('wien2k_noso_python: ok') diff --git a/test/python/wien2k/wien2k_oddl_python.py b/test/python/wien2k/wien2k_oddl_python.py new file mode 100644 index 0000000..116d1d9 --- /dev/null +++ b/test/python/wien2k/wien2k_oddl_python.py @@ -0,0 +1,80 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the generators on the odd-l shells (p, l=1; f, l=3). The d-only fixtures +# (l=2) cannot catch the improper-rotation parity: the Wigner-D parity factor is +# (-1)^l, which is +1 for even l and only flips sign for odd l. case.dmftsym +# stores the proper part of each operation in krotm (det(krotm)=+1 even for +# improper ops) and the true parity in iprop; dmat must use iprop. The p- and +# f-shell symqmc here pin that sign. +# +# Both are the spin-orbit CaOs2 cell (two equivalent Os atoms) with the Os shell +# promoted to a complex p or f shell. The Loewdin overlap must be full rank: +# p (l=1): the standard almblm, wide window -2..3 (6 spin-orbitals/atom). +# f (l=3): Os carries no f weight near E_F, so the projector is rank-deficient +# on the standard bands. CaOs2_fshell.almblm is recomputed with a high band +# cutoff (lapw1/lapwso EMAX raised on the converged density); the window +# 3..10 then sits on high-energy bands with real l=3 character, full rank +# (overlap condition number ~1.3). + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import ctqmcout, symqmc + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _compare(got_path, ref_gz): + got = open(got_path).read().split() + with gzip.open(ref_gz, 'rt') as fh: + ref = fh.read().split() + assert len(got) == len(ref), (len(got), len(ref)) + max_int, max_float = 0, 0.0 + for a, b in zip(got, ref): + if a.lstrip('-').isdigit() and b.lstrip('-').isdigit(): + max_int = max(max_int, abs(int(a) - int(b))) + else: + max_float = max(max_float, abs(float(a) - float(b))) + assert max_int == 0, f'integer field differs (max {max_int})' + assert max_float < 1e-11, f'float field differs (max {max_float:.2e})' + + +def _check(case, almblm_case, exts): + tmp = tempfile.mkdtemp() + try: + shutil.copy(os.path.join(HERE, f'{case}.indmftpr'), + os.path.join(tmp, f'{case}.indmftpr')) + for ext in ('struct', 'dmftsym'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + for spin in ('up', 'dn'): + _gunzip(os.path.join(HERE, f'{almblm_case}.almblm{spin}.gz'), + os.path.join(tmp, f'{case}.almblm{spin}')) + case_path = os.path.join(tmp, case) + for ext, writer in exts: + writer(case_path) + _compare(case_path + '.' + ext, + os.path.join(HERE, f'{case}.{ext}.gz')) + finally: + shutil.rmtree(tmp) + + +# p shell: standard SO almblm, full rank on the wide window. +_check('CaOs2_pshell', 'CaOs2', + [('ctqmcout', ctqmcout.write_ctqmcout), ('symqmc', symqmc.write_symqmc)]) + +# f shell: high-band-cutoff almblm, full rank on the high-energy window. +_check('CaOs2_fshell', 'CaOs2_fshell', + [('ctqmcout', ctqmcout.write_ctqmcout), ('symqmc', symqmc.write_symqmc)]) + +print('wien2k_oddl_python: ok') diff --git a/test/python/wien2k/wien2k_oubwin_python.py b/test/python/wien2k/wien2k_oubwin_python.py new file mode 100644 index 0000000..3665ca3 --- /dev/null +++ b/test/python/wien2k/wien2k_oubwin_python.py @@ -0,0 +1,60 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.oubwin generator (triqs_dftkit.wien2k.oubwin) +# reproduces the dmftproj Fortran output: regenerate case.oubwinup / case.oubwindn +# from case.almblm{up,dn} + case.indmftpr and compare byte for byte to the +# committed dmftproj references (the same files the SOC converter test consumes). +# +# CaOs2 is spin-orbit + spin-polarized. The almblm fixtures are gzipped to keep +# the tree small (they are shared with the ctqmcout test, which needs the full +# projector payload). +# +# CaOs2_mode1 repeats the same physical band selection through the band-index +# projection path (proj_mode 1): the window line "-0.15 0.30 1" is scanned over +# all spins/k for the global min/max band index (bands 60..76), the same range +# the energy window picks, so the reference is identical and the mode-1 code in +# set_projections.f:70-88 is exercised against the dmftproj Fortran output. + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import oubwin + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _check(case, almblm='CaOs2'): + """Regenerate .oubwin{up,dn} from the almblm fixtures and + compare byte for byte. `almblm` selects which gzipped almblm payload to feed + (the band-index fixtures reuse the CaOs2 coefficients with a different + indmftpr window line).""" + tmp = tempfile.mkdtemp() + try: + shutil.copy(os.path.join(HERE, f'{case}.indmftpr'), + os.path.join(tmp, f'{case}.indmftpr')) + for ext in ('almblmup', 'almblmdn'): + _gunzip(os.path.join(HERE, f'{almblm}.{ext}.gz'), + os.path.join(tmp, f'{case}.{ext}')) + oubwin.write_oubwin(os.path.join(tmp, case)) + for ext in ('oubwinup', 'oubwindn'): + got = open(os.path.join(tmp, f'{case}.{ext}')).read() + ref = open(os.path.join(HERE, f'{case}.{ext}')).read() + assert got == ref, f'{case}.{ext} differs from dmftproj reference' + finally: + shutil.rmtree(tmp) + + +_check('CaOs2') +_check('CaOs2_mode1') # proj_mode 1: band-index window 60..76 + +print('wien2k_oubwin_python: ok') diff --git a/test/python/wien2k/wien2k_outband_python.py b/test/python/wien2k/wien2k_outband_python.py new file mode 100644 index 0000000..216e2d2 --- /dev/null +++ b/test/python/wien2k/wien2k_outband_python.py @@ -0,0 +1,88 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.outband generator (triqs_dftkit.wien2k.outband) +# reproduces the dmftproj Fortran band-structure projectors to machine +# precision: regenerate case.outband from the band-mode almblm/struct/dmftsym, +# the k-path (klist_band) and the band indmftpr, and compare to the +# precision-fixed dmftproj -band reference. +# +# case.outband feeds convert_bands_input. It is the band analog of +# case.ctqmcout: the same correlated-shell projector construction (raw Alm/Clm +# projector -> rot_projectmat -> fromfile/cubic transmat -> Loewdin +# orthonormalization) plus the raw Theta projectors of the parproj path, written +# in the outband layout. The CaOs2_band fixture is SP+SO with the spin-mixing +# fromfile (|j, m_j>) Os d shell (jbasis_d.dat); the wide window (-2.0, 3.0) +# keeps 50 bands > 20 correlated spin-orbitals, so the Loewdin overlap is full +# rank and the projectors match to machine precision. +# +# Band-mode specifics (dmftproj.f:557-581): nkband, the number of k-points along +# the plotted path, is read from CaOs2_band.klist_band; the Fermi energy is the +# last line of CaOs2_band.indmftpr (the band almblm keeps a placeholder eferm +# record that the reader skips). + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import outband + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _compare(got_path, ref_lines): + got = open(got_path).read().split() + ref = ''.join(ref_lines).split() + assert len(got) == len(ref), (len(got), len(ref)) + max_int, max_float = 0, 0.0 + for a, b in zip(got, ref): + if a.lstrip('-').isdigit() and b.lstrip('-').isdigit(): + max_int = max(max_int, abs(int(a) - int(b))) + elif _isfloat(a) and _isfloat(b): + max_float = max(max_float, abs(float(a) - float(b))) + else: + assert a == b, (a, b) # k-label tokens + assert max_int == 0, f'integer field differs (max {max_int})' + assert max_float < 1e-11, f'float field differs (max {max_float:.2e})' + + +def _isfloat(tok): + try: + float(tok) + return True + except ValueError: + return False + + +def _check(case): + tmp = tempfile.mkdtemp() + try: + for ext in ('indmftpr', 'klist_band'): + shutil.copy(os.path.join(HERE, f'{case}.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + shutil.copy(os.path.join(HERE, 'jbasis_d.dat'), + os.path.join(tmp, 'jbasis_d.dat')) + for ext in ('struct', 'dmftsym'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + for ext in ('almblmup', 'almblmdn'): + _gunzip(os.path.join(HERE, f'{case}.{ext}.gz'), + os.path.join(tmp, f'{case}.{ext}')) + outband.write_outband(os.path.join(tmp, case)) + with gzip.open(os.path.join(HERE, f'{case}.outband.gz'), 'rt') as fh: + _compare(os.path.join(tmp, f'{case}.outband'), fh.readlines()) + finally: + shutil.rmtree(tmp) + + +_check('CaOs2_band') + +print('wien2k_outband_python: ok') diff --git a/test/python/wien2k/wien2k_parproj_python.py b/test/python/wien2k/wien2k_parproj_python.py new file mode 100644 index 0000000..4eac18e --- /dev/null +++ b/test/python/wien2k/wien2k_parproj_python.py @@ -0,0 +1,69 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.parproj generator (triqs_dftkit.wien2k.parproj) +# reproduces the dmftproj Fortran output. parproj holds the partial projectors +# and density matrices for the INCLUDED orbitals; the CaOs2_partial fixture adds +# an uncorrelated Ca d-shell. Inputs are the shared CaOs2 almblm/struct/dmftsym +# renamed to the CaOs2_partial case. +# +# Floats compared at 1e-6 (dmftproj single-precision basis-transform floor). + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import parproj + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _compare(got_path, ref_lines): + got = open(got_path).read().split() + ref = ''.join(ref_lines).split() + assert len(got) == len(ref), (len(got), len(ref)) + max_int, max_float = 0, 0.0 + for a, b in zip(got, ref): + if a.lstrip('-').isdigit() and b.lstrip('-').isdigit(): + max_int = max(max_int, abs(int(a) - int(b))) + else: + max_float = max(max_float, abs(float(a) - float(b))) + assert max_int == 0, f'integer field differs (max {max_int})' + assert max_float < 1e-11, f'float field differs (max {max_float:.2e})' + + +def _check(case): + tmp = tempfile.mkdtemp() + try: + shutil.copy(os.path.join(HERE, f'{case}.indmftpr'), + os.path.join(tmp, f'{case}.indmftpr')) + if os.path.exists(os.path.join(HERE, 'jbasis_d.dat')): + shutil.copy(os.path.join(HERE, 'jbasis_d.dat'), + os.path.join(tmp, 'jbasis_d.dat')) + for ext in ('struct', 'dmftsym'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + for ext in ('almblmup', 'almblmdn'): + _gunzip(os.path.join(HERE, f'CaOs2.{ext}.gz'), + os.path.join(tmp, f'{case}.{ext}')) + parproj.write_parproj(os.path.join(tmp, case)) + with gzip.open(os.path.join(HERE, f'{case}.parproj.gz'), 'rt') as fh: + _compare(os.path.join(tmp, f'{case}.parproj'), fh.readlines()) + finally: + shutil.rmtree(tmp) + + +_check('CaOs2_partial') +# Spin-mixing fromfile (|j, m_j>) included shell: the full 2(2l+1) Theta +# projector, density matrix and Rloc rotrep on the single is=1 block. +_check('CaOs2_jbasis_full') + +print('wien2k_parproj_python: ok') diff --git a/test/python/wien2k/wien2k_soc_convert.py b/test/python/wien2k/wien2k_soc_convert.py new file mode 100644 index 0000000..dc2a426 --- /dev/null +++ b/test/python/wien2k/wien2k_soc_convert.py @@ -0,0 +1,39 @@ +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by M. Aichhorn, L. Pourovskii, V. Vildosola +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + +# Spin-orbit + spin-polarized Wien2k converter test. +# +# CaOs2 is a cubic fluorite-type cell with two symmetry-equivalent correlated Os +# atoms; its magnetic point group has 16 operations, 8 of them time-reversal. +# This exercises the SOC path of dmftproj and the converter (combined-spin 'ud' +# block, time-reversal symmetry operations) that the non-SOC SrVO3 test does not. + +from h5 import * +from triqs.utility.h5diff import h5diff +import triqs.utility.mpi as mpi +from triqs_dftkit.wien2k import Converter + +Converter = Converter(filename='CaOs2') +Converter.hdf_file = 'wien2k_soc_convert.out.h5' +Converter.convert_dft_input() + +if mpi.is_master_node(): + h5diff('wien2k_soc_convert.out.h5', 'wien2k_soc_convert.ref.h5') diff --git a/test/python/wien2k/wien2k_soc_convert.ref.h5 b/test/python/wien2k/wien2k_soc_convert.ref.h5 new file mode 100644 index 0000000..68dfa81 Binary files /dev/null and b/test/python/wien2k/wien2k_soc_convert.ref.h5 differ diff --git a/test/python/wien2k/wien2k_socfull_convert.py b/test/python/wien2k/wien2k_socfull_convert.py new file mode 100644 index 0000000..5b0468d --- /dev/null +++ b/test/python/wien2k/wien2k_socfull_convert.py @@ -0,0 +1,51 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# End-to-end spin-orbit converter test at machine precision: the Python driver +# writes every case.* file, the Wien2k converter ingests them, and the HDF5 is +# h5diffed against the Fortran-derived reference at 1e-12. The Loewdin overlap +# must be full rank; the physical narrow window is rank-deficient (the overlap +# has near-null eigenvalues whose eigenvectors are not unique across LAPACK +# builds), so this test uses the wide window -2..3. The narrow physical case is +# locked exactly by wien2k_soc_convert (converter on the Fortran output). +# +# CaOs2_socfull is spin-orbit + spin-polarized CaOs2 with the Os d shell in the +# complex basis (no cubic template), wide window. convert_dft_input only; the +# cell has no uncorrelated shell. + +import gzip +import os +import shutil +import tempfile + +from triqs.utility.h5diff import h5diff +import triqs.utility.mpi as mpi +from triqs_dftkit.wien2k import Converter +from triqs_dftkit.wien2k.dmftproj import run_dmftproj + +HERE = os.path.dirname(os.path.abspath(__file__)) +CASE = 'CaOs2_socfull' + +tmp = tempfile.mkdtemp() +shutil.copy(os.path.join(HERE, f'{CASE}.indmftpr'), + os.path.join(tmp, f'{CASE}.indmftpr')) +for ext in ('struct', 'dmftsym', 'outputs'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{CASE}.{ext}')) +for spin in ('up', 'dn'): + with gzip.open(os.path.join(HERE, f'CaOs2.almblm{spin}.gz'), 'rb') as fi, \ + open(os.path.join(tmp, f'{CASE}.almblm{spin}'), 'wb') as fo: + shutil.copyfileobj(fi, fo) + +run_dmftproj(os.path.join(tmp, CASE)) + +conv = Converter(filename=os.path.join(tmp, CASE)) +conv.hdf_file = os.path.join(tmp, 'wien2k_socfull_convert.out.h5') +conv.convert_dft_input() + +if mpi.is_master_node(): + h5diff(os.path.join(tmp, 'wien2k_socfull_convert.out.h5'), + os.path.join(HERE, 'wien2k_socfull_convert.ref.h5'), precision=1e-12) + print('wien2k_socfull_convert: ok') diff --git a/test/python/wien2k/wien2k_socfull_convert.ref.h5 b/test/python/wien2k/wien2k_socfull_convert.ref.h5 new file mode 100644 index 0000000..9d92a0d Binary files /dev/null and b/test/python/wien2k/wien2k_socfull_convert.ref.h5 differ diff --git a/test/python/wien2k/wien2k_sympar_python.py b/test/python/wien2k/wien2k_sympar_python.py new file mode 100644 index 0000000..d4a8f7b --- /dev/null +++ b/test/python/wien2k/wien2k_sympar_python.py @@ -0,0 +1,70 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.sympar generator (triqs_dftkit.wien2k.sympar) +# reproduces the dmftproj Fortran output. sympar holds the symmetry matrices for +# all INCLUDED orbitals (correlated + partial), so the CaOs2_partial fixture adds +# an uncorrelated Ca d-shell to the correlated Os d-shells. Inputs are the shared +# CaOs2 almblm/struct/dmftsym renamed to the CaOs2_partial case. +# +# Floats compared at 1e-6: dmftproj stores the cubic basis transform through a +# single-precision CMPLX cast, so its matrices carry ~1e-7 noise the double- +# precision generator reproduces to the same floor. + +import gzip +import os +import shutil +import tempfile + +from triqs_dftkit.wien2k import sympar + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _gunzip(src, dst): + with gzip.open(src, 'rb') as fi, open(dst, 'wb') as fo: + shutil.copyfileobj(fi, fo) + + +def _compare(got_path, ref_lines): + got = open(got_path).read().split() + ref = ''.join(ref_lines).split() + assert len(got) == len(ref), (len(got), len(ref)) + max_int, max_float = 0, 0.0 + for a, b in zip(got, ref): + if a.lstrip('-').isdigit() and b.lstrip('-').isdigit(): + max_int = max(max_int, abs(int(a) - int(b))) + else: + max_float = max(max_float, abs(float(a) - float(b))) + assert max_int == 0, f'integer field differs (max {max_int})' + assert max_float < 1e-11, f'float field differs (max {max_float:.2e})' + + +def _check(case): + tmp = tempfile.mkdtemp() + try: + shutil.copy(os.path.join(HERE, f'{case}.indmftpr'), + os.path.join(tmp, f'{case}.indmftpr')) + if os.path.exists(os.path.join(HERE, 'jbasis_d.dat')): + shutil.copy(os.path.join(HERE, 'jbasis_d.dat'), + os.path.join(tmp, 'jbasis_d.dat')) + for ext in ('struct', 'dmftsym'): + shutil.copy(os.path.join(HERE, f'CaOs2.{ext}'), + os.path.join(tmp, f'{case}.{ext}')) + for ext in ('almblmup', 'almblmdn'): + _gunzip(os.path.join(HERE, f'CaOs2.{ext}.gz'), + os.path.join(tmp, f'{case}.{ext}')) + sympar.write_sympar(os.path.join(tmp, case)) + with gzip.open(os.path.join(HERE, f'{case}.sympar.gz'), 'rt') as fh: + _compare(os.path.join(tmp, f'{case}.sympar'), fh.readlines()) + finally: + shutil.rmtree(tmp) + + +_check('CaOs2_partial') +# Spin-mixing fromfile (|j, m_j>) included shell: the full 2(2l+1) srot%rotrep. +_check('CaOs2_jbasis_full') + +print('wien2k_sympar_python: ok') diff --git a/test/python/wien2k/wien2k_symqmc_jbasis.ref.npy b/test/python/wien2k/wien2k_symqmc_jbasis.ref.npy new file mode 100644 index 0000000..4cce82c Binary files /dev/null and b/test/python/wien2k/wien2k_symqmc_jbasis.ref.npy differ diff --git a/test/python/wien2k/wien2k_symqmc_l0.ref.npy b/test/python/wien2k/wien2k_symqmc_l0.ref.npy new file mode 100644 index 0000000..ae517ee Binary files /dev/null and b/test/python/wien2k/wien2k_symqmc_l0.ref.npy differ diff --git a/test/python/wien2k/wien2k_symqmc_mixing.py b/test/python/wien2k/wien2k_symqmc_mixing.py new file mode 100644 index 0000000..dc10a30 --- /dev/null +++ b/test/python/wien2k/wien2k_symqmc_mixing.py @@ -0,0 +1,88 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.symqmc generator on the two paths the spin-diagonal +# cubic test (wien2k_symqmc_python) does not exercise: +# +# - a spin-mixing fromfile basis (the |j, m_j> basis), which uses the full +# 2(2l+1) spinor representation and the spinor time-reversal operator; +# - an l = 0 (s) correlated shell, the 2x2 spin phase block. +# +# Both reuse the CaOs2 symmetry input (16 operations, 8 of them time-reversal). +# The reference is the dmftproj Fortran case.symqmc for the same input, stored as +# the matrix data in single precision: dmftproj reads the fromfile basis with a +# single-precision CMPLX cast (set_ang_trans.f), so its output there carries a +# ~1e-7 error. The generator is full double precision, so we compare at 1e-6 and +# separately assert each Python spinor matrix is unitary. + +import os +import shutil +import tempfile +import numpy as np + +from triqs_dftkit.wien2k import symqmc + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def _matrix_data(symqmc_path, nsym, natom): + """Flat array of the matrix blocks, skipping header/perm/timeflag lines.""" + toks = iter(open(symqmc_path).read().split()) + assert int(next(toks)) == nsym and int(next(toks)) == natom + for _ in range(nsym * natom + nsym): # perm rows + the time-reversal flags + next(toks) + return np.array([float(x) for x in toks]) + + +def _run(indmftpr, extra=()): + """Generate case.symqmc in a scratch dir from the shared CaOs2 symmetry + input and the given indmftpr, returning (matrix data, shells, ops, so).""" + tmp = tempfile.mkdtemp() + try: + for src, dst in (('CaOs2.dmftsym', 'case.dmftsym'), + ('CaOs2.struct', 'case.struct'), + (indmftpr, 'case.indmftpr')) + extra: + shutil.copy(os.path.join(HERE, src), os.path.join(tmp, dst)) + case = os.path.join(tmp, 'case') + symqmc.write_symqmc(case) + nsym, ops = symqmc._read_dmftsym(case + '.dmftsym') + shells, so = symqmc._read_correlated_shells( + case + '.indmftpr', case + '.struct') + natom = len(ops[0]['perm']) + return _matrix_data(case + '.symqmc', nsym, natom), shells, ops, so + finally: + shutil.rmtree(tmp) + + +def _timeinv(op, so): + k = op['krotm'] + return 1 if (so and k[0, 0] * k[1, 1] - k[0, 1] * k[1, 0] < 0.0) else 0 + + +def _check(indmftpr, ref_npy, extra=(), unit_tol=1e-7): + data, shells, ops, so = _run(indmftpr, extra) + ref = np.load(os.path.join(HERE, ref_npy)) + assert data.shape == ref.shape, (data.shape, ref.shape) + assert np.max(np.abs(data - ref)) < 1e-11, np.max(np.abs(data - ref)) + for op in ops: + for sh in shells: + mat = symqmc._shell_matrix(op, sh, _timeinv(op, so), bool(so)) + dev = np.max(np.abs(mat @ np.conj(mat.T) - np.eye(mat.shape[0]))) + assert dev < unit_tol, ('not unitary', dev) + + +# spin-mixing |j, m_j> basis: the path dft_tools #148 singles out +data, shells, _, _ = _run('CaOs2_jbasis.indmftpr', + (('jbasis_d.dat', 'jbasis_d.dat'),)) +assert shells[0]['mixing'] and shells[0]['P'].shape == (10, 10) +_check('CaOs2_jbasis.indmftpr', 'wien2k_symqmc_jbasis.ref.npy', + (('jbasis_d.dat', 'jbasis_d.dat'),)) + +# l = 0 (s) correlated shell +_, shells, _, _ = _run('CaOs2_l0.indmftpr') +assert shells[0]['l'] == 0 +_check('CaOs2_l0.indmftpr', 'wien2k_symqmc_l0.ref.npy', unit_tol=1e-12) + +print('wien2k_symqmc_mixing: ok') diff --git a/test/python/wien2k/wien2k_symqmc_python.py b/test/python/wien2k/wien2k_symqmc_python.py new file mode 100644 index 0000000..c60b24a --- /dev/null +++ b/test/python/wien2k/wien2k_symqmc_python.py @@ -0,0 +1,23 @@ +################################################################################ +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# (GPL-3.0-or-later) +################################################################################ + +# Verify the pure-Python case.symqmc generator (triqs_dftkit.wien2k.symqmc) +# reproduces the dmftproj Fortran output: regenerate case.symqmc in Python from +# case.dmftsym + case.indmftpr + case.struct, convert, and compare the resulting +# HDF5 to the reference produced from the Fortran dmftproj symqmc. + +from triqs_dftkit.wien2k.symqmc import write_symqmc +from triqs_dftkit.wien2k import Converter +from triqs.utility.h5diff import h5diff +import triqs.utility.mpi as mpi + +write_symqmc('CaOs2') + +Converter = Converter(filename='CaOs2') +Converter.hdf_file = 'wien2k_symqmc_python.out.h5' +Converter.convert_dft_input() + +if mpi.is_master_node(): + h5diff('wien2k_symqmc_python.out.h5', 'wien2k_soc_convert.ref.h5')