#!/bin/csh -f unalias rm set running = ".running.$$.`hostname`.`date +%d%m%H%M%S`" echo $$ >$running onintr clear alias error 'echo ">>> ($name) \!* -> exit"; goto error' set name = $0 #full name of script-file set bin = $name:h #default directory for WIEN-executables if !(-d $bin) set bin = . set name = $name:t set def = def #def-file set tmp = ( ) #tmp-files, to be deleted before exit set log = :log #log-file set t = time # set updn # spinpolarization switch set dnup = 'dn' # spinpolarization switch set clmtype = 'clmval' # for density calculations (used in 3ddens) set spin=1 # for -it in lapw1 #set ne_it=1.1 # for -it in lapw1 set emin=-999.0 # for -emin XX in lapw2 set emax=999.0 # for -all XX YY in lapw2 set settol=0.00001 # tol parameter for sgroup set wf=0 # wplot: WF to plot (0 = read from file) set sc # semicore-switch set so # spinorbit-switch set sodum # spinorbit-switch #set cmplx set cmplx1 set cmplx2 set para # parallel execution set dopara # parallel execution set sel # standard vector file in lapw7 set band1 # regular run in lapw1 set eece set grr set lcore set hf set diaghf set modehf set nonself set newklist set redklist set vnonloc set nmrhf set scratchnmrhf set gw set dispersion set ending set ending3 set ending4 set testmsr set testmsr1 set gllb unset enefile unset orb # LDA+U in lapw1 unset nmat_only # determines matrixsize in lapw1 unset iter # iterative diagonalization unset nohns # without HNS in lapw1 unset qtl # regular run in lapw2 unset alm # writes alm in lapw2 unset almd # charge calculation from dmft densmat in lapw2 unset qdmft # charge calculation from dmft densmat in lapw2 unset sigma # regular run in lstart unset band # regular run in lapw2 unset fermi # regular run in lapw2 unset efg # regular run in lapw2 unset emin1 # regular run in lapw2 unset emax1 # regular run in lapw2 unset eece1 # regular run in lapw2 unset updn1 # regular run in lapw2 unset command #command unset file #file-head unset deffile_only #create just def file unset fftstop #for dstart unset vresp #for lapw2 unset help_files #for lapw2 unset super # for dstart, creates new.clmsum unset rxes # for tetra, uses rxes-weight file unset rxesw # for tetra, writes rxes-weight file unset xspec # for broadening unset delta unset copy unset txt set readHinv unset writeHinv unset in1orig unset fbz # for kgen, generates full BZ mesh unset make_inq # for qtl, construct case.inq from case.innes unset Rsum #for RMTCheck unset nmr unset writehs unset efermi unset half # for LDA-half unset half_ref set scratch = #eg: /scr1/pblaha/ for vectors, help-files, set scratchstring = unset lom10 # JH if ( $?SCRATCH && $SCRATCH != '') then set scratch=`echo $SCRATCH | sed -e 's/\/$//'`/ # we are afraid # different settings in different # computing centers #use global variable for scratch if set endif set argv1=($argv) while ($#argv) switch ($1) case -f: shift; set file = $1 shift; breaksw case -h: case -H: set help shift; breaksw case -[t|T]: set t shift; breaksw case -up: set spin=2 set updn = 'up' set dnup = 'dn' if ( $clmtype == 'clmsum' ) set clmtype = 'clm' shift; breaksw case -dn: set spin=2;set updn1 set updn = 'dn' set dnup = 'up' if ( $clmtype == 'clmsum' ) set clmtype = 'clm' shift; breaksw case -ud: set ud = 'ud' set updn = 'up' shift; breaksw case -tot: set clmtype = 'clmsum' if ( $updn == 'up' || $updn == 'dn' ) set clmtype = 'clm' shift; breaksw case -val: set clmtype = 'clmval' shift; breaksw case -pot: set clmtype = 'vtotal' shift; breaksw case -coulomb: set clmtype = 'vcoul' shift; breaksw case -exchange: set clmtype = 'r2v' shift; breaksw case -halfr2v: set clmtype = 'r2v_half' shift; breaksw case -sc: set sc = 's' shift; breaksw case -d: set deffile_only shift; breaksw case -fft: set fftstop shift; breaksw case -c: set cmplx = c set cmplx2='-c' shift; breaksw case -[p|P] set para = para shift; breaksw case -it: set iter shift; breaksw case -noHinv: set iter unset readHinv shift; breaksw case -noHinv0: set iter unset readHinv set writeHinv shift; breaksw # case -ne_it: # shift;set ne_it=$1 # shift; breaksw case -emin: shift;set emin=$1;set emin1 set testreal=`echo $emin | grep "\." ` if($#testreal == 0) set emin=${emin}. shift; breaksw case -emax: shift;set emax=$1;set emax1 shift; breaksw case -all: shift;set emin=$1;set emin1 set testreal=`echo $emin | grep "\." ` if($#testreal == 0) set emin=${emin}. shift;set emax=$1;set emax1 set testreal=`echo $emax | grep "\." ` if($#testreal == 0) set emax=${emax}. shift; breaksw case -help_files: set help_files shift; breaksw case -vresp: set vresp shift; breaksw case -eece: set eece=eece;set eece1 shift; breaksw case -grr: set grr=grr shift; breaksw case -orb: set orb shift; breaksw case -nmat_only: set nmat_only shift; breaksw case -nohns: set nohns shift; breaksw case -enefile: set enefile shift; breaksw case -rxes: set rxes shift; breaksw case -rxesw: set rxesw shift;set rxese1 = $1 shift;set rxese2 = $1 shift; breaksw case -so: set so = 'so' set sodum = 'dum' set cmplx = c set cmplx2='-c' shift; breaksw case -in1orig: set in1orig shift; breaksw case -band: set band set band1='_band' shift; breaksw case -qtl: # set help_files set qtl shift; breaksw case -alm: set alm shift; breaksw case -almd: set almd shift; breaksw case -qdmft: # ?? set help_files set qdmft shift; breaksw case -fbz: set fbz shift; breaksw case -sigma: set sigma shift; breaksw case -efg: set efg shift; breaksw case -hf: set hf = 'hf' shift; breaksw case -diaghf: set diaghf = 'diaghf' shift; breaksw case -mode1: set modehf = 'mode1' shift; breaksw case -mode2: set modehf = 'mode2' shift; breaksw case -mode3: set modehf = 'mode3' shift; breaksw case -nonself: set nonself = 'nonself' shift; breaksw case -newklist: set newklist = 'newklist' shift; breaksw case -redklist: set redklist = 'redklist' shift; breaksw case -slater: set vnonloc = 'slater' shift; breaksw case -kli: set vnonloc = 'kli' shift; breaksw case -nmrhf: set nmrhf = 'nmrhf' shift; breaksw case -gw: set gw = 'gw' shift; breaksw case -lom10: # JH set lom10; shift; breaksw # JH case -dftd3: set dispersion = 'dftd3' shift; breaksw case -nlvdw: set dispersion = 'nlvdw' shift; breaksw case -gllb: set gllb = 'gllb' shift; breaksw case -deltagllb: set gllb = 'deltagllb' shift; breaksw case -sel: set sel = f shift; breaksw case -fermi: set fermi shift; breaksw case -super: set super shift; breaksw case -settol: shift;set settol = $1 shift; breaksw case -delta: set delta shift; breaksw case -lcore: set lcore=lcore shift; breaksw case -copy: set copy shift; breaksw case -telnes: #Kevin Jorissen set make_inq shift; breaksw case -nmr: set nmr shift; breaksw case -writehs: set writehs shift; breaksw case -sum set Rsum shift; breaksw case -txt set txt shift; breaksw case -xspec set xspec shift; breaksw case -scratch: shift;set scratch = $1 set ncar=`echo $scratch |wc -m` @ ncar -- set lcar=`echo $scratch | cut -c$ncar` if("$lcar" != '/' ) set scratch=`echo "${scratch}/"` set scratchstring="-scratch $scratch" if ( "$scratch" == "./" ) then set scratch= set scratchstring= else if(! -e "$scratch" ) then mkdir -p $scratch endif setenv SCRATCH $scratch shift; breaksw case -half: # jdoumont: added for LDA-half set half shift; breaksw ## w2w stuff ## case -pp: # passed on to Wannier90 shift; breaksw case -wf: shift; set wf = $1 shift; breaksw case -efermi: shift; set efermi = $1 shift; breaksw ## w2w end ## default: set optiontest = `echo $1|cut -c1` if ( "$optiontest" == '-' ) then echo "error in your arguments: $1 is not a valid option" exit(3) endif set command = $1 shift; breaksw endsw end if ($hf == hf) then set scratch= set scratchstring= setenv SCRATCH $scratch endif continue: if !($?file) then set file = `pwd` set file = $file:t #tail of file-names endif if ( $?help ) goto help if (! -e $file.struct) touch $file.struct set cmplx1=`cut -b -6 $file.struct |awk 'BEGIN{c="c"};{if ($0 == "-1 0 0") {getline; {if ($0 == " 0-1 0"){getline; {if ($0 == " 0 0-1"){c= ""}}}}}};END{print c}'` if !($?cmplx) then set cmplx=$cmplx1 if($cmplx == c ) set cmplx2='-c' endif if !($?command) then error no command endif if ($command == lapw1c) then set cmplx = c set command = lapw1 else if ($command == lapw1it) then set iter set command = lapw1 else if ($command == lapw1itc) then set cmplx = c set iter set command = lapw1 else if ($command == lapw2c) then set cmplx = c set command = lapw2 else if ($command == hfc) then set cmplx = c set command = hf else if ($command == lapwdmc) then set cmplx = c set command = lapwdm else if ($command == dmatc) then set cmplx = c set command = dmat else if ($command == filtvecc) then set cmplx = c set command = filtvec else if ($command == lapw7c) then set cmplx = c set command = lapw7 else if ($command == lapw5c) then set cmplx = c set command = lapw5 else if ($command == spinorbitc) then set cmplx = c set command = spinorbit else if ($command == opticc) then set cmplx = c set command = optic else if ($command == w2wc) then set cmplx = c set command = w2w endif else if ($command == wplotc) then set cmplx = c set command = wplot endif #echo "`date`> ($name) $command $argv1[2-]" >> $log echo "`date`> ($name) $argv1" >> $log set def = $updn$command$sc.def #touch $def switch ($command) case lcore: set exe = lcore cat << theend > $def 5,'$file.inc', 'old', 'formatted',0 6,'$file.outputc$updn','unknown','formatted',0 8,'$file.vsp$updn', 'old', 'formatted',0 9,'$file.clmcor$updn', 'unknown','formatted',0 19,'$file.vns$updn', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfc$updn', 'unknown','formatted',0 28,'$file.vrespcor$updn', 'unknown','formatted',0 29,'$file.corewf$updn', 'unknown','formatted',0 67,'$file.lcorepot$updn', 'unknown','formatted',0 83,'$file.rsplcore$updn', 'unknown','formatted',0 theend if ($gllb == gllb) then echo "35,'$file.gllb','unknown','formatted',0" >>$def echo "37,'$file.scf2$updn','unknown','formatted',0" >>$def else if ($gllb == deltagllb) then echo "36,'$file.gllb','unknown','formatted',0" >>$def echo "37,'$file.scf2$updn','unknown','formatted',0" >>$def endif breaksw # jdoumont added switches for LDA-half case dstart: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_dstart: .machines | grep -v '#' | sed 's/omp_dstart://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 set exe = dstart$para set dopara = 1 if (($updn == '') || ($updn == 'up')) then set ending1 = 'up' set ending2 = '' else set ending1 = 'dn' set ending2 = 'dn' endif cat << theend > $def 6,'$file.outputd$updn','unknown','formatted',0 13,'$file.in0_std','unknown', 'formatted',0 14,'$file.in0','old', 'formatted',0 15,'$file.in2$cmplx', 'old', 'formatted',0 17,'$file.in1$cmplx', 'old', 'formatted',0 16,'$file.test', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 theend if($?half) then echo "19, '$file.inpd', 'old', 'formatted',0">>$def echo "81,'$file.pot${ending1}', 'old', 'formatted',0">>$def echo "82,'$file.pot${ending1}_half', 'old', 'formatted',0">>$def echo "51,'$file.r2v_half${ending2}', 'unknown','formatted',0">>$def else echo "81,'$file.rsp$lcore$updn', 'old', 'formatted',0">>$def if ($updn == '') then if ($?super) then echo "51,'new_super.clmsum', 'unknown','formatted',0">>$def else if ($lcore == 'lcore') then echo "51,'$file.clmsc', 'unknown','formatted',0">>$def else echo "51,'$file.clmsum', 'unknown','formatted',0">>$def endif else if ($?super) then echo "51,'new_super.clm$updn', 'unknown','formatted',0">>$def else if($lcore == 'lcore') then echo "51,'$file.clmsc$updn', 'unknown','formatted',0">>$def else echo "51,'$file.clm$updn', 'unknown','formatted',0">>$def endif endif endif if ($?fftstop) then echo " 4,'$file.fftstop', 'unknown','formatted',0">>$def endif breaksw case kgen: set exe = kgen cat << theend > $def 8,'$file.klist', 'unknown','formatted',0 15,'$file.kgen', 'unknown','formatted',0 66,'$file.outputkgen','unknown','formatted',0 theend if ( $hf == 'hf' ) echo "10,'$file.outputkgenhf','unknown','formatted',0" >>$def if ($?fbz) echo "22,'$file.fbz', 'unknown','formatted',0" >>$def if ($so == so ) then if (-e $file.ksym && ! -z $file.ksym) then echo "20,'$file.ksym', 'old','formatted',0" >>$def else echo "$file.ksym not present, using $file.struct because inversion is present" echo "20,'$file.struct', 'old','formatted',0" >>$def endif else echo "20,'$file.struct', 'old','formatted',0" >>$def endif breaksw case lapw0: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_lapw0: .machines | grep -v '#' | sed 's/omp_lapw0://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 set exe = lapw0$para set dopara = 1 set tmp = ($file.poissn $file.r2v $file.vcoul) if (-e $file.clmup && ! -z $file.clmup) then set updn = 'up' endif set endup = 'up' set endvup = 'up' if ($eece == 'eece') then set endup = 'valupeece' set endvup = 'valup' endif set enddn = 'dn' set endvdn = 'dn' if ($eece == 'eece') then set enddn = 'valdneece' set endvdn = 'valdn' endif set grr2 if ($grr == 'grr') then set grr2 = '_grr' endif echo "dynamical mixing for mbj from greed of *scfm" >$file.mbjmix if(-e $file.scfm ) grep :MIX $file.scfm >> $file.mbjmix cat << theend > $def 3,'$file.rhopw', 'unknown','formatted',0 4,'$file.inm', 'unknown','formatted',0 5,'$file.in0$grr2$eece', 'old', 'formatted',0 6,'$file.output0$grr2', 'unknown','formatted',0 7,'$file.vorbup', 'unknown','formatted',0 8,'$file.clmsum', 'old', 'formatted',0 9,'$file.vtotal$grr2', 'unknown','formatted',0 10,'$file.vcoul$grr2', 'unknown','formatted',0 11,'$file.r2v$grr2', 'unknown','formatted',0 12,'$file.clm$endup', 'unknown','formatted',0 13,'$file.clm$enddn', 'unknown','formatted',0 14,'$file.mbjmix', 'unknown','formatted',0 16,'$file.vsp$grr2$updn','unknown','formatted',0 17,'$file.vsp${grr2}dn', 'unknown','formatted',0 18,'$file.vns$grr2$updn','unknown','formatted',0 19,'$file.vns${grr2}dn', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scf0$grr2', 'unknown','formatted',0 28,'$file.vrespsum','unknown','formatted',0 29,'$file.vresp$endvup', 'unknown','formatted',0 30,'$file.vresp$endvdn', 'unknown','formatted',0 50,'$file.eeceup', 'unknown','formatted',0 51,'$file.eecedn', 'unknown','formatted',0 62,'$file.grr', 'unknown','formatted',0 63,'$WIENROOT/SRC_lapw0/xc_funcs.h','unknown','formatted',0 64,'$file.r2v_nonloc', 'unknown','formatted',0 theend if ($grr == '') then echo "61,'$file.in0abp', 'unknown','formatted',0" >>$def else if ($grr == 'grr') then echo "60,'$file.inhf', 'unknown','formatted',0" >>$def echo "61,'$file.in0xy', 'unknown','formatted',0" >>$def endif if ($dispersion == 'nlvdw') then echo "65,'$file.innlvdw', 'old','formatted',0" >>$def echo "66,'$file.r2v_nlvdw', 'unknown','formatted',0" >>$def endif if ($?half) then echo "69,'$file.r2v_half', 'unknown','formatted',0" >>$def endif breaksw case nlvdw: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_nlvdw: .machines | grep -v '#' | sed 's/omp_nlvdw://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 set exe = nlvdw$para set dopara = 1 cat << theend > $def 5,'$file.innlvdw', 'old', 'formatted',0 6,'$file.outputnlvdw', 'unknown', 'formatted',0 7,'$file.in2$cmplx', 'unknown', 'formatted',0 8,'$file.clmsum', 'unknown', 'formatted',0 10,'$file.r2v_nlvdw', 'unknown', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfnlvdw', 'unknown', 'formatted', 0 40,'$WIENROOT/SRC_nlvdw/vdW_kernel_table', 'old', 'formatted',0 41,'$WIENROOT/SRC_nlvdw/rVV10_kernel_table', 'old', 'formatted',0 theend breaksw case lapw1: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_lapw1: .machines | grep -v '#' | sed 's/omp_lapw1://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 #if ($?band) then # set old="`head -1 $file.in1$cmplx |cut -c1-5`" # cp $file.in1$cmplx .oldin1 # sed "s/UNIT:./UNIT:5/" .oldin1 >$file.in1$cmplx #endif set exe = $command$cmplx$para if($?lom10) set exe=${exe}_lom10 # JH set dopara = 1 set nmat_string if ($?nmat_only) set nmat_string='_nmat_only' #if ($?iter) then # set ne=`head -2 $file.in2$cmplx |tail -1 ` # set ne1=`echo "$ne[2] * $ne_it / $spin + 5 " | bc` # echo $ne1 > $file.ne_it #endif cat << theend > $def 4,'$file.klist$sc${band1}', 'unknown','formatted',0 5,'$file.in1$cmplx$sc', 'old', 'formatted',0 6,'$file.output1$sc$updn$nmat_string','unknown','formatted',0 10,'${scratch}$file.vector$sc$updn$nmat_string', 'unknown','unformatted',9000 11,'$file.energy$sc$updn$nmat_string', 'unknown','formatted',0 18,'$file.vsp$updn', 'old', 'formatted',0 19,'$file.vns$updn', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scf1$sc$updn$nmat_string', 'unknown','formatted',0 55,'$file.vec', 'unknown','formatted',0 71,'$file.nsh$sc$updn$nmat_string', 'unknown','unformatted',0 theend if ($?orb) echo " 7,'$file.vorb$updn' ,'unknown','formatted',0" >> $def if ($?nmat_only) echo "72,'$file.nmat_only' ,'unknown','formatted',0" >> $def if ($?iter) then echo "98,'${scratch}$file.vector$sc$updn.old', 'unknown','unformatted',9000" >> $def if($?readHinv) then echo "200,'${scratch}$file.storeHinv$sc$updn$nmat_string', 'unknown','unformatted',9000" >> $def else echo "200,'${scratch}$file.storeHinv$sc$updn$nmat_string', 'replace','unformatted',9000" >> $def if($?writeHinv) then echo "201,'${scratch}$file.storeHinv$sc$updn$nmat_string', 'unknown','unformatted',9000" >> $def endif endif else echo "200,'${scratch}$file.storeHinv$sc$updn$nmat_string', 'replace','unformatted',9000" >> $def endif if ($?nohns) echo "97,'${scratch}$file.nohns', 'unknown','formatted',9000" >> $def if ($?writehs) then echo "12,'${scratch}$file.ham', 'unknown','unformatted',0" >> $def endif if ($?nmr) then echo "3,'$file.qvec', 'unknown','formatted',0" >> $def endif breaksw case lapw2: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_lapw2: .machines | grep -v '#' | sed 's/omp_lapw2://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 #rm -f .oldin2 rm -f .oldin2a if(-e .oldin2) echo "WARNING: .oldin2 file exists, probably from spin-up or a previous crash" if ($?band) then # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "3s/^...../ROOT /" .oldin2 >.oldin2t sed "1s/^...../QTL /" .oldin2t >$file.in2$cmplx rm .oldin2t unset qtl endif if ($?qtl) then if ($?orb) then echo 'ERROR: -qtl and -orb switches are not compatible' echo 'When calculating qtls, dont use -orb in lapw2' exit (9) endif # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "1s/^...../QTL /" .oldin2 >$file.in2$cmplx endif if ($?alm) then # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "1s/^...../ALM /" .oldin2 >$file.in2$cmplx endif if ($?almd) then # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "1s/^...../ALMD /" $file.in2$cmplx > .oldin2_int mv .oldin2_int $file.in2$cmplx endif if ($?qdmft) then # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "1s/^...../QDMFT/" .oldin2 >$file.in2$cmplx endif if ($?efg) then # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "1s/^...../EFG /" .oldin2 >$file.in2$cmplx endif if ($?fermi) then # set old="`head -1 $file.in2$cmplx |cut -c1-5`" if(! -e .oldin2) cp $file.in2$cmplx .oldin2 sed "1s/^...../FERMI/" .oldin2 >$file.in2$cmplx endif if ($?emin1) then set old1=`head -2 $file.in2$cmplx |tail -1` if(! -e .oldin2) cp $file.in2$cmplx .oldin2 cp $file.in2$cmplx .oldin2a sed "2s/$old1[1]/$emin/" .oldin2a >$file.in2$cmplx if ($?emax1) then cp $file.in2$cmplx .oldin2a set old2=`head -3 $file.in2$cmplx |tail -1` sed "3s/^...../ALL /" .oldin2a >$file.in2$cmplx cp $file.in2$cmplx .oldin2a sed "3s/$old2[2]/$emax/" .oldin2a >$file.in2$cmplx rm .oldin2a endif endif set exe = $command$cmplx$para set dopara = 1 set ending = 'val' if ($sc == 's') set ending = 'sc' if (($hf == hf) && ($redklist == 'redklist')) then set ending3 = '_ribz' set ending4 = '_rbz' endif if ($sodum != 'dum') then set sodum=$dnup endif cat << theend > $def 2,'$file.nsh$sc$updn', 'unknown','unformatted',0 3,'$file.in1$cmplx1$sc', 'unknown','formatted',0 4,'$file.inso', 'unknown','formatted',0 5,'$file.in2$cmplx$sc$eece', 'old', 'formatted',0 6,'$file.output2$sc$hf$updn$eece','unknown','formatted',0 7,'$file.vorb$updn','unknown','formatted',0 8,'$file.clm$ending$updn$eece','unknown','formatted',0 10,'${scratch}$file.vector$sc$hf$so$updn', 'unknown','unformatted',9000 13,'$file.recprlist', 'unknown','unformatted',9000 14,'$file.kgen$sc$ending3', 'unknown','formatted',0 16,'$file.qtl$updn', 'unknown','formatted',0 17,'$file.weightaver$so$updn','unknown','formatted',0 18,'$file.vsp$updn', 'old', 'formatted',0 19,'$file.vns$updn', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scf2$sc$hf$updn','unknown','formatted',0 922,'$file.rotlm', 'unknown', 'formatted',0 23,'$file.radwf$updn', 'unknown', 'formatted',0 26,'$file.weight$sc$hf$updn$ending4', 'unknown','formatted',0 27,'$file.weight$sc$hf$dnup$ending4', 'unknown','formatted',0 29,'$file.energy$sc$hf$sodum$ending4','unknown','formatted',0 30,'$file.energy$sc$hf$so$updn$ending4', 'unknown','formatted',0 32,'$file.qdmft$updn', 'unknown', 'formatted',0 34,'$file.oubwin$updn', 'unknown', 'formatted',0 231,'$file.dmftsym', 'unknown', 'formatted',0 theend if ($so == so ) echo "12,'$file.norm$sc$so$updn', 'unknown','formatted',0" >>$def if ($?orb) echo "25,'$file.indm$cmplx', 'old','formatted',0" >>$def if ($?orb) echo "22,'$file.dmat$updn', 'unknown','formatted',0" >>$def if ($?vresp) echo "28,'$file.vresp$ending$updn', 'unknown','formatted',0" >>$def if ($?help_files) echo "31,'${scratch}$file.help$updn', 'unknown','formatted',0" >>$def if ($?alm) echo "24,'$file.almblm$hf$updn','unknown', 'formatted',0" >>$def if ($?almd) echo "24,'$file.almblm$hf$updn','unknown', 'formatted',0" >>$def if ($gllb == gllb) then echo "35,'$file.gllb', 'unknown','formatted',0" >>$def else if ($gllb == deltagllb) then echo "36,'$file.gllb', 'unknown','formatted',0" >>$def endif breaksw case lapwso: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_lapwso: .machines | grep -v '#' | sed 's/omp_lapwso://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 set dnup1 if ( $updn == up ) set dnup1=dn set exe = lapwso$para set dopara = 1 #set def = lapwso.def cat << theend > $def 4 ,'$file.in1$cmplx$sc', 'old', 'formatted',0 5 ,'$file.inso', 'old', 'formatted',0 6 ,'$file.outputso', 'unknown','formatted',0 8 ,'$file.scfso', 'unknown','formatted',0 9 ,'${scratch}$file.vector$sc$hf$dnup1', 'old', 'unformatted',9000 10,'${scratch}$file.vector${sc}${hf}up', 'unknown', 'unformatted',9000 18,'$file.vsp$dnup1', 'old','formatted',0 19,'$file.vspup', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 22,'$file.vns$dnup1', 'old','formatted',0 23,'$file.vnsup', 'unknown','formatted',0 41,'${scratch}$file.vector${sc}${hf}sodn', 'unknown','unformatted',9000 42,'${scratch}$file.vector${sc}${hf}so$updn', 'unknown','unformatted',9000 44,'$file.vect1', 'unknown','unformatted',9000 45,'$file.normsodn', 'unknown','formatted',0 46,'$file.normsoup', 'unknown','formatted',0 51,'$file.energy${sc}${hf}sodn', 'unknown','formatted',9000 52,'$file.energy${sc}${hf}so$updn', 'unknown','formatted',9000 53,'$file.energy${hf}dum', 'unknown','formatted',9000 54,'$file.energy${sc}${hf}$dnup1', 'old','formatted',9000 55,'$file.energy${sc}${hf}up', 'unknown', 'formatted',9000 theend if($?orb) echo "11,'$file.vorbdn', 'unknown','formatted',0" >> $def if($?orb) echo "12,'$file.vorbup', 'unknown','formatted',0" >> $def if($?orb) echo "13,'$file.vorbud', 'unknown','formatted',0" >> $def if($hf == 'hf') echo "14,'$file.lapwsohf','unknown','formatted',0" >>$def breaksw case lapwdm: if (!(-e $file.indm$cmplx && ! -z $file.indm$cmplx)) then cp $WIENROOT/SRC_templates/case.indm $file.indm$cmplx echo "default $file.indm$cmplx generated from SRC_templates" echo "edit this file and rerun lapwdm" set deffile_only endif set exe = $command$cmplx$para set dopara = 1 cat << theend > $def 4,'$file.inso', 'unknown', 'formatted',0 5,'$file.indm$cmplx', 'old', 'formatted',0 6,'$file.outputdm$updn','unknown','formatted',0 7,'$file.dmat$updn','unknown','formatted',0 8,'$file.dmat$dnup','unknown','formatted',0 9,'${scratch}$file.vector$sc$hf$so$updn', 'unknown','unformatted',9000 10,'${scratch}$file.vector$sc$hf$so$dnup', 'unknown','unformatted',9000 18,'$file.vsp$updn', 'old', 'formatted',0 19,'$file.vsp$dnup', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfdm$updn', 'unknown','formatted',0 26,'$file.weight$hf$updn', 'unknown','formatted',0 50,'$file.energy$sc$hf$so$updn', 'unknown','formatted',9000 51,'$file.energy$sc$hf$so$dnup', 'unknown','formatted',9000 12,'$file.vorb$updn', 'unknown','formatted',0 theend ###14,'$file.kgen$sc', 'unknown','formatted',0 if ($?so) echo "11,'$file.dmatud' ,'unknown','formatted',0" >> $def breaksw case dmftproj: set exe = $command set dopara = 1 echo $file > $def breaksw case read_vorb_files: if (!(-e $file.vorb$updn && ! -z $file.vorb$updn)) then echo "ERROR: required $file.vorb$updn missing. STOP " exit 6 endif if (!(-e $file.vorb${updn}_Bext && ! -z $file.vorb${updn}_Bext)) then echo "ERROR: required $file.vorb{updn}_Bext missing. STOP " exit 6 endif set exe="read_vorb_files $file.vorb$updn $file.vorb${updn}_Bext" set $def breaksw case orb: if (!(-e $file.inorb && ! -z $file.inorb)) then cp $WIENROOT/SRC_templates/case.inorb $file.inorb echo "default $file.inorb generated from SRC_templates" echo "edit this file and rerun orb" set deffile_only endif set pip set exe = orb set updn_old=$updn{_old} if ( $para == para ) then set pip = '_1' set para endif cat << theend > $def 5,'$file.inorb', 'old', 'formatted',0 6,'$file.outputorb$updn', 'unknown','formatted',0 9,'$file.dmat$dnup', 'unknown','formatted',0 10,'$file.dmat$updn', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 31,'$file.br1orb$updn', 'unknown','unformatted',0 32,'$file.br2orb$updn', 'unknown','unformatted',0 theend if ($?ud) then cat << theend >> $def 11,'$file.dmatud' ,'unknown','formatted',0 12,'$file.vorbud', 'unknown','formatted',0 13,'$file.vorbud_old', 'unknown','formatted',0 14,'$file.energyup$pip', 'unknown','formatted',0 18,'$file.vspup', 'unknown','formatted',0 21,'$file.scforbud', 'unknown','formatted',0 theend else cat << theend >> $def 12,'$file.vorb$updn', 'unknown','formatted',0 13,'$file.vorb${updn}_old', 'unknown','formatted',0 14,'$file.energy$updn$pip', 'unknown','formatted',0 18,'$file.vsp$updn', 'unknown','formatted',0 21,'$file.scforb$updn', 'unknown','formatted',0 50,'$file.eece$updn', 'unknown','formatted',0 theend endif breaksw case hf: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_hf: .machines | grep -v '#' | sed 's/omp_hf://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 set exe = $command$cmplx$para set dopara = 1 if (($updn == '') || ($updn == 'up')) then set ending1 = 'up' set ending2 = '' else set ending1 = 'dn' set ending2 = 'dn' endif if ($nmrhf == 'nmrhf') then set ending3 = '_nmr' set scratchnmrhf=$scratch endif cat << theend > $def 4,'$file.inhf', 'old', 'formatted',0 5,'$file.in0', 'old', 'formatted',0 6,'$file.outputhf$updn', 'unknown','formatted',0 7,'$file.clmsum', 'old', 'formatted',0 8,'$file.clm$ending1', 'unknown','formatted',0 9,'$file.in1$cmplx1$ending3', 'old', 'formatted',0 10,'${scratch}$file.vector$sc$updn', 'old', 'unformatted',9000 11,'$file.vector${sc}hf$so${updn}_old', 'old', 'unformatted',9000 12,'${scratchnmrhf}$file.vector${sc}hf$updn', 'unknown','unformatted',9000 13,'$file.klist_ibz_all', 'old', 'formatted',0 14,'$file.r2v_grr$ending2', 'unknown','formatted',0 15,'$file.klist_fbz', 'old', 'formatted',0 16,'$file.klist_ibz', 'old', 'formatted',0 17,'$file.outputkgenhf', 'old', 'formatted',0 18,'$file.energy${sc}hf$updn', 'unknown','formatted',0 19,'$file.clmcor$updn', 'old', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfhf$updn', 'unknown','formatted',0 22,'$file.inc', 'old', 'formatted',0 23,'$file.corewf$updn', 'old', 'formatted',0 24,'$file.vsp$updn', 'old', 'formatted',0 25,'$file.vsp${updn}_old', 'old', 'formatted',0 26,'$file.weighthf$updn', 'old', 'formatted',0 theend if ($cmplx1 == c) echo "37,'$file.complex','unknown','formatted',0" >>$def if ($so == so) then echo "38,'$file.inso','unknown','formatted',0" >>$def if ($vnonloc == '') then echo "39,'$file.weighthfnoso$updn','old','formatted',0" >>$def endif endif if ($redklist == 'redklist') then echo "40,'$file.klist_rfbz','unknown','formatted',0" >>$def echo "41,'$file.klist_ribz','unknown','formatted',0" >>$def if ($so != 'so') then echo "42,'$file.energy${sc}hf${updn}_rbz','unknown','formatted',0" >>$def endif echo "43,'$file.weighthf${updn}_rbz','unknown','formatted',0" >>$def endif if ($newklist == 'newklist') then echo "44,'$file.klist_fbz_old','unknown','formatted',0" >>$def echo "45,'$file.klist_ibz_old','unknown','formatted',0" >>$def echo "46,'$file.outputkgenhf_old','unknown','formatted',0" >>$def endif if (($redklist == 'redklist') && ($newklist == 'newklist')) then echo "47,'$file.klist_rfbz_old','unknown','formatted',0" >>$def echo "48,'$file.klist_ribz_old','unknown','formatted',0" >>$def endif if ($band1 == '_band') echo "49,'$file.klist_band','unknown','formatted',0" >>$def if ($diaghf == 'diaghf') echo "50,'$file.diaghf','unknown','formatted',0" >>$def if ($nonself == 'nonself') echo "51,'$file.nonself','unknown','formatted',0" >>$def if ($para == 'para') echo "52,'$file.para','unknown','formatted',0" >>$def if ($nmrhf == 'nmrhf') echo "53,'$file.qvec','unknown','formatted',0" >>$def if ($gw == 'gw') echo "54,'$file.gw$updn','unknown','formatted',0" >>$def if ($vnonloc == 'slater') then if ($para != 'para') then echo "55,'$file.r2v_nonloc${ending2}','unknown','formatted',0" >>$def else if ($para == 'para') then echo "55,'$file.r2v_nonlocvv${ending2}','unknown','formatted',0" >>$def echo "56,'$file.r2v_nonlocvc${ending2}','unknown','formatted',0" >>$def echo "57,'$file.r2v_nonloccc${ending2}','unknown','formatted',0" >>$def endif else if ($vnonloc == 'kli') then if ($para != 'para') then echo "58,'$file.r2v_nonloc${ending2}','unknown','formatted',0" >>$def else if ($para == 'para') then echo "58,'$file.r2v_nonlocvv${ending2}','unknown','formatted',0" >>$def echo "59,'$file.r2v_nonlocvc${ending2}','unknown','formatted',0" >>$def echo "60,'$file.r2v_nonloccc${ending2}','unknown','formatted',0" >>$def endif echo "61,'$file.r2v${ending2}','old','formatted',0" >>$def endif if ($modehf == 'mode1') then echo "62,'$file.modehf','unknown','formatted',0" >>$def else if ($modehf == 'mode2') then echo "63,'$file.modehf','unknown','formatted',0" >>$def else if ($modehf == 'mode3') then echo "64,'$file.modehf','unknown','formatted',0" >>$def endif breaksw case averx: set exe = averx set def = averx.def cat << theend > $def 5 ,'$file.inaverx', 'old', 'formatted',0 6 ,'$file.outputaverx', 'unknown','formatted',0 8 ,'$file.scfaverx', 'unknown','formatted',0 9 ,'${scratch}$file.vectordn', 'old', 'unformatted',9000 10 ,'${scratch}$file.vectorup', 'old', 'unformatted',9000 16,'$file.weightaversoup', 'old','formatted',0 18,'$file.vspdn', 'old','formatted',0 19,'$file.vspup', 'old','formatted',0 20 ,'$file.struct', 'old', 'formatted',0 26,'$file.weightaverdn', 'unknown','formatted',0 27,'$file.weightaverup', 'unknown','formatted',0 41,'${scratch}$file.vectorsodn', 'unknown','unformatted',9000 42,'${scratch}$file.vectorsoup', 'unknown','unformatted',9000 43,'${scratch}$file.vectordum', 'unknown','unformatted',9000 44,'$file.vect1', 'unknown','unformatted',9000 theend breaksw case optimize: set exe = optimize touch optimize.job chmod +x optimize.job cat << theend > $def 20,'${file}_initial.struct', 'unknown', 'formatted',0 16,'optimize.job','unknown','formatted',0 17,'$file.struct', 'old', 'formatted',0 theend breaksw case eosfit: set exe = eosfit cat << theend > $def 20,'$file.struct', 'old', 'formatted',0 55,'$file.vol', 'old', 'formatted',0 66,'$file.outputeos', 'unknown','formatted',0 9,'$file.eosfit', 'unknown','formatted',0 11,'$file.eosfitb', 'unknown','formatted',0 13,'$file.eosfitv', 'unknown','formatted',0 15,'$file.eosfitp', 'unknown','formatted',0 theend breaksw case eosfit6: set exe = eosfit6 cat << theend > $def 10,'$file.ene', 'old', 'formatted',0 11,'$file.latparam', 'old', 'formatted',0 12,'$file.enefit', 'unknown','formatted',0 66,'$file.outputeos6', 'unknown','formatted',0 theend breaksw case optic: set exe = $command$cmplx$para if (!(-e $file.inop && ! -z $file.inop)) then cp $WIENROOT/SRC_templates/case.inop $file.inop echo "default $file.inop generated from SRC_templates" echo "edit this file and rerun optic" set deffile_only endif set dopara = 1 cat << theend > $def 4, '${scratch}$file.mommat2$updn' , 'UNKNOWN', 'FORMATTED', 0 5, '$file.inop' , 'OLD', 'FORMATTED', 0 6, '$file.outputop$updn' , 'UNKNOWN', 'FORMATTED', 0 3, '${scratch}$file.symmat$updn' , 'UNKNOWN', 'FORMATTED', 0 13, '${scratch}$file.symma1$updn' , 'UNKNOWN', 'FORMATTED', 0 14, '${scratch}$file.symma2$updn' , 'UNKNOWN', 'FORMATTED', 0 9, '${scratch}$file.mat_diag$updn' , 'UNKNOWN', 'FORMATTED', 0 10,'${scratch}$file.vector$sc$hf$so$updn' , 'OLD', 'UNFORMATTED', 0 11,'${scratch}$file.vector$sc$hf$so$dnup' , 'UNKNOWN' , 'UNFORMATTED' ,0 18,'$file.vsp$updn' , 'OLD', 'FORMATTED', 0 19,'$file.vsp$dnup' , 'UNKNOWN' , 'FORMATTED', 0 20,'$file.struct' , 'OLD', 'FORMATTED', 0 28,'$file.inso' , 'UNKNOWN', 'FORMATTED' , 0 24,'${scratch}$file.mme$updn' , 'UNKNOWN', 'FORMATTED', 0 25,'$file.symop' , 'UNKNOWN', 'FORMATTED', 0 30,'$file.inc', 'UNKNOWN', 'formatted',0 35,'$file.corewf$updn', 'UNKNOWN','formatted',0 36,'$file.corewf$dnup', 'UNKNOWN','formatted',0 40,'$file.pmat$updn', 'UNKNOWN', 'FORMATTED', 0 theend breaksw case nlo_core: set exe = $command cat << theend > $def 3,'$file.mme$updn', 'OLD', 'FORMATTED', 0 4,'$file.klist' , 'OLD','FORMATTED', 0 10,'$file.kgen' , 'OLD','FORMATTED', 0 17,'$file.weight$hf$updn','OLD','FORMATTED', 0 20,'$file.meta$updn' ,'UNKNOWN', 'FORMATTED', 0 21,'$file.innlo_core' ,'OLD', 'FORMATTED', 0 25,'$file.symop' ,'OLD', 'FORMATTED', 0 theend breaksw case nlo_tet: set exe = $command cat << theend > $def 4,'$file.klist' , 'OLD','FORMATTED', 0 10,'$file.kgen' , 'OLD','FORMATTED', 0 17,'$file.innlo_tet', 'OLD','FORMATTED', 0 18,'$file.nlo$updn' ,'UNKNOWN', 'FORMATTED', 0 20,'$file.meta$updn','OLD', 'FORMATTED', 0 theend breaksw case joint: set exe = $command if (!(-e $file.injoint && ! -z $file.injoint)) then cp $WIENROOT/SRC_templates/case.injoint $file.injoint echo "default $file.injoint generated from SRC_templates" echo "edit this file and rerun joint" set deffile_only endif cat << theend > $def 3,'${scratch}$file.symmat$updn' , 'OLD','FORMATTED', 0 4,'$file.weight$hf$updn' , 'OLD','FORMATTED', 0 5,'$file.injoint' , 'OLD','FORMATTED', 0 6,'$file.outputjoint$updn', 'UNKNOWN','FORMATTED', 0 7,'$file.joint$updn' , 'UNKNOWN','FORMATTED', 0 8,'$file.sigma_intra2$updn' , 'UNKNOWN','FORMATTED', 0 9, '${scratch}$file.mat_diag$updn' , 'UNKNOWN', 'FORMATTED', 0 11,'$file.intra2$updn' , 'UNKNOWN','FORMATTED', 0 14,'$file.kgen' , 'OLD','FORMATTED', 0 20,'$file.struct' , 'OLD', 'FORMATTED', 0 23,'${scratch}$file.symma1$updn' , 'UNKNOWN','FORMATTED', 0 24,'${scratch}$file.symma2$updn' , 'UNKNOWN','FORMATTED', 0 33,'$file.joint1$updn' , 'UNKNOWN','FORMATTED', 0 34,'$file.joint2$updn' , 'UNKNOWN','FORMATTED', 0 35,'$file.joint1$dnup' , 'UNKNOWN','FORMATTED', 0 36,'$file.joint2$dnup' , 'UNKNOWN','FORMATTED', 0 40,'$file.xmcd' , 'UNKNOWN','FORMATTED', 0 41,'$file.rawxmcd' , 'UNKNOWN','FORMATTED', 0 98,'$file.raw1' , 'UNKNOWN','FORMATTED', 0 99,'$file.raw2' , 'UNKNOWN','FORMATTED', 0 63,'$file.broad1' , 'UNKNOWN','FORMATTED', 0 64,'$file.broad2' , 'UNKNOWN','FORMATTED', 0 theend breaksw case kram: if (!(-e $file.inkram && ! -z $file.inkram)) then cp $WIENROOT/SRC_templates/case.inkram $file.inkram echo "default $file.inkram generated from SRC_templates" echo "edit this file and rerun kram" set deffile_only endif set exe = $command cat << theend > $def 5,'$file.inkram' , 'OLD','FORMATTED', 0 10,'$file.joint$updn' , 'OLD','FORMATTED', 0 11,'$file.intra$updn' , 'UNKNOWN','FORMATTED', 0 12,'$file.epsilon$updn' , 'UNKNOWN','FORMATTED', 0 13,'$file.sigmak$updn' , 'UNKNOWN','FORMATTED', 0 14,'$file.absorp$updn' , 'UNKNOWN','FORMATTED', 0 15,'$file.eloss$updn' , 'UNKNOWN','FORMATTED', 0 16,'$file.refraction$updn', 'UNKNOWN','FORMATTED',0 17,'$file.reflectivity$updn','UNKNOWN','FORMATTED',0 77,'$file.sumrules$updn' , 'UNKNOWN','FORMATTED', 0 theend breaksw case sumpara: set exe = sumpara set deffile_only cat << theend > $def 6,'$file.outputsum', 'unknown','formatted',0 8,'$file.scfdm$updn', 'unknown','formatted',0 17,'$file.clmval$updn$eece', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scf2${sc}$hf$updn', 'unknown','formatted',0 22,'$file.scf2p', 'unknown','formatted',0 theend if ($?ud) then cat << theend >> $def 10,'$file.dmatup' ,'unknown','formatted',0 11,'$file.dmatdn' ,'unknown','formatted',0 12,'$file.dmatud' ,'unknown','formatted',0 theend else cat << theend >> $def 10,'$file.dmat$updn', 'unknown','formatted',0 theend endif breaksw case sumpara_vresp: set exe = sumpara set deffile_only cat << theend > $def 6,'$file.outputsum', 'unknown','formatted',0 17,'$file.vrespval$updn', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scf2${sc}$hf$updn', 'unknown','formatted',0 22,'$file.scf2p', 'unknown','formatted',0 theend breaksw case sumhfpara: set exe = sumhfpara$cmplx if (($updn == '') || ($updn == 'up')) then set ending = '' else set ending = 'dn' endif if ($nmrhf == 'nmrhf') then set scratchnmrhf=$scratch endif set deffile_only cat << theend > $def 6,'$file.outputhfsum$updn', 'unknown','formatted',0 7,'$file.klist_ibz', 'old', 'formatted',0 8,'${scratchnmrhf}$file.vectorhf$updn','unknown','unformatted',0 9,'$file.energyhf$updn', 'unknown','formatted',0 10,'$file.struct', 'old', 'formatted',0 theend if (($redklist == 'redklist') && ($so != 'so')) echo "11,'$file.klist_ribz' ,'unknown','formatted',0" >>$def if (($redklist == 'redklist') && ($band1 != '_band') && ($nmrhf != 'nmrhf') && ($so != 'so')) echo "12,'$file.energyhf${updn}_rbz','unknown','formatted',0" >>$def if ($band1 == '_band') echo "13,'$file.klist_band' ,'unknown','formatted',0" >>$def if ($nmrhf == 'nmrhf') echo "14,'$file.qvec' ,'unknown','formatted',0" >>$def if ($gw == 'gw') echo "15,'$file.gw$updn' ,'unknown','formatted',0" >>$def if (($vnonloc == 'slater') || ($vnonloc == 'kli')) then echo "16,'$file.r2v_nonlocvv${ending}','unknown','formatted',0" >>$def echo "17,'$file.r2v_nonlocvc${ending}','unknown','formatted',0" >>$def echo "18,'$file.r2v_nonloccc${ending}','unknown','formatted',0" >>$def echo "19,'$file.r2v_nonloc${ending}','unknown','formatted',0" >>$def endif breaksw case lstart: set exe = lstart #touch $file.inst_sigma if ($?sigma) then # if( -z $file.inst_sigma ) then sed "s/ N/ P/" $file.inst >$file.inst_sigma # endif endif cat << theend > $def 6,'$file.outputst', 'unknown','formatted' 11,'$file.vsp_st', 'unknown','formatted' 12,'$file.vspdn_st', 'unknown','formatted' 13,'$file.sigma', 'unknown','formatted' 4,'$file.inq_st', 'unknown','formatted' 14,'$file.in0_st', 'unknown','formatted' 15,'$file.in1_st', 'unknown','formatted' 16,'$file.inc_st', 'unknown','formatted' 17,'$file.in2_ls', 'unknown','formatted' 18,'$file.inm_st', 'unknown','formatted' 19,'$file.inm_restart_st','unknown','formatted' 20,'$file.struct', 'old', 'formatted' theend ## 7,'$file.tmpden', 'unknown','formatted' ##10,'$file.tmp', 'unknown','unformatted' # jdoumont added handles 31,32,41,42 for LDA-half if ($?half) then cat << theend >> $def 81,'$file.rspup_half', 'unknown','formatted' 82,'$file.rspdn_half', 'unknown','formatted' 83,'$file.rsp_half', 'unknown','formatted' 94,'$file.rsigma_half', 'unknown','formatted' 31,'$file.sptup_half', 'unknown','formatted' 32,'$file.sptdn_half', 'unknown','formatted' 41,'$file.potup_half', 'unknown','formatted' 42,'$file.potdn_half', 'unknown','formatted' 5,'$file.inst_half', 'old', 'formatted' theend else cat << theend >> $def 81,'$file.rspup', 'unknown','formatted' 82,'$file.rspdn', 'unknown','formatted' 83,'$file.rsp', 'unknown','formatted' 94,'$file.rsigma', 'unknown','formatted' 31,'$file.sptup', 'unknown','formatted' 32,'$file.sptdn', 'unknown','formatted' 41,'$file.potup', 'unknown','formatted' 42,'$file.potdn', 'unknown','formatted' theend if ($?sigma) then echo " 5,'$file.inst_sigma', 'old', 'formatted'" >>$def else echo " 5,'$file.inst', 'old', 'formatted'" >>$def endif endif breaksw case mini: set exe = mini if !(-e $file.clmvalup || -z $file.clmvalup) then cat << theend > $def 5 ,'$file.inM', 'old','formatted',0 6 ,'$file.outputM', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 10,'$file.clmsum', 'unknown', 'formatted',0 13,'$file.clmhist', 'unknown', 'formatted',0 15,'$file.finM', 'old', 'formatted',0 16,'$file.tmpM', 'unknown','formatted',0 17,'$file.tmpM1', 'unknown','formatted',0 21,'$file.struct1', 'unknown','formatted',0 22,'$file.scf','unknown','formatted',0 23,'$file.scf_mini','unknown','formatted',0 24,'$file.scf_mini1','unknown','formatted',0 25,'$file.constraint','unknown','formatted',0 51,'$file.clmsum_inter', 'unknown', 'formatted',0 theend else cat << theend > $def 5 ,'$file.inM', 'old','formatted',0 6 ,'$file.outputM', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 10,'$file.clmup', 'old', 'formatted',0 60,'$file.clmdn', 'old', 'formatted',0 13,'$file.clmhist', 'unknown', 'formatted',0 15,'$file.finM', 'old', 'formatted',0 16,'$file.tmpM', 'unknown','formatted',0 17,'$file.tmpM1', 'unknown','formatted',0 21,'$file.struct1', 'unknown','formatted',0 22,'$file.scf','unknown','formatted',0 23,'$file.scf_mini','unknown','formatted',0 24,'$file.scf_mini1','unknown','formatted',0 11,'$file.clmsum_inter', 'unknown', 'formatted',0 51,'$file.clmup_inter', 'unknown', 'formatted',0 52,'$file.clmdn_inter', 'unknown', 'formatted',0 theend endif breaksw case mixer_vresp: mixer_vresp: set exe = mixer if !(-e $file.clmvalup || -z $file.clmvalup) then cat << theend > $def 5,'$file.inm_vresp', 'old', 'formatted',0 6,'$file.outputm_vresp', 'unknown','formatted',0 7,'$file.inc', 'old', 'formatted',0 10,'$file.vrespsum_old','unknown','formatted',0 17,'$file.vrespval', 'unknown','formatted',0 18,'$file.vrespsc', 'unknown','formatted',0 19,'$file.vrespcor', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfm_vresp', 'unknown','formatted',0 31,'$file.vrespbroyd1', 'unknown','unformatted',164896 32,'$file.vrespbroyd2', 'unknown','unformatted',164896 51,'$file.vrespsum', 'unknown','formatted',0 theend else cat << theend > $def 5,'$file.inm_vresp', 'old', 'formatted',0 6,'$file.outputm_vresp', 'unknown','formatted',0 7,'$file.inc', 'old', 'formatted',0 10,'$file.vrespup_old','unknown','formatted',0 60,'$file.vrespdn_old','unknown','formatted',0 17,'$file.vrespvalup', 'unknown','formatted',0 18,'$file.vrespscup', 'unknown','formatted',0 19,'$file.vrespcorup', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfm_vresp', 'unknown','formatted',0 31,'$file.vrespbroyd1', 'unknown','unformatted',164896 32,'$file.vrespbroyd2', 'unknown','unformatted',164896 47,'$file.vrespvaldn', 'unknown','formatted',0 48,'$file.vrespscdn', 'unknown','formatted',0 49,'$file.vrespcordn', 'unknown','formatted',0 51,'$file.vrespup', 'unknown','formatted',0 52,'$file.vrespdn', 'unknown','formatted',0 11,'$file.vrespsum', 'unknown','formatted',0 theend endif breaksw case mixer: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_mixer: .machines | grep -v '#' | sed 's/omp_mixer://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 case mixer_New: if($?vresp) goto mixer_vresp # cp case.struct for MSR1a 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 cp $file.struct $file.struct_old endif set exe = $command if !(-e $file.clmvalup || -z $file.clmvalup) then cat << theend > $def 5,'$file.inm', 'old', 'formatted',0 6,'$file.outputm', 'unknown','formatted',0 7,'$file.inc', 'old', 'formatted',0 10,'$file.clmsum_old','unknown','formatted',0 17,'$file.clmval', 'unknown','formatted',0 18,'$file.clmsc', 'unknown','formatted',0 19,'$file.clmcor', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfm', 'unknown','formatted',0 22,'$file.scf', 'unknown','formatted',0 31,'$file.broyd1', 'unknown','unformatted',164896 32,'$file.broyd2', 'unknown','unformatted',164896 51,'$file.clmsum', 'unknown','formatted',0 theend else cat << theend > $def 5,'$file.inm', 'old', 'formatted',0 6,'$file.outputm', 'unknown','formatted',0 7,'$file.inc', 'old', 'formatted',0 10,'$file.clmup_old','unknown','formatted',0 60,'$file.clmdn_old','unknown','formatted',0 17,'$file.clmvalup', 'unknown','formatted',0 18,'$file.clmscup', 'unknown','formatted',0 19,'$file.clmcorup', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfm', 'unknown','formatted',0 22,'$file.scf', 'unknown','formatted',0 31,'$file.broyd1', 'unknown','unformatted',164896 32,'$file.broyd2', 'unknown','unformatted',164896 47,'$file.clmvaldn', 'unknown','formatted',0 48,'$file.clmscdn', 'unknown','formatted',0 49,'$file.clmcordn', 'unknown','formatted',0 51,'$file.clmup', 'unknown','formatted',0 52,'$file.clmdn', 'unknown','formatted',0 11,'$file.clmsum', 'unknown','formatted',0 theend if ($?orb && $eece != 'eece') then echo "71,'$file.dmatup','unknown','formatted',0" >> $def echo "72,'$file.dmatdn','unknown','formatted',0" >> $def echo "73,'$file.dmatud','unknown','formatted',0" >> $def echo "74,'$file.dmatup_old','unknown','formatted',0" >> $def echo "75,'$file.dmatdn_old','unknown','formatted',0" >> $def echo "76,'$file.dmatud_old','unknown','formatted',0" >> $def endif endif if($eece == 'eece') then echo "71,'$file.vorbup','unknown','formatted',0" >> $def echo "72,'$file.vorbdn','unknown','formatted',0" >> $def echo "73,'$file.vorbud','unknown','formatted',0" >> $def echo "74,'$file.vorbup_old','unknown','formatted',0" >> $def echo "75,'$file.vorbdn_old','unknown','formatted',0" >> $def echo "76,'$file.vorbud_old','unknown','formatted',0" >> $def endif if ("$dispersion" == 'dftd3') then echo "80,'.EDISP', 'old','formatted',0" >> $def if ((-e dftd3_gradient) && !(-z dftd3_gradient)) then echo "81,'dftd3_gradient','old','formatted',0" >> $def endif endif breaksw case nn: set exe = nn cat << theend > $def 66,'$file.outputnn','unknown','formatted',0 67,'$file.nnshells','unknown','formatted',0 88,'$file.bva','unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.struct_nn','unknown','formatted',0 theend breaksw case dipan: set exe = dipan cat << theend > $def 5 ,'$file.indipan', 'old','formatted',0 6 ,'$file.outputdipan','unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 66 ,'$file.nn_dipan','unknown','formatted',0 theend breaksw case tetra: set exe = tetra if (!(-e $file.int && ! -z $file.int)) then cp $WIENROOT/SRC_templates/case.int $file.int echo "default $file.int generated from SRC_templates" echo "edit this file or run configure_int_lapw and rerun tetra" set deffile_only endif cat << theend > $def 5 ,'$file.int', 'old','formatted',0 6 ,'$file.outputt$updn','unknown','formatted',0 3 ,'$file.kgen', 'old', 'formatted',0 2 ,'$file.klist', 'unknown', 'formatted',0 7 ,'$file.dos1$updn', 'unknown','formatted',0 57,'$file.dos1ev$updn', 'unknown','formatted',0 theend if($?rxes) echo "8, '$file.rxes$updn', 'old','formatted',0" >>$def if($?rxesw) then echo "9, '$file.rxes$updn', 'unknown','formatted',0" >>$def cp $file.int .oldint sed "2s/.*/$rxese1 0.001 $rxese2 0.0 /" .oldint >$file.int endif if($?enefile) then echo "108 ,'$file.energy$hf$so$updn', 'old','formatted',0" >>$def echo "109 ,'$file.scf2$hf$updn', 'old','formatted',0" >>$def else echo "4 ,'$file.qtl$updn', 'old','formatted',0" >>$def endif breaksw case 3ddens: if (-e .machines && ! -z .machines) then set omp_threads=`grep omp_3ddens: .machines | grep -v '#' | sed 's/omp_3ddens://' | tail -n1` if ("$omp_threads" != '') then setenv OMP_NUM_THREADS $omp_threads else set omp_threads=`grep omp_global: .machines | grep -v '#' | sed 's/omp_global://' | tail -n1` if("$omp_threads" != '') setenv OMP_NUM_THREADS $omp_threads endif if (! $?OMP_NUM_THREADS ) setenv OMP_NUM_THREADS 1 endif if (!(-e $file.in3d && ! -z $file.in3d)) then cp $WIENROOT/SRC_templates/case.in3d $file.in3d echo "Default $file.in3d generated from SRC_templates." echo "Edit this file and rerun 3ddens!" set deffile_only endif if ( $clmtype == 'vcoul' ) set updn = '' set dens_check = `echo $clmtype | cut -c1-3` if ( $dens_check != 'clm' && $updn == 'up' ) then set updn = '' set dnup = 'dn' else if ( $dens_check != 'clm' && $updn == 'dn' ) then set updn = 'dn' set dnup = '' endif set exe = 3ddens set def = 3ddens.def cat << theend > $def 5,'$file.in3d', 'old', 'formatted',0 21,'$file.xsf', 'unknown', 'formatted',0 8,'$file.struct', 'old', 'formatted',0 9,'$file.${clmtype}$updn', 'old', 'formatted',0 11,'$file.${clmtype}$dnup', 'unknown', 'formatted',0 theend if ( $clmtype == 'clmsum' || $clmtype == 'vcoul' ) then sed -i 5d $def cat << theend >> $def 11,'dummyfile', 'unknown', 'formatted',0 theend endif #exit breaksw case lapw5: if (!(-e $file.in5$cmplx && ! -z $file.in5$cmplx)) then cp $WIENROOT/SRC_templates/case.in5 $file.in5$cmplx echo "default $file.in5$cmplx generated from SRC_templates" echo "edit this file and rerun lapw5" set deffile_only endif if ( $clmtype == 'vcoul' ) set updn = '' set dens_check = `echo $clmtype | cut -c1-3` if ( $dens_check != 'clm' && $updn == 'up' ) then set updn = '' set dnup = 'dn' else if ( $dens_check != 'clm' && $updn == 'dn' ) then set updn = 'dn' set dnup = '' endif set exe = lapw5$cmplx cat << theend > $def 5 ,'$file.in5$cmplx', 'old', 'formatted',0 6 ,'$file.output5', 'unknown','formatted',0 8 ,'$file.struct', 'old', 'formatted',0 9 ,'$file.${clmtype}$updn', 'old', 'formatted',0 10,'$file.tmp', 'unknown','unformatted',0 11,'$file.${clmtype}$dnup', 'unknown','formatted',0 12,'$file.sigma', 'unknown','formatted',0 20,'$file.rho_onedim','unknown','formatted',0 21,'$file.rho', 'unknown','formatted',0 theend if ( $clmtype == 'clmsum' || $clmtype == 'vcoul' ) then sed -i "s/11,'$file.${clmtype}$dnup'/11,'dummyfile'/" $def endif if ( $clmtype == 'clmsum' || $clmtype == 'clm' ) then sed -i 's/VAL/TOT/' $file.in5$cmplx else sed -i 's/TOT/VAL/' $file.in5$cmplx endif breaksw case filtvec: set exe = filtvec$cmplx cat << theend > $def 5 ,'$file.inf$cmplx', 'old', 'formatted',0 6 ,'$file.outputf$updn','unknown','formatted',0 10,'${scratch}$file.vector$hf$updn', 'old', 'unformatted',0 12,'$file.vectorf$hf$updn','unknown','unformatted',0 20,'$file.struct', 'old', 'formatted',0 theend breaksw case lapw7: if (!(-e $file.in7$cmplx && ! -z $file.in7$cmplx)) then cp $WIENROOT/SRC_templates/case.in7 $file.in7$cmplx echo "default $file.in7$cmplx generated from SRC_templates" echo "edit this file and rerun lapw7" set deffile_only endif set exe = lapw7$cmplx set vecloc = $scratch; if ($sel == f) set vecloc = cat << theend > $def 2 ,'$file.tmp' 'unknown','formatted',0 5 ,'$file.in7$cmplx', 'old', 'formatted',0 6 ,'$file.output7$updn', 'unknown','formatted',0 7 ,'$file.grid', 'unknown','formatted',0 8 ,'$file.struct', 'old', 'formatted',0 10,'${vecloc}$file.vector$sel$hf$updn','old', 'unformatted',0 12,'$file.abc$updn', 'unknown','unformatted',0 18,'$file.vsp$updn', 'old', 'formatted',0 21,'$file.psink', 'unknown','formatted',0 22,'$file.rho', 'unknown','formatted',0 theend breaksw case lapw3: set exe = $command$cmplx cat << theend > $def 66,'$file.output3', 'unknown','formatted',0 4 ,'$file.in2$cmplx','old', 'formatted',0 8 ,'$file.clmsum', 'old', 'formatted',0 15,'$file.tmp3', 'unknown','unformatted',0 20,'$file.struct', 'old', 'formatted',0 theend breaksw case symmetry: set exe = symmetry cat << theend > $def 66,'$file.outputs','unknown','formatted',0 17,'$file.in2_sy', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.struct_st', 'unknown', 'formatted',0 theend breaksw case symmetso: set exe = symmetso cat << theend > $def 5,'$file.inso', 'old', 'formatted',0 6,'$file.outsymso','unknown','formatted',0 25,'$file.vspdn', 'unknown', 'formatted',0 45,'$file.vspdn_so', 'unknown', 'formatted',0 26,'$file.vspup', 'unknown', 'formatted',0 46,'$file.vspup_so', 'unknown', 'formatted',0 27,'$file.vnsdn', 'unknown', 'formatted',0 47,'$file.vnsdn_so', 'unknown', 'formatted',0 28,'$file.vnsup', 'unknown', 'formatted',0 48,'$file.vnsup_so', 'unknown', 'formatted',0 20,'$file.struct_interm', 'unknown', 'formatted',0 21,'$file.struct_so', 'unknown', 'formatted',0 22,'$file.struct' 'old', 'formatted',0 23,'$file.ksym', 'unknown', 'formatted',0 24,'$file.temp', 'unknown', 'formatted',0 29,'$file.in1$cmplx', 'unknown', 'formatted',0 49,'$file.in1${cmplx}_so', 'unknown', 'formatted',0 30,'$file.inc', 'unknown', 'formatted',0 50,'$file.inc_so', 'unknown', 'formatted',0 31,'$file.inorb', 'unknown', 'formatted',0 51,'$file.inorb_so', 'unknown', 'formatted',0 32,'$file.vorbdn', 'unknown', 'formatted',0 52,'$file.vorbdn_so', 'unknown', 'formatted',0 33,'$file.vorbup', 'unknown', 'formatted',0 53,'$file.vorbup_so', 'unknown', 'formatted',0 34,'$file.in2$cmplx', 'unknown', 'formatted',0 54,'$file.in2${cmplx}_so', 'unknown', 'formatted',0 35,'$file.clmsum', 'unknown', 'formatted',0 55,'$file.clmsum_so', 'unknown', 'formatted',0 36,'$file.clmup', 'unknown', 'formatted',0 56,'$file.clmup_so', 'unknown', 'formatted',0 37,'$file.clmdn', 'unknown', 'formatted',0 57,'$file.clmdn_so', 'unknown', 'formatted',0 38,'$file.indm${cmplx}', 'unknown', 'formatted',0 58,'$file.indm${cmplx}_so', 'unknown', 'formatted',0 42,'$file.dmatup', 'unknown', 'formatted',0 62,'$file.dmatup_so', 'unknown', 'formatted',0 43,'$file.dmatdn', 'unknown', 'formatted',0 63,'$file.dmatdn_so', 'unknown', 'formatted',0 39,'$file.r2v', 'unknown', 'formatted',0 59,'$file.r2v_so', 'unknown', 'formatted',0 40,'$file.r2vdn', 'unknown', 'formatted',0 60,'$file.r2vdn_so', 'unknown', 'formatted',0 71,'$file.vrespsum', 'unknown', 'formatted',0 91,'$file.vrespsum_so', 'unknown', 'formatted',0 72,'$file.vrespup', 'unknown', 'formatted',0 92,'$file.vrespup_so', 'unknown', 'formatted',0 73,'$file.vrespdn', 'unknown', 'formatted',0 93,'$file.vrespdn_so', 'unknown', 'formatted',0 theend breaksw case spaghetti: if (!(-e $file.insp && ! -z $file.insp)) then cp $WIENROOT/SRC_templates/case.insp $file.insp echo "default $file.insp generated from SRC_templates" echo "edit this file, insert proper EF and rerun spaghetti" set deffile_only endif set exe = spaghetti set typ=1 set updnso=$updn if ($hf == hf) then set typ=hf endif if ($so == so) then set typ=so set updnso= endif if($para == para) then set cnum=0 if(-f .processes) then @ cnum=`grep -ce "^[0-9][0-9]* :" .processes` # @ cnum+=1 endif #the original file will only be removed if there are sources to concat if(-f "$file.output$typ$updnso" && $cnum>0) then rm "$file.output$typ$updnso" endif unset irr if(-f "$file.irrep$hf$so${updn}_$cnum" && $cnum>0) then if(-f "$file.irrep$hf$so${updn}" ) rm "$file.irrep$hf$so${updn}" head -2 "$file.irrep$hf$so${updn}_$cnum" >"$file.irrep$hf$so${updn}" set irr endif set count=1 while($count <= $cnum) if($?irr) then tail -n +3 $file.irrep$hf$so${updn}_$count >>$file.irrep$hf$so${updn} endif cat "$file.output$typ${updnso}_$count" >>"$file.output$typ$updnso" @ count++ end echo $file.output$typ$updnso created from $cnum parallel files endif cat << theend > $def 5, '$file.insp', 'old', 'formatted',0 6, '$file.outputsp$updn', 'unknown','formatted',0 9, '$file.qtl$updn', 'unknown','formatted',0 10,'$file.spaghetti${updn}_ene','unknown','formatted',0 11,'$file.spaghetti${updn}_ps', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 30,'$file.irrep$hf$so$updn', 'unknown','formatted',0 40,'$file.bands${updn}.agr', 'unknown','formatted',0 theend #if ($so == so ) then #echo "7, '$file.outputso', 'old','formatted',0" >>$def #else if(! $?enefile) then echo "7, '$file.output$typ$updnso', 'old','formatted',0" >>$def else echo "8, '$file.energy$hf$so$updn', 'old','formatted',0" >>$def endif #endif breaksw case xspec: if (!(-e $file.inxs && ! -z $file.inxs)) then cp $WIENROOT/SRC_templates/case.inxs $file.inxs echo "default $file.in5$cmplx generated from SRC_templates" echo "edit this file and rerun xspec" set deffile_only endif set exe = $command cat << theend > $def 5,'$file.inxs', 'old', 'formatted',0 6,'$file.outputx','unknown','formatted',0 7,'$file.inc', 'old', 'formatted',0 8,'$file.int','unknown','formatted',0 9,'$file.corewfx$updn', 'unknown','formatted',0 18,'$file.vsp$updn', 'old', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 30,'$file.qtl$updn', 'old', 'formatted',0 32,'$file.dos1ev$updn', 'unknown','formatted',0 46,'$file.xspec$updn', 'unknown','formatted',0 47,'$file.txspec$updn', 'unknown','formatted',0 53,'$file.m1$updn', 'unknown','formatted',0 54,'$file.m2$updn', 'unknown','formatted',0 theend breaksw case initxspec: set exe = $command cat << theend > $def 5,'$file.inxs', 'old', 'formatted',0 8,'$file.int','unknown','formatted',0 30,'$file.qtl$updn', 'old', 'formatted',0 theend breaksw case txspec: set exe = $command cat << theend > $def 5,'$file.inxs', 'old', 'formatted',0 6,'$file.outputx','unknown','formatted',0 7,'$file.inc', 'old', 'formatted',0 9,'$file.corewfx$updn', 'unknown','formatted',0 18,'$file.vsp$updn', 'old', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfc$updn', 'unknown','formatted',0 30,'$file.qtl$updn', 'old', 'formatted',0 32,'$file.dos1ev$updn', 'old','formatted',0 47,'$file.txspec$updn', 'unknown','formatted',0 53,'$file.m1$updn', 'unknown','formatted',0 54,'$file.m2$updn', 'unknown','formatted',0 theend breaksw case lorentz: set exe = $command cat << theend > $def 5,'$file.inxs', 'old', 'formatted',0 46,'$file.xspec$updn', 'unknown','formatted',0 47,'$file.txspec$updn', 'old', 'formatted',0 theend breaksw case telnes2: set exe = $command cut -f1 -d' ' $file.innes > .temp_making_elnes.def if (`grep -i xqtl .temp_making_elnes.def` != ) then set number = `head -n 2 $file.innes | tail -n 1` if ($#number > 1) set number = $number[1] else set number = endif cat << theend > $def 3, '$file.kgen','unknown','formatted',0 5, '$file.innes', 'old', 'formatted',0 6, '$file.outputelnes$updn', 'unknown','formatted',0 7, '$file.inc', 'unknown', 'formatted',0 8, '$file.inb','unknown','formatted',0 9, '$file.corewavef$updn', 'unknown','formatted',0 10,'$file.final$updn', 'unknown','formatted',0 18,'$file.vsp$updn', 'unknown', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 30,'$file.qtl$number$updn', 'unknown', 'formatted',0 31,'$file.rotij', 'unknown', 'formatted',0 46,'$file.ortho$updn', 'unknown','formatted',0 47,'$file.elnes$updn', 'unknown','formatted',0 48,'$file.ctr$updn', 'unknown','formatted',0 49,'$file.sdlm$updn', 'unknown','formatted',0 50,'$file.matrix$updn','unknown','formatted',0 56,'$file.cdos$updn','unknown','formatted',0 57,'$file.dos$updn', 'unknown', 'formatted',0 58,'$file.xdos$updn','unknown','formatted',0 59,'$file.sp2$updn','unknown','formatted',0 60,'$file.angular$updn','unknown','formatted',0 theend breaksw ## Remove the section for telnes2 and replace it by: case telnes3: if (!(-e $file.innes && ! -z $file.innes)) then cp $WIENROOT/SRC_templates/case.innes $file.innes echo "default $file.innes generated from SRC_templates" echo "edit this file and rerun telnes3" set deffile_only endif set exe = $command cat << theend > $def 3, '$file.kgen','unknown','formatted',0 5, '$file.innes', 'old', 'formatted',0 6, '$file.outputelnes$updn', 'unknown','formatted',0 7, '$file.inc', 'unknown', 'formatted',0 8, '$file.inb','unknown','formatted',0 9, '$file.corewavef$updn', 'unknown','formatted',0 10,'$file.final$updn', 'unknown','formatted',0 18,'$file.vsp$updn', 'unknown', 'formatted',0 19,'$file.vtotal$updn','unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 30,'$file.qtl$updn', 'unknown', 'formatted',0 31,'$file.rotij', 'unknown', 'formatted',0 46,'$file.ortho$updn', 'unknown','formatted',0 47,'$file.elnes$updn', 'unknown','formatted',0 48,'$file.ctr$updn', 'unknown','formatted',0 49,'$file.sdlm$updn', 'unknown','formatted',0 50,'$file.matrix$updn','unknown','formatted',0 56,'$file.cdos$updn','unknown','formatted',0 57,'$file.dos$updn', 'unknown', 'formatted',0 58,'$file.xdos$updn','unknown','formatted',0 59,'$file.sp2$updn','unknown','formatted',0 60,'$file.angular$updn','unknown','formatted',0 69,'$file.eelstable','unknown','formatted',0 theend breaksw case broadening: if (!(-e $file.inb && ! -z $file.inb)) then cp $WIENROOT/SRC_templates/case.inb $file.inb echo "default $file.inb created, please check" echo "default $file.inb generated from SRC_templates" echo "edit this file and rerun broadening" set deffile_only endif set exe = broadening cat << theend > $def 5,'$file.inb','old','formatted',0 6,'$file.outputbroadening$updn','unknown','formatted',0 46,'$file.broadspec$updn','unknown','formatted',0 theend if($?xspec) then echo "47,'$file.xspec$updn','old','formatted',0">>$def else echo "47,'$file.elnes$updn','old','formatted',0">>$def endif breaksw case hex2rhomb: set exe = $command breaksw case rhomb_in5: set exe = $command breaksw #case veccopy: #if($sc == 's') set ending = 'sc' #set exe = veccopy$cmplx #cat << theend > $def #5, '$file.inveccopy', 'old', 'formatted', 0 #6, '$file.outputveccopy','unknown','formatted', 0 #20,'$file.struct', 'old', 'formatted', 0 #10,'${scratch}$file.vectorup', 'old','unformatted',9000 #30,'${scratch}$file.vectordn', 'unknown','unformatted',9000 #71,'$file.nshup', 'unknown','formatted',0 #81,'$file.nshdn', 'unknown','formatted',0 #theend #breaksw case clmcopy: set ending = 'val' set updn = 'up' if($sc == 's') set ending = 'sc' if( $?Rsum ) set ending = '' #if( $?core ) set ending = 'cor' set exe = clmcopy cat << theend > $def 5, '$file.inclmcopy', 'old', 'formatted', 0 6, '$file.outputclmcopy','unknown','formatted', 0 7, '$file.dmatup', 'unknown','formatted', 0 8, '$file.dmatdn', 'unknown','formatted', 0 20,'$file.struct', 'old', 'formatted', 0 21,'$file.scf2$sc$updn', 'unknown', 'formatted', 0 22,'$file.scf2$sc$dnup', 'unknown', 'formatted', 0 theend if ($?vresp) then echo "17,'$file.vresp$ending$updn$eece', 'old', 'formatted', 0" >>$def echo "18,'$file.vresp$ending$dnup$eece', 'unknown','formatted', 0" >>$def else echo "17,'$file.clm$ending$updn$eece', 'old', 'formatted', 0" >>$def echo "18,'$file.clm$ending$dnup$eece', 'unknown','formatted', 0" >>$def endif breaksw case struct_afm_check: set exe = struct_afm_check cat << theend > $def 5, '$file.inclmcopy', 'old', 'formatted', 0 6, '$file.outputstruct_afm_check','unknown','formatted', 0 20,'$file.struct', 'old', 'formatted', 0 21,'$file.struct_afm_check', 'unknown', 'formatted', 0 theend breaksw case clminter: if ($updn == '' ) set updn = 'sum' set exe = clminter cat << theend > $def 6, '$file.outputclminter','unknown','formatted', 0 17,'$file.clm$updn', 'old', 'formatted', 0 18,'$file.clm${updn}_new', 'unknown','formatted', 0 20,'$file.struct', 'old', 'formatted', 0 21,'$file.struct_new', 'old', 'formatted', 0 theend breaksw case conv2prim: set exe = conv2prim cat << theend > $def 20,'$file.struct','old','formatted',0 21,'${file}_prim.struct','unknown','formatted',0 theend touch conv2prim.error breaksw case struct2poscar: set exe = struct2poscar cat << theend > $def 20,'$file.struct','old','formatted',0 21,'$file.poscar','unknown','formatted',0 22,'$file.xyz','unknown','formatted',0 theend touch struct2poscar.error breaksw case energyrbz: set exe = energyrbz cat << theend > $def 10,'$file.struct','old','formatted',0 11,'$file.klist_ibz','old','formatted',0 12,'$file.klist_ribz','old','formatted',0 13,'$file.energy${hf}${so}${updn}','old','formatted',0 14,'$file.energy${hf}${so}${updn}_rbz','unknown','formatted',0 15,'$file.energy${hf}dum_rbz','unknown','formatted',0 theend touch energyrbz.error breaksw case dftd3: if (!(-e $file.indftd3) || (-z $file.indftd3)) then cp $WIENROOT/SRC_templates/template.indftd3 $file.indftd3 echo "$file.indftd3 created" endif if (!(-e $file.poscar) || (-z $file.poscar)) then x struct2poscar echo "$file.poscar created" endif rm -f $file.scfdftd3 .EDISP dftd3_gradient dftd3_cellgradient dftd3.error set dftd3_abc set line1=`grep -i abc $file.indftd3` if ($#line1 != 0) then if ($line1[2] == 'yes') set dftd3_abc=-abc endif set dftd3_cnthr set dftd3_cnthr_value set line1=`grep -i cnthr $file.indftd3` if ($#line1 != 0) then set dftd3_cnthr=-cnthr set dftd3_cnthr_value=$line1[2] endif set dftd3_cutoff set dftd3_cutoff_value set line1=`grep -i cutoff $file.indftd3` if ($#line1 != 0) then set dftd3_cutoff=-cutoff set dftd3_cutoff_value=$line1[2] endif set dftd3_pbc=-pbc set dftd3_format=poscar set line1=`grep -i pbc $file.indftd3` if ($#line1 != 0) then if ($line1[2] == 'no') then set dftd3_pbc set dftd3_format=xyz endif endif set line1=`grep -i func $file.indftd3` if ($line1[2] == 'default') then set dftd3_func=-func set line2= (`head -1 $file.in0`) if($#line2 < 3) then set line2= ( $line2 none ) endif if (($line2[2] == 24) || (($line2[2] == 'EX_B88') && ("$line2[3]" == 'EC_LYP'))) then set dftd3_func_value=b-lyp else if (($line2[2] == 13) || ($line2[2] == 'XC_PBE') || (($line2[2] == 'EX_PBE') && ("$line2[3]" == 'EC_PBE'))) then set dftd3_func_value=pbe else if (($line2[2] == 'EX_REVPBE') && ("$line2[3]" == 'EC_PBE')) then set dftd3_func_value=revpbe else if (($line2[2] == 16) || (($line2[2] == 'EX_RPBE') && ("$line2[3]" == 'EC_PBE'))) then set dftd3_func_value=rpbe else if (($line2[2] == 19) || ($line2[2] == 'XC_PBESOL') || (($line2[2] == 'EX_PBESOL') && ("$line2[3]" == 'EC_PBESOL'))) then set dftd3_func_value=pbesol else if (($line2[2] == 'EX_B88') && ("$line2[3]" == 'EC_PBE')) then set dftd3_func_value=bpbe else if (($line2[2] == 27) || (($line2[2] == 'EX_TPSS') && ("$line2[3]" == 'EC_TPSS'))) then set dftd3_func_value=tpss else set dftd3_func_value=not_valid endif else if ($line1[2] == 'none') then set dftd3_func set dftd3_func_value if (!(-e ~/.dftd3par.`hostname`) || (-z ~/.dftd3par.`hostname`)) exit(9) else set dftd3_func=-func set dftd3_func_value=$line1[2] endif set dftd3_grad=-grad set line1=`grep -i grad $file.indftd3` if ($#line1 != 0) then if ($line1[2] == 'no') set dftd3_grad endif set dftd3_method=-bj set line1=`grep -i method $file.indftd3` if ($#line1 != 0) then set dftd3_method=-$line1[2] endif set dftd3_num set line1=`grep -i num $file.indftd3` if ($#line1 != 0) then if ($line1[2] == 'yes') set dftd3_num=-num endif set exe = $command $t $bin/$command $file.$dftd3_format $dftd3_pbc $dftd3_method \ $dftd3_func $dftd3_func_value $dftd3_grad $dftd3_abc \ $dftd3_cutoff $dftd3_cutoff_value $dftd3_cnthr $dftd3_cnthr_value \ $dftd3_num | tee $file.scfdftd3 > $file.scfdftd3 if (!(-e $file.scfdftd3) || (-z $file.scfdftd3)) then echo "Error in DFTD3: file case.scfdftd3 is not present" > dftd3.error exit(9) else grep "Edisp /kcal,au,eV:" $file.scfdftd3 | cut -c -43 | cut -c 31- > .EDISP if (!(-e .EDISP) || (-z .EDISP)) then echo "Error in DFTD3: file .EDISP is not present" > dftd3.error exit(9) endif touch dftd3.error endif rm $running exit(0) breaksw case fleur2wien: set exe = fleur2wien cat << theend > $def 5 ,'$file.in2$cmplx','old','formatted',0 6 ,'$file.outputfleur2wien','unknown','formatted',0 20,'$file.struct','old','formatted',0 10,'$file.lattice_harmonics','old','formatted',0 11,'$file.potential','old','formatted',0 12,'$file.r2v','unknown','formatted',0 13,'$file.r2vdn','unknown','formatted',0 theend touch fleur2wien.error breaksw case afminput: set exe = afminput cat << theend > $def 14, '$file.outputafminput', 'unknown','formatted', 0 15, '$file.inclmcopy_st', 'unknown','formatted', 0 16,'$file.clmup', 'old', 'formatted', 0 17,'$file.clmdn', 'old', 'formatted', 0 20,'$file.struct', 'old', 'formatted', 0 21,'$file.struct_supergroup','unknown','formatted', 0 theend breaksw case pes: set exe = pes cat << theend > $def 2, '$WIENROOT/SRC_pes/Crosssections/', 'unknown','formatted',0 4, '$WIENROOT/SRC_pes/Crosssections/cross.txt','old','formatted',0 5, 'pes.template', 'unknown', 'formatted',0 6, 'valence.reconfig', 'unknown', 'formatted',0 7, '$file.outputpes$updn','unknown','formatted',0 8, '$file.dos1ev$updn', 'old', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.outputst', 'old', 'formatted',0 22,'$file.int', 'old', 'formatted',0 30,'$file.pes1$updn', 'unknown','formatted',0 50,'$file.xpscross', 'unknown', 'formatted',0 theend breaksw case irrep: set exe = irrep$para set dopara = 1 cat << theend > $def 5, '$file.irrep$hf$so$updn', 'unknown','formatted',0 6, '$file.outputir$so$updn', 'unknown','formatted',0 9, '${scratch}$file.vector$hf$so$dnup', 'unknown', 'unformatted',9000 10,'${scratch}$file.vector$hf$so$updn', 'old', 'unformatted',9000 20,'$file.struct', 'old', 'formatted',0 theend breaksw case xyz2struct: if (-e $file.xyz ) then xyz2struct <$file.xyz echo "File xyz2struct.struct has been created" exit(0) else echo "You need a xyz-file: $file.xyz " exit(1) endif breaksw case supercell: set exe = supercell cat << theend > $def theend breaksw case plane: if (-e plane.input) then plane $def 4,'$file.inso', 'unknown', 'formatted',0 5,'$file.inq', 'old', 'formatted',0 6,'$file.outputq$updn','unknown','formatted',0 8,'$file.scf2$hf$updn', 'old', 'formatted',0 9,'${scratch}$file.vector$hf$so$updn', 'unknown','unformatted',9000 10,'${scratch}$file.vector$hf$so$dnup', 'unknown','unformatted',9000 12,'$file.dmat$updn', 'unknown','formatted',0 16,'$file.qtl$updn', 'unknown','formatted',0 18,'$file.vsp$updn', 'old', 'formatted',0 19,'$file.vsp$dnup', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.scfq$updn', 'unknown', 'formatted',0 22,'$file.rotlm', 'unknown', 'formatted',0 26,'$file.weight$hf$updn', 'old', 'formatted',9000 29,'$file.tmp$updn','unknown','unformatted',9000 30,'$file.qtltext$updn','unknown','formatted',0 31,'$file.qtlatom$updn','unknown','formatted',0 59,'$file.energy$hf$so$dnup', 'unknown','formatted',0 60,'$file.energy$hf$so$updn', 'unknown','formatted',0 theend ###45,'$file.normsoup','unknown','formatted',0 ###46,'$file.normsodn','unknown','formatted',0 set natom=`head -2 $file.inq | tail -1 | cut -c1-10` set iatom=1 while ($iatom <= $natom) set cf=`expr 31 + $iatom` set int=`expr 70 + $iatom` echo "$cf,'$file.cf$iatom','unknown','formatted',0">>$def echo "$int,'$file.int$iatom$updn','unknown','formatted',0">>$def @ iatom ++ end if ($cmplx == c ) then echo " 7,'$file.in1c', 'unknown', 'formatted',0">>$def endif breaksw case struct2mol: set exe = struct2mol set molf='xtl' cat << theend > $def 2, '$file.$molf', 'unknown', 'formatted',0 20,'$file.struct','old','formatted',0 theend breaksw case struct2cif: set exe = struct2cif cat << theend > $def 6,'$file.output2cif','unknown','formatted',0 31, '$file.cif', 'unknown', 'formatted',0 20,'$file.struct','old','formatted',0 theend breaksw case struct2xyz: set exe = struct2xyz cat << theend > $def 6,'$file.output2xyz','unknown','formatted',0 32, '$file.xyz', 'unknown', 'formatted',0 20,'$file.struct','old','formatted',0 theend breaksw case orbstr: set exe = orbstr cat << theend > $def 6, '$file.outputorbstr', 'unknown', 'formatted',0 8, '$file.inso', 'old', 'formatted',0 20,'$file.struct','old','formatted',0 21,'$file.struct_orbstr','unknown','formatted',0 theend breaksw case aim: set exe = $command$cmplx cat << theend > $def 5 ,'$file.inaim', 'old', 'formatted',0 6 ,'$file.outputaim', 'unknown','formatted',0 8 ,'$file.struct', 'old', 'formatted',0 9 ,'$file.clmsum', 'old', 'formatted',0 21,'$file.surf', 'unknown','formatted',0 22,'$file.crit', 'unknown','formatted',0 77,'$file.aim_surface_errors', 'unknown','formatted',0 theend breaksw case sgroup: set settol1 = `echo "scale = 8; $settol / 10" | bc` set exe = $command $bin/$command -wi $file.struct -set-TOL=$settol $file.outputsgroup $bin/$command -wi $file.struct -set-TOL=$settol1 $file.outputsgroup1 set test=`diff $file.outputsgroup $file.outputsgroup1 |wc` if ( $test[1] != '0' ) then echo "Accuracy problem. Please run with different tolerance (x sgroup -settol $settol1)" endif set def = "-wi $file.struct -wo $file.struct_sgroup -set-TOL=$settol" breaksw case nlo_KK: set exe = $command set def = "-w -i$file.innlo_KK -o$file.KK$updn $file.nlo$updn " breaksw case kzsurf: set exe = $command cat << theend > $def 6 ,'$file.outputkzsurf', 'unknown','formatted',0 20 ,'$file.struct', 'old', 'formatted',0 10 ,'$file.vector$updn', 'old', 'unformatted',0 theend breaksw case pairhess: set exe = pairhess cat << theend > $def 5,'$file.inM','unknown','formatted',0 6,'$file.outputpair','unknown','formatted',0 10,'$file.inpair', 'unknown', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.inM_st', 'unknown', 'formatted',0 22,'$file.hess', 'unknown', 'formatted',0 theend breaksw case eigenhess: set exe = eigenhess cat << theend > $def 5,'$file.inM', 'old', 'formatted',0 6,'$file.outputeigenhess','unknown','formatted',0 10,'.min_hess', 'old', 'formatted',0 11,'.minpair', 'unknown', 'formatted',0 20,'$file.struct', 'old', 'formatted',0 22,'$file.hess', 'unknown', 'formatted',0 23,'$file.ineigenhess', 'unknown', 'formatted',0 theend breaksw case patchsymm: set exe = patchsymm cat << theend > $def 6,'$file.outputpatch','unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 21,'$file.struct_patchsymm', 'unknown', 'formatted',0 theend breaksw case clmcreate: set exe = clmcreate cat << theend > $def 6, '$file.outputcreate','unknown','formatted', 0 17,'$file.clmsum', 'old', 'formatted', 0 18,'$file.clmsum_new', 'unknown','formatted', 0 20,'$file.struct', 'old', 'formatted', 0 21,'$file.increate', 'unknown','formatted', 0 theend breaksw case clmaddsub: set exe = clmaddsub if ($updn == '' ) set updn=sum cat << theend > $def 11,'$file.struct', 'old', 'formatted', 0 12,'old.clm$updn', 'old', 'formatted', 0 13,'old_super.clm$updn', 'old','formatted', 0 14,'new_super.clm$updn', 'old', 'formatted', 0 15,'$file.clm$updn', 'unknown','formatted', 0 theend breaksw case extend_potential: set exe = extend_potential if ($updn == '' ) set updn=sum cat << theend > $def 6, '$file.output_ext_pot', 'unknown', 'formatted', 0 9 ,'$file.vtotal', 'old', 'formatted', 0 18,'$file.vsp_ext_pot', 'unknown','formatted', 0 20,'$file.struct', 'old', 'formatted', 0 49,'$file.vsp', 'unknown','formatted', 0 theend breaksw case arrows: set exe = arrows if($?delta) then cat << theend > $def 6,'$file.outputarrows', 'unknown','formatted', 0 11,'${file}_initial.struct', 'old', 'formatted', 0 12,'${file}_final.struct', 'old', 'formatted', 0 16,'${file}_initial.xsf', 'old','formatted', 0 18,'${file}_delta.xsf', 'unknown','formatted', 0 theend else cat << theend > $def 6,'$file.outputarrows', 'unknown','formatted', 0 10,'${file}_initial.scf', 'old', 'formatted', 0 11,'${file}_initial.struct', 'old', 'formatted', 0 15,'${file}_initial.forces', 'unknown', 'formatted', 0 16,'${file}_initial.xsf', 'old','formatted', 0 17,'${file}_forces.xsf', 'unknown','formatted', 0 theend endif breaksw case cif2struct: set exe = cif2struct set def = $file.cif if($?txt) set def = $file.txt breaksw case afmsim: set exe = afmsim set def = afmsim.def if (!(-e $file.inafmsim) || (-z $file.inafmsim)) then cp $WIENROOT/SRC_templates/template.inafmsim $file.inafmsim echo "$file.inafmsim created" endif cat << theend > $def 5,'$file.inafmsim', 'old', 'formatted',0 10,'$file.xsf', 'old', 'formatted',0 11,'${file}_afmsim.xsf','unknown','formatted',0 theend breaksw case RMTCheck: set exe = RMTCheck$cmplx set RMV = clm if ($?vresp) set RMV = vresp if ($updn == '') then set RSS = val ; if ($?Rsum) set RSS = sum cat << theend > $def 6,'$file.outputRMT', 'unknown','formatted',0 8,'$file.struct', 'old', 'formatted',0 9,'$file.${RMV}$RSS', 'unknown','formatted',0 theend else set RSS = val ; if ($?Rsum) set RSS = '' cat << theend > $def 6,'$file.outputRMT$updn','unknown','formatted',0 8,'$file.struct', 'old', 'formatted',0 9,'$file.${RMV}$RSS$updn', 'unknown','formatted',0 theend endif breaksw case join_vectorfiles: # for backwards-compatibility case joinvec: set exe=joinvec set dopara=1 para=para cat <$def 4,'$file.klist', 'old', 'formatted', 0 5,'$file.in1$cmplx1', 'old', 'formatted', 0 20,'$file.struct', 'old', 'formatted', 0 50,'$file.energy$hf$so$updn', 'old', 'formatted', 0 51,'$file.energy$hf$so$updn', 'unknown','formatted', 0 EOF if (! $?enefile) then cat <>$def 10,'${scratch}$file.vector$sc$hf$so$updn', 'old', 'unformatted',0 11,'$file.vector$sc$hf$so$updn', 'unknown','unformatted',0 EOF endif breaksw ### wien2wannier stuff ### case w2w: set exe = w2w$cmplx$para set suf if ( $para == para ) then set dopara = 1 set suf = _1 endif if ( $so == so && $updn == '' ) then error "w2w: -so is only allowed with -up/-dn" endif set soupdn=$so$updn set w90updn=$updn set vecso = $file.vector$sc$hf$so$suf set vecsoup = {$file.vector$sc$hf$so}up$suf if ( $so == so && \ ( -e $vecso && ! -z $vecso ) && \ ! ( -e $vecsoup && ! -z $vecsoup )) \ then if ( $updn == up ) then set soupdn=so else if ( $updn == dn) then set soupdn=sodn endif set updn= endif unset vecso vecsoup suf cat <$def 5,'$file.inwf$updn', 'old', 'formatted', 0 6,'$file.outputwf$w90updn', 'unknown','formatted', 0 7,'$file.amn$w90updn', 'unknown','formatted', 0 8,'$file.mmn$w90updn', 'unknown','formatted', 0 10,'${scratch}$file.vector$sc$hf$soupdn','old','unformatted',0 11,'$file.nnkp', 'old', 'formatted', 0 12,'$file.eig$updn', 'unknown','formatted', 0 18,'$file.vsp$updn', 'old', 'formatted', 0 20,'$file.struct', 'old', 'formatted', 0 50,'$file.energy$sc$hf$soupdn', 'old', 'formatted', 0 51,'$file.fermi$updn' 'old', 'formatted', 0 EOF breaksw case wplot: set exe = wplot$cmplx$para set soupdn=$updn if ( $so == so ) set soupdn= if ( $para == para ) set dopara=1 set inwplot=$file.inwplot$updn cat <$def 5,'$inwplot', 'old', 'formatted', 0 6,'$file.outputwplot$updn', 'unknown', 'formatted', 0 7,'$file.grid$updn', 'unknown', 'formatted', 0 10,'${scratch}$file.vector$sc$hf$so$updn','old','unformatted',0 18,'$file.vsp$updn', 'old', 'formatted', 0 20,'$file.struct', 'old', 'formatted', 0 21,'$file.psink$updn', 'unknown', 'formatted', 0 22,'$file.psiarg$updn', 'unknown', 'formatted', 0 31,'$file.inwf$updn', 'unknown', 'formatted', 0 32,'$file.chk$soupdn', 'old', 'unformatted', 0 33,'$file.wfrot$soupdn', 'unknown', 'formatted', 0 EOF if (! $?deffile_only) then if (! -e $inwplot || -z $inwplot) then cat <$tmp if ($status == 2) then # new `inwplot' generated mv $inwplot $inwplot.old mv $tmp $inwplot cat <0) then rm "$file.output$typ$updnso" endif set count=1 while($count <= $cnum) cat "$file.output$typ${updnso}_$count" >>"$file.output$typ$updnso" @ count++ end echo $file.output$typ$updnso created from $cnum parallel files endif cat >$def < $file.infind set exe = findbands breaksw case combine_spinfiles: case w2waddsp: true >$def if (( -e $file.mmnup && ! -z $file.mmnup ) ^ \ ( -e $file.mmndn && ! -z $file.mmndn )) then error "w2waddsp: mmn file present for one spin only" endif if (( -e $file.amnup && ! -z $file.amnup ) ^ \ ( -e $file.amndn && ! -z $file.amndn )) then error "w2waddsp: amn file present for one spin only" endif if (! ( -e $file.amnup && ! -z $file.amnup ) && \ ! ( -e $file.mmnup && ! -z $file.mmnup )) then error "w2waddsp: neither mmn nor amn files present -- nothing to do" endif if ( -e $file.mmnup && ! -z $file.mmnup ) then cat >>$def <>$def <$def <$def <>$running $t $bin/$exe $def if($status != 0) then echo "error: command $bin/$exe $def failed" if ($?qtl || $?alm || $?almd || $?qdmft || $?band || $?fermi || $?efg || $?emin1 || $?emax1 ) then if( -e .oldin2 ) mv .oldin2 $file.in2$cmplx endif if ($?rxesw ) then if( -e .oldint ) mv .oldint $file.int endif if (-f $running) rm $running exit(9) endif if ("$exe" == 'pairhess' & $?copy ) then echo .minpair copied cp .minpair .min_hess cp .minpair .minrestart endif set lapw2test=`echo $exe | cut -c 1-5` if("$lapw2test" == 'lapw2') then if ($?qtl || $?alm || $?almd || $?qdmft || $?band || $?fermi || $?efg || $?emin1 || $?emax1 ) then if( -e .oldin2 ) mv .oldin2 $file.in2$cmplx endif if(! $?in1orig & ! $?band & ! $?emin1 & ! $?emax1 & ! $?eece1 & ! $?updn1 ) then # if(! $?in1orig & ! $?band & ! $?emin1 & ! $?emax1 ) then if( -e $file.scf2$sc$updn && ! -z $file.scf2$sc$updn) then if($cmplx == 'c') then if(! (-e $file.in1$cmplx$sc && ! -z $file.in1$cmplx$sc)) set cmplx endif set eferm=`grep ':FER :' $file.scf2$sc$updn|cut -f 2 -d=` set efold=`head -1 $file.in1$cmplx${sc}|cut -c11-17 | sed -e "s/[a-zA-Z(,=]//g"` if($#efold == 0 ) set efold=0.5 #LDM Addition/change set mixf=0.6666666666667 if(! (-e $file.inm && ! -z $file.inm)) then 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') set mixf=0.5 endif # allow for max change of ef-old +- 0.2, pratt mix set eferm=`echo " if ($eferm > $efold + 0.2) {$efold + 0.2} else if($eferm < $efold - 0.2) {$efold - 0.2} else ($eferm*$mixf+$efold*(1-$mixf) ) " | bc -l` # set eferm=`echo " if ($eferm > $efold + 0.2) {$efold + 0.2} \ # else if($eferm < $efold - 0.2) {$efold - 0.2} \ # else ($eferm*$mixf+$efold*(1-$mixf) ) " | bc -l` set modus=`head -1 $file.in1$cmplx${sc} | cut -c1-5` echo "$modus EF=$eferm (WFFIL, WFPRI, ENFIL, SUPWF) " >$file.in1$cmplx${sc}_tmp tail -n +2 $file.in1$cmplx${sc} >> $file.in1$cmplx${sc}_tmp mv $file.in1$cmplx${sc}_tmp $file.in1$cmplx${sc} endif endif endif clear: #cleanup if ($?rxesw ) then if( -e .oldint ) mv .oldint $file.int endif if (-f $running) rm $running exit(0) error: rm $running help: #help exit cat << theend USAGE: $0 PROGRAMNAME [flags] PURPOSE:runs WIEN executables: afminput,afmsim,aim,arrows,broadening,cif2struct, clmaddsub,clmcopy,clminter,convham,conv2prim,dftd3,dipan,dmftproj, dstart,eosfit,eosfit6,filtvec,findbands,fleur2wien,hex2rhomb,hf, initxspec,irrep,joint,joinvec,kgen,kram,nlvdw,lapw0,lapw1,lapw2, lapw3,lapw5,lapw7,lapwdm,lapwso,lcore,lorentz,lstart,mini,mixer,nn, optimize,orb,pairhess,pes,plane,read_vorb_files,rhomb_in5,sgroup,shifteig, spaghetti,struct2cif,struct2poscar,struct_afm_check,sumpara,supercell, symmetry,symmetso,telnes3,tetra,txspec,wannier90,w2w,w2waddsp,wplot,xspec, 3ddens FLAGS: -f FILEHEAD -> FILEHEAD for path of struct & input-files -t/-T -> suppress output of running time -h/-H -> help -d -> create only the def-file -up -> runs up-spin -dn -> runs dn-spin -ud -> runs up/dn-crossterm -sc -> runs semicore calculation -c -> complex calculation (no inversion symmetry present) -p -> run lapw0/1/2/hf/so/dm/optic in parallel (needs .machines or .processes file) -scratch dir/ ->defines (and makes) $SCRATCH variable -half -> run lstart/dstart/lapw0 for DFT-half -grr -> lapw0 for mBJ or hf (using $file.in0_grr) -eece -> for hybrid-functionals (lapw0,lapw2,mixer,orb,sumpara) -band -> for lapw1/2/hf bandstructures: uses *klist_band -orb -> runs lapw1 with LDA+U/OP or B-ext correction, mixer with dmat -it -> runs lapw1 with iterative diagonalization -noHinv -> runs lapw1 with iterative diag. without Hinv -noHinv0 -> runs lapw1 with iterative diag. writing new Hinv -nohns -> runs lapw1 without HNS -nmat_only-> runs lapw1 and yields only the matrixsize -nmr -> runs lapw1 in NMR mode -in1orig -> runs lapw2 but does not modify case.in1 -emin X -> runs lapw2 with EMIN=X (in $file.in2$cmplx1) -all X Y -> runs lapw2 with ALL and E-window X-Y (in $file.in2$cmplx1) -qtl -> runs lapw2 and calculates QTL -alm -> runs lapw2 and calculates ALM,BLM -almd -> runs lapw2 and calculates ALM,BLM in lapw2 for DMFT (Aichhorn) -qdmft -> runs lapw2 and calculates charges including DMFT (Aichhorn) -help_files -> runs lapw2 and creates case.helpXX files -vresp-> for lapw2 and mixer, creates case.vrespval/sum (TAU/meta-GGA) -fermi-> runs lapw2 with FERMI switch -efg -> runs lapw2 with EFG switch -so -> runs lapw2/optic/spaghetti with def-file for spin-orbit calc. -hf -> runs lapw2 with Hartree-Fock/hybrid vectors -diaghf -> calculates only the diagonal elements of HF Hamiltonian -mode1/2/3 -> modes 2 and 3 calculate hf with a better MPI scaling for memory -nonself -> calculates hf with Ex only (no eigenvalues/vectors) -newklist -> HF/hybrid-DFT calculation starting from a different k-mesh -redklist -> HF/hybrid-DFT calculation with reduced k-mesh for the potential -slater-> calculation of the Slater potential by the HF module -kli -> calculation of the KLI potential by the HF module -gllb -> calculation of the GLLB-SC potential -gw -> write in case.gw the diagonal matrix elements of the HF/hybrid Hamiltonian for GW -fbz -> runs kgen and generates a full mesh in the BZ -fft -> runs dstart only up to case.in0_std creation -super-> runs dstart and creates new_super.clmsum (and not $file.clmsum) -lcore-> runs dstart with $file.rsplcore (produces $file.clmsc) -val -> runs lapw5/3ddens with normalization factor for files case.clmval,vtotal,vcoul,r2v -tot -> runs lapw5/3ddens with normalization factor for files case.clmsum -pot -> runs lapw5/3ddens with vtotal-files as input -coulomb -> runs lapw5/3ddens with vcoul-file as input -exchange -> runs lapw5/3ddens with r2v-files as input -halfr2v -> runs lapw5/3ddens with r2v_half-files as input -sel -> use reduced vector file in lapw7 -settol 0.000x -> run sgroup with different tolerance -sigma-> run lstart with case.inst_sigma (autogenerated) for diff.dens. -dftd3 -> run mixer with dftd3 forces -nlvdw -> run lapw0 with -nlvdw flag (adding the vdW-potential) -rxes-> run tetra using case.rxes weight file for RXES-spectroscopy. -rxesw E1 E2-> run tetra and create case.rxes file for RXES for energies E1-E2 -enefile -> spaghetti+tetra with case.energy instead case.qtl (only tot-DOS) joinvec: only join case.energy_* files -delta-> run arrows program with difference between two structures -copy -> runs pairhess and copies .minpair to .minrestart and .minhess -telnes -> run qtl after generating case.inq based on case.innes -xspec -> run broadening with case.xspec instead of case.elnes -txt -> runs cif2struct using case.txt (see UG) -pp -> run wannier90 in "preprocessing mode" -wf N -> run wplot for Wannier function N -efermi EF -> run findbands (unit:Ryd) / shifteig (unit:eV) with Fermi energy EF -emax Y -> for findbands theend if !($?command) then set command endif switch ($command) case afminput: echo 'x afminput' breaksw case afmsim: echo 'x afmsim' breaksw case aim: echo 'x aim [-c]' breaksw case arrows: echo 'x arrows |-delta] ' breaksw case broadening: echo 'x broadening |-xspec -up/dn] ' breaksw case cif2struct: echo 'x cif2struct [-txt]' case clmaddsub: echo 'x clmaddsub |-up/dn]' case clmcopy: echo 'x clmcopy' breaksw case clminter: echo 'x clminter |-up/dn]' breaksw case conv2prim: echo 'x conv2prim' breaksw case struct2poscar: echo 'x struct2poscar' breaksw case dftd3: echo 'x dftd3' breaksw case dipan: echo 'x dipan' breaksw case dmftproj: echo 'x dmftproj ' breaksw case dstart: echo 'x dstart [-up/-dn -fft -super -lcore -half -p]' breaksw case eosfit: echo 'x eosfit' breaksw case eosfit6 echo 'x eosfit6' breaksw case fleur2wien: echo 'x fleur2wien' breaksw case initxspec: echo 'x initxspec [-up/-dn]' breaksw case irrep: echo 'x irrep [-so -up/-dn -p -hf -scratch dir]' breaksw case joint: echo 'x joint [-up/-dn -hf -scratch dir]' breaksw #case join_vectorfiles: #echo 'x join_vectorfiles [-up/-dn/-so/soup/-sodn] [-c] case number_of_parallel_files' #breaksw case kgen: echo 'x kgen [-so -fbz -hf] (-so switch does not add inversion )' breaksw case kram: echo 'x kram [-up/-dn]' breaksw case lapw0: echo 'x lapw0 [-p -eece -grr -nlvdw -half]' breaksw case lapw1: #echo 'x lapw1 [-c -up/-dn -it -noHinv -noHinv0 -p -nohns -orb -band -nmat_only -nmr -scratch dir]' # JH commented echo 'x lapw1 [-c -up/-dn -it -noHinv -noHinv0 -p -nohns -orb -band -nmat_only -nmr -scratch dir -lom10]' #JH added breaksw case lapw2: echo 'x lapw2 [-c -up/-dn -p -so -orb -qtl -alm -almd -qdmft -fermi -efg -hf -redklist -band -eece -vresp -in1orig -help_files -emin X -all X Y -scratch dir ]' breaksw case hf: echo 'x hf [-c -up/-dn -p -band -diaghf -gw -mode1/2/3 -nonself -newklist -redklist -slater -kli -nmrhf -scratch dir]' breaksw case lapw3: echo 'x lapw3 ' breaksw case lapw5: echo 'x lapw5 [ -up/-dn -val/-tot -pot/-coulomb/-exchange/-halfr2v ]' breaksw case 3ddens: echo 'x 3ddens [ -up/-dn -val/-tot -pot/-coulomb/-exchange/-halfr2v ]' breaksw case filtvec: echo 'x filtvec [-c -up/-dn -hf -scratch dir ]' breaksw case lapw7: echo 'x lapw7 [-c -up/-dn -sel -hf -scratch dir]' breaksw case lapwdm: echo 'x lapwdm [ -up -p -c -hf -scratch dir]' breaksw case lapwso: echo 'x lapwso [ -up -p -c -orb -scratch dir ]' breaksw case lcore: echo 'x lcore [-up/-dn]' breaksw case lorentz: echo 'x lorentz [-up/-dn]' breaksw case lstart: echo 'x lstart [-sigma -half]' breaksw case mini: echo 'x mini' breaksw case mixer: echo 'x mixer [-eece -orb -dftd3 -vresp]' breaksw case nn: echo 'x nn' breaksw case nlvdw: echo 'x nlvdw [-p]' breaksw case optic: echo 'x optic [-c -up/-dn -so -p -hf -scratch dir]' breaksw case optimize: echo 'x optimize' breaksw case read_vorb_files: echo 'x read_vorb_files [ -up/-dn ]' breaksw case orb: echo 'x orb [ -up/-dn/-ud -eece]' breaksw case pairhess: echo 'x pairhess [-copy]' breaksw case pes: echo 'x pes [-up/-dn]' breaksw case plane: echo 'x plane ( needs plane.input, see head $WIENROOT/SRC_trig/plane.f )' breaksw case qtl: echo 'x qtl [ -up/-dn -so -p -telnes -hf -scratch dir]' breaksw case sgroup: echo 'x sgroup [-settol 0.000x] (try 0.001 - 0.0000001)' breaksw case spaghetti: echo 'x spaghetti [-up/-dn -so -p -hf -enefile]' breaksw case struct2cif: echo 'x struct2cif ' breaksw case struct_afm_check: echo 'x struct_afm_check ' breaksw case sumpara: echo 'x sumpara -d [-up/-dn/-ud -eece] and than ' echo 'sumpara [up/dn]sumpara.def #_of_processors' breaksw case supercell: echo 'x supercell' breaksw case symmetry: echo 'x symmetry' breaksw case symmetso: echo 'x symmetso [-c]' breaksw case tetra: echo 'x tetra [-up/-dn -rxes -rxesw E1 E2 -hf -enefile -so]' breaksw case txspec: echo 'x txspec [-up/-dn]' breaksw case xspec: echo 'x xspec [-up/-dn]' breaksw case telnes3: echo 'x telnes3 [-up/-dn -hf]' breaksw case RMTCheck: echo 'x RMTCheck [-up/dn -vresp -sum]' echo '-up/dn flags as normal' echo '-vresp to analyze this' echo '-sum to analyze total density rather than just valence' breaksw ### w2w stuff ### case w2w: echo 'x w2w [-up/-dn -c -so -p]' breaksw case wplot: echo 'x wplot [-up/-dn -c -so -p -wf N]' breaksw case find_bands: case findbands: echo 'x findbands (-emin e -emax E | -all e E) [-up/-dn -so -hf -efermi EF]' breaksw case join_vectorfiles: case joinvec: echo 'x joinvec [-up/-dn -so -enefile]' breaksw case combine_spinfiles: case w2waddsp: echo 'x w2waddsp' breaksw case wannier90: echo 'x wannier90 [-up/-dn -so] | -pp' breaksw case shift_energy: case shifteig: echo 'x shifteig [-up/-dn] -efermi EF' breaksw case convert_hamiltonian: case convert_Hamiltonian: case convham: echo 'x convham [-band]' breaksw ### end w2w ### default: echo 'USE: x -h PROGRAMNAME for valid flags for a specific program' breaksw endsw if (-e $running) rm $running exit(1)