#PBS -l nodes=7:ppn=12 #PBS -V TOTAL_PROCS=84 #************************************ # * # CALCULATION OF WANNIER FUNCTION * # * #************************************ cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname EXAMPLE_DIR=/home2/soumya/qe-6.3/TEST/122/20P_ortho # check whether echo has the -e option if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi # set the needed environment variables . /home2/soumya/qe-6.3/environment_variables_$TOTAL_PROCS # required executables and pseudopotentials BIN_LIST="pw.x dos.x projwfc.x kvecs_FS.x bands_FS.x bands.x fs.x wannier90.x pw2wannier90.x postw90.x wannier_ham.x" # ----------- RESULT DIR --------------------------- # result directory for DIR in "$TMP_DIR" "$EXAMPLE_DIR/wresult1" ; do if test ! -d $DIR ; then mkdir $DIR fi done cd $EXAMPLE_DIR/wresult1 # ----------- RESULT DIR --------------------------- # how to run executables PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX" DOS_COMMAND="$PARA_PREFIX $BIN_DIR/dos.x $PARA_POSTFIX" PROJWFC_COMMAND="$PARA_PREFIX $BIN_DIR/projwfc.x $PARA_POSTFIX" BANDS_COMMAND="$PARA_PREFIX $BIN_DIR/bands.x $PARA_POSTFIX" FS_COMMAND="$BIN_DIR/fs.x " WAN_COMMAND="$BIN_DIR/wannier90.x" PW2WAN_COMMAND="$PARA_PREFIX $BIN_DIR/pw2wannier90.x $PARA_POSTFIX" POSTW90_COMMAND="$PARA_PREFIX $BIN_DIR/postw90.x $PARA_POSTFIX" HAM_COMMAND="$BIN_DIR/wannier_ham.x" $ECHO $ECHO " running pw.x as: $PW_COMMAND" $ECHO " running dos.x as: $DOS_COMMAND" $ECHO " running projwfc.x as: $PROJWFC_COMMAND" $ECHO " running gnuplot as: $GP_COMMAND" $ECHO " running bands.x as: $BANDS_COMMAND" $ECHO " running fs.x as: $FS_COMMAND" $ECHO " running wannier90.x as : $WAN_COMMAND" $ECHO " running pw2wannier90.x as: $PW2WAN_COMMAND" $ECHO " running postw90.x as: $POSTW90_COMMAND" $ECHO " running wannier_ham.x as: $HAM_COMMAND" $ECHO ## =================================================== NAME='Ba22' PREFIX='122' Ecut=65 Erho=520 PSEUDO_DIR=/home2/soumya/qe-6.3/PSEUDO/QE_Special/Psilibrary-USPP-PBE ## =================================================== #***************************************************** # running self-consistent calculation #***************************************************** cat > $NAME.scf << EOF &control calculation='scf' restart_mode='from_scratch', pseudo_dir ='$PSEUDO_DIR' outdir='./' prefix='$PREFIX' verbosity='high' wf_collect = .true. / &system ibrav=0, nat=5, ntyp=3, occupations='smearing', smearing='gaussian', degauss=0.01, ecutwfc = $Ecut, ecutrho = $Erho, ! nosym = .true. / &electrons electron_maxstep=1000 mixing_mode='plain' mixing_beta = 0.5, startingwfc='random', conv_thr = 1.0d-8 diagonalization = 'david' ! diago_full_acc = .true. / ATOMIC_SPECIES Ba 137.327 Ba.pbe-spn-rrkjus_psl.1.0.0.UPF Fe 55.845 Fe.pbe-spn-rrkjus_psl.1.0.0.UPF As 74.922 As0.8P0.2-uspp-pbe.UPF CELL_PARAMETERS (angstrom) 0.0000000 2.7871000 6.4726500 2.8073000 0.0000000 6.4726500 2.8073000 2.7871000 0.0000000 ATOMIC_POSITIONS (crystal) Fe 0.250000 0.250000 0.250000 Fe -0.250000 -0.250000 -0.250000 As 0.353800 0.353800 -0.353800 As -0.353800 -0.353800 0.353800 Ba 0.000000 0.000000 0.000000 K_POINTS (automatic) 16 16 6 0 0 0 EOF $ECHO " running scf calculation ..\c" $PW_COMMAND < $NAME.scf > scf.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of self-consistent calculation #------------------------------------------------------------------------------------------ #***************************************************** # running non self-consistent calculation #***************************************************** cat > $NAME.nscf-wan << EOF &control calculation='nscf' restart_mode='from_scratch', pseudo_dir ='$PSEUDO_DIR' outdir='./' prefix='$PREFIX' verbosity='high' wf_collect = .true. / &system ibrav=0, nat=5, ntyp=3, occupations='smearing', smearing='gaussian', degauss=0.01, ecutwfc = $Ecut, ecutrho = $Erho, nosym = .true. / &electrons electron_maxstep=1000 mixing_mode='plain' mixing_beta = 0.5, startingwfc='random', conv_thr = 1.0d-8 diagonalization = 'david' ! diago_full_acc = .true. / ATOMIC_SPECIES Ba 137.327 Ba.pbe-spn-rrkjus_psl.1.0.0.UPF Fe 55.845 Fe.pbe-spn-rrkjus_psl.1.0.0.UPF As 74.922 As0.8P0.2-uspp-pbe.UPF CELL_PARAMETERS (angstrom) 0.0000000 2.7871000 6.4726500 2.8073000 0.0000000 6.4726500 2.8073000 2.7871000 0.0000000 ATOMIC_POSITIONS (crystal) Fe 0.250000 0.250000 0.250000 Fe -0.250000 -0.250000 -0.250000 As 0.353800 0.353800 -0.353800 As -0.353800 -0.353800 0.353800 Ba 0.000000 0.000000 0.000000 K_POINTS crystal 1440 0.00000000 0.00000000 0.00000000 6.944444e-04 0.00000000 0.00000000 0.10000000 6.944444e-04 ... EOF $ECHO " running nscf calculation ..\c" $PW_COMMAND < $NAME.nscf-wan > nscf-wan.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of non self-consistent calculation #------------------------------------------------------------------------------------------ #***************************************************** # band structure calculation along IBZ #***************************************************** cat > $NAME-wan.bands << EOF &control calculation='bands' restart_mode='from_scratch', pseudo_dir ='$PSEUDO_DIR' outdir='./' prefix='$PREFIX' verbosity='high' wf_collect = .true. / &system ibrav=0, nat=5, ntyp=3, occupations='smearing', smearing='gaussian', degauss=0.01, ecutwfc = $Ecut, ecutrho = $Erho, nosym = .true. / &electrons electron_maxstep=1000 mixing_mode='plain' mixing_beta = 0.5, startingwfc='random', conv_thr = 1.0d-8 diagonalization = 'david' diago_full_acc = .true. / ATOMIC_SPECIES Ba 137.327 Ba.pbe-spn-rrkjus_psl.1.0.0.UPF Fe 55.845 Fe.pbe-spn-rrkjus_psl.1.0.0.UPF As 74.922 As0.8P0.2-uspp-pbe.UPF CELL_PARAMETERS (angstrom) 0.0000000 2.7871000 6.4726500 2.8073000 0.0000000 6.4726500 2.8073000 2.7871000 0.0000000 ATOMIC_POSITIONS (crystal) Fe 0.250000 0.250000 0.250000 Fe -0.250000 -0.250000 -0.250000 As 0.353800 0.353800 -0.353800 As -0.353800 -0.353800 0.353800 Ba 0.000000 0.000000 0.000000 K_POINTS crystal 401 0.000000 0.000000 0.000000 1.0 ... EOF $ECHO " running bands calculation ..\c" #$PW_COMMAND < $NAME-wan.bands > wan-bands.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of band calculation #------------------------------------------------------------------------------------------ #***************************************************** # band structure data extraction #***************************************************** cat > $NAME.band << EOF &BANDS filband= '$NAME.wan-band.dat' prefix = '$PREFIX' outdir = './' / EOF $ECHO "performing symmetry analysis of bands ..\c" #$BANDS_COMMAND < $NAME.band > band.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of data extraction #------------------------------------------------------------------------------------------ #***************************************************** # Wannier90 postprocessing #***************************************************** cat > $NAME.win << EOF num_bands = 31 num_wann = 10 write_hr = .true. write_xyz = .true. write_tb = .true. translate_home_cell = False num_iter = 500 dis_win_min = -1.0 dis_win_max = 14.8 dis_froz_min = 9.37 dis_froz_max = 12.77 dis_num_iter = 500 dis_mix_ratio = 0.6 length_unit = ang iprint = 5 write_hr_diag = .true. #search_shells = 600 kmesh_tol=0.00001 #devel_flag=kmesh_degen begin atoms_frac Fe 0.250000 0.250000 0.250000 Fe -0.250000 -0.250000 -0.250000 As 0.353800 0.353800 -0.353800 As -0.353800 -0.353800 0.353800 Ba 0.000000 0.000000 0.000000 end atoms_frac begin unit_cell_cart ang 0.0000000 2.7871000 6.4726500 2.8073000 0.0000000 6.4726500 2.8073000 2.7871000 0.0000000 end unit_cell_cart begin projections Fe:d end projections !! To plot the WF interpolated bandstructure !restart = plot bands_plot = true begin kpoint_path G 0.00000 0.00000 0.00000 X 0.50000 0.00000 -0.00000 X 0.50000 0.00000 -0.00000 G 0.00000 0.00000 0.00000 G 0.00000 0.00000 0.00000 Y 0.00000 0.50000 0.00000 Y 0.00000 0.50000 0.00000 G 0.00000 0.00000 0.00000 end kpoint_path !!Use Wannier interpolation to obtain the Fermi surface. Add the following keywords to the .win file: !!restart = plot fermi_energy = 11.0576 fermi_surface_plot = true !! To plot the WF interpolated density of states !restart = plot dos = true dos_kmesh = 25 dos_energy_min = -20.0 dos_energy_max = 20.0 dos_energy_step = 0.02 adpt_smr = .false. smr_fixed_en_width = 0.08 dos_project = 1,6 !!Plot the MLWFs !restart = plot wannier_plot = true !wannier_plot_list = 2 wannier_plot_supercell = 3 !!Visualise them using XCrySDen, e.g., xcrysden --xsf silicon_00001.xsf mp_grid = 12 12 10 begin kpoints 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.10000000 ... end kpoints EOF $ECHO " running wannier90 -pp for $NAME...\c" $WAN_COMMAND -pp $NAME check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of post processing calculation #------------------------------------------------------------------------------------------ #***************************************************** # run pw2wannier90 to get overlap matrices #***************************************************** cat > $NAME.pw2wan << EOF &inputpp outdir = './' prefix = '$PREFIX' seedname = '$NAME' write_amn = .true. write_mmn = .true. write_unk = .true. reduce_unk = .true. / EOF $ECHO " running pw2wannier90 for $NAME...\c" $PW2WAN_COMMAND < $NAME.pw2wan > pw2wan.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of pw2wannier calculation #------------------------------------------------------------------------------------------ #***************************************************** # run Wannier90 to obtain MLWFs #***************************************************** $ECHO " running wannier90 for $NAME...\c" $WAN_COMMAND $NAME check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of MLWFs calculation #------------------------------------------------------------------------------------------ #********************************************************************************************* # running Wannier interpolated DOS calculation #********************************************************************************************* $ECHO " running postw90 for $NAME...\c" #/home2/espresso/qe-6.3/bin/postw90.x $NAME.win check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of DOS calculation #------------------------------------------------------------------------------------------ rm *UNK* *.amn *.mmn