#PBS -l nodes=8:ppn=12 #PBS -V TOTAL_PROCS=96 #************************************************************ # * # CALCULATION OF PHONON DISPERSION AND RAMAN SPECTROSCOPY * # * #************************************************************ cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname EXAMPLE_DIR=/home2/soumya/qe-6.3/TEST/1144/CaK/phonon # 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 # ----------- RESULT DIR --------------------------- # result directory for DIR in "$TMP_DIR" "$EXAMPLE_DIR/PHONON" ; do if test ! -d $DIR ; then mkdir $DIR fi done cd $EXAMPLE_DIR/PHONON # ----------- RESULT DIR --------------------------- # how to run executables PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX" $ECHO " running pw.x as: $PW_COMMAND" PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX" $ECHO " running ph.x as: $PH_COMMAND" Q2R_COMMAND="$PARA_PREFIX $BIN_DIR/q2r.x $PARA_POSTFIX" $ECHO " running q2r.x as: $Q2R_COMMAND" MATDYN_COMMAND="$PARA_PREFIX $BIN_DIR/matdyn.x $PARA_POSTFIX" $ECHO " running matdyn.x as: $MATDYN_COMMAND" PLOTBAND_COMMAND="$BIN_DIR/plotband.x " $ECHO " running plotband.x as: $PLOTBAND_COMMAND" $ECHO # check for gnuplot GP_COMMAND=`which gnuplot 2>/dev/null` if [ "$GP_COMMAND" = "" ]; then $ECHO $ECHO "gnuplot not in PATH" $ECHO "Results will not be plotted" fi ## =================================================== NAME='CaK' PREFIX='1144' Ecut=60 Erho=480 PSEUDO_DIR=/home2/soumya/qe-6.3/PSEUDO/QE_Special/Psilibrary-USPP-PBE ## =================================================== # -------------------------------- # self-consistent calculation | # -------------------------------- cat > $NAME.scf.in << EOF &control calculation='scf' restart_mode='from_scratch', pseudo_dir ='$PSEUDO_DIR' outdir='./' prefix='$PREFIX' verbosity='high' wf_collect = .true. / &system ibrav = 6, celldm(1)=7.305, celldm(3) = 3.315, nat= 10, ntyp= 4, occupations='smearing', degauss=0.01 nspin=1 ecutwfc = $Ecut, ecutrho = $Erho, / &electrons electron_maxstep = 1000 conv_thr = 1.0D-8 mixing_mode = 'plain' mixing_beta = 0.5 diagonalization = 'david' / ATOMIC_SPECIES Fe 55.845 Fe.pbe-spn-rrkjus_psl.0.2.1.UPF !Fe 55.845 Fe.pbe-spn-rrkjus_psl.1.0.0.UPF As 74.922 As.pbe-n-rrkjus_psl.0.2.UPF !As 74.922 As.pbe-n-rrkjus_psl.1.0.0.UPF Ca 40.078 Ca.pbe-spn-rrkjus_psl.1.0.0.UPF K 39.098 K.pbe-spn-rrkjus_psl.1.0.0.UPF ATOMIC_POSITIONS (crystal) Fe 0.000000 0.500000 0.224600 Fe -0.500000 0.000000 0.224600 Fe 0.000000 0.500000 -0.224600 Fe 0.500000 0.000000 -0.224600 As 0.000000 0.000000 0.333600 As 0.000000 0.000000 -0.333600 As 0.500000 0.500000 0.119300 As -0.500000 0.500000 -0.119300 Ca 0.000000 0.000000 0.000000 K 0.500000 0.500000 0.500000 K_POINTS (automatic) 18 18 6 0 0 0 EOF $ECHO " running the SCF for $NAME...\c" #$PW_COMMAND < $NAME.scf.in > $NAME.scf.out check_failure $? $ECHO " done" # ******************************** # PHONON DISPERSION # # ******************************** # ---------------------------------------------------- # self-consistent phonon dispersion relations | # ---------------------------------------------------- cat > $NAME.ph.in << EOF Phonons on a grid for $NAME &inputph prefix='$PREFIX', verbosity="high" outdir='./' tr2_ph=1.0d-14, !Threshold for self-consistency alpha_mix(1)=0.05 !max_seconds=1.15d6 recover=.true. epsil=.false., !for dielectric constant epsilon ldisp=.true. !for direct calculation of the entire phonon dispersion trans=.true., !for phonon calculation fildvscf = 'dvscf', electron_phonon = 'simple' !method of calculation simple/interpolated el_ph_sigma = 0.005, !spacing between double-delta smearing values el_ph_nsigma = 10 !number of double-delta smearing values fildyn='$NAME.dmat' !File where the dynamical matrix is written amass(1)=55.845, !Atomic mass [amu] of each atomic type amass(2)=74.922, amass(3)=40.078, amass(4)=39.098, nq1=3 !Parameters of the Monkhorst-Pack grid (no offset) nq2=3 nq3=1 start_q=3 last_q=3 / EOF $ECHO " running phonon calculation of $NAME...\c" $PH_COMMAND < $NAME.ph.in > $NAME.ph_q3.out check_failure $? $ECHO " done" # ---------------------------------------------- # Calculation of interatomic force constants | #----------------------------------------------- cat > $NAME.q2r.in << EOF &input fildyn='$NAME.dmat', zasr='simple', flfrc='$NAME.fc' !output file contains interatomic force constant la2F=.true. / EOF $ECHO " running q2r of $NAME...\c" $Q2R_COMMAND < $NAME.q2r.in > q2r.out check_failure $? $ECHO " done" # ------------------------------------- # phonon dispersion with dynmat.x | # ------------------------------------- cat > $NAME.dm.in << EOF &input asr='simple', amass(1)=55.845, !Atomic mass [amu] of each atomic type amass(2)=74.922, amass(3)=40.078, amass(4)=39.098, flfrc='$NAME.fc', !file contains interatomic force constant flfrq='$NAME.freq' !output file contains phonon frequency , la2F=.true., dos=.false. / 101 0.5000000000 0.0000000000 0.0000000000 1.0 0.4750000000 0.0000000000 0.0000000000 1.0 0.4500000000 0.0000000000 0.0000000000 1.0 0.4250000000 0.0000000000 0.0000000000 1.0 0.4000000000 0.0000000000 0.0000000000 1.0 0.3750000000 0.0000000000 0.0000000000 1.0 0.3500000000 0.0000000000 0.0000000000 1.0 0.3250000000 0.0000000000 0.0000000000 1.0 0.3000000000 0.0000000000 0.0000000000 1.0 0.2750000000 0.0000000000 0.0000000000 1.0 0.2500000000 0.0000000000 0.0000000000 1.0 0.2250000000 0.0000000000 0.0000000000 1.0 0.2000000000 0.0000000000 0.0000000000 1.0 0.1750000000 0.0000000000 0.0000000000 1.0 0.1500000000 0.0000000000 0.0000000000 1.0 0.1250000000 0.0000000000 0.0000000000 1.0 0.1000000000 0.0000000000 0.0000000000 1.0 0.0750000000 0.0000000000 0.0000000000 1.0 0.0500000000 0.0000000000 0.0000000000 1.0 0.0250000000 0.0000000000 0.0000000000 1.0 0.0000000000 0.0000000000 0.0000000000 1.0 0.0000000000 0.0250000000 0.0000000000 1.0 0.0000000000 0.0500000000 0.0000000000 1.0 0.0000000000 0.0750000000 0.0000000000 1.0 0.0000000000 0.1000000000 0.0000000000 1.0 0.0000000000 0.1250000000 0.0000000000 1.0 0.0000000000 0.1500000000 0.0000000000 1.0 0.0000000000 0.1750000000 0.0000000000 1.0 0.0000000000 0.2000000000 0.0000000000 1.0 0.0000000000 0.2250000000 0.0000000000 1.0 0.0000000000 0.2500000000 0.0000000000 1.0 0.0000000000 0.2750000000 0.0000000000 1.0 0.0000000000 0.3000000000 0.0000000000 1.0 0.0000000000 0.3250000000 0.0000000000 1.0 0.0000000000 0.3500000000 0.0000000000 1.0 0.0000000000 0.3750000000 0.0000000000 1.0 0.0000000000 0.4000000000 0.0000000000 1.0 0.0000000000 0.4250000000 0.0000000000 1.0 0.0000000000 0.4500000000 0.0000000000 1.0 0.0000000000 0.4750000000 0.0000000000 1.0 0.0000000000 0.5000000000 0.0000000000 1.0 0.0000000000 0.4750000000 0.0000000000 1.0 0.0000000000 0.4500000000 0.0000000000 1.0 0.0000000000 0.4250000000 0.0000000000 1.0 0.0000000000 0.4000000000 0.0000000000 1.0 0.0000000000 0.3750000000 0.0000000000 1.0 0.0000000000 0.3500000000 0.0000000000 1.0 0.0000000000 0.3250000000 0.0000000000 1.0 0.0000000000 0.3000000000 0.0000000000 1.0 0.0000000000 0.2750000000 0.0000000000 1.0 0.0000000000 0.2500000000 0.0000000000 1.0 0.0000000000 0.2250000000 0.0000000000 1.0 0.0000000000 0.2000000000 0.0000000000 1.0 0.0000000000 0.1750000000 0.0000000000 1.0 0.0000000000 0.1500000000 0.0000000000 1.0 0.0000000000 0.1250000000 0.0000000000 1.0 0.0000000000 0.1000000000 0.0000000000 1.0 0.0000000000 0.0750000000 0.0000000000 1.0 0.0000000000 0.0500000000 0.0000000000 1.0 0.0000000000 0.0250000000 0.0000000000 1.0 0.0000000000 0.0000000000 0.0000000000 1.0 0.0250000000 0.0000000000 0.0000000000 1.0 0.0500000000 0.0000000000 0.0000000000 1.0 0.0750000000 0.0000000000 0.0000000000 1.0 0.1000000000 0.0000000000 0.0000000000 1.0 0.1250000000 0.0000000000 0.0000000000 1.0 0.1500000000 0.0000000000 0.0000000000 1.0 0.1750000000 0.0000000000 0.0000000000 1.0 0.2000000000 0.0000000000 0.0000000000 1.0 0.2250000000 0.0000000000 0.0000000000 1.0 0.2500000000 0.0000000000 0.0000000000 1.0 0.2750000000 0.0000000000 0.0000000000 1.0 0.3000000000 0.0000000000 0.0000000000 1.0 0.3250000000 0.0000000000 0.0000000000 1.0 0.3500000000 0.0000000000 0.0000000000 1.0 0.3750000000 0.0000000000 0.0000000000 1.0 0.4000000000 0.0000000000 0.0000000000 1.0 0.4250000000 0.0000000000 0.0000000000 1.0 0.4500000000 0.0000000000 0.0000000000 1.0 0.4750000000 0.0000000000 0.0000000000 1.0 0.5000000000 0.0000000000 0.0000000000 1.0 0.4750000000 0.0000000000 0.0000000000 1.0 0.4500000000 0.0000000000 0.0000000000 1.0 0.4250000000 0.0000000000 0.0000000000 1.0 0.4000000000 0.0000000000 0.0000000000 1.0 0.3750000000 0.0000000000 0.0000000000 1.0 0.3500000000 0.0000000000 0.0000000000 1.0 0.3250000000 0.0000000000 0.0000000000 1.0 0.3000000000 0.0000000000 0.0000000000 1.0 0.2750000000 0.0000000000 0.0000000000 1.0 0.2500000000 0.0000000000 0.0000000000 1.0 0.2250000000 0.0000000000 0.0000000000 1.0 0.2000000000 0.0000000000 0.0000000000 1.0 0.1750000000 0.0000000000 0.0000000000 1.0 0.1500000000 0.0000000000 0.0000000000 1.0 0.1250000000 0.0000000000 0.0000000000 1.0 0.1000000000 0.0000000000 0.0000000000 1.0 0.0750000000 0.0000000000 0.0000000000 1.0 0.0500000000 0.0000000000 0.0000000000 1.0 0.0250000000 0.0000000000 0.0000000000 1.0 0.0000000000 0.0000000000 0.0000000000 1.0 EOF $ECHO " calculating phonon dispersion ...\c" $MATDYN_COMMAND < $NAME.dm.in > $NAME.dm.out check_failure $? $ECHO " done" # ------------------------------------- # phonon dos with dynmat.x | # ------------------------------------- cat > $NAME.phdos.in << EOF &input asr='simple', amass(1)=55.845, !Atomic mass [amu] of each atomic type amass(2)=74.922, amass(3)=40.078, amass(4)=39.098, flfrc='$NAME.fc', !file contains interatomic force constant flfrq='$NAME.freq' !output file contains phonon frequency dos=.true., fldos='$NAME.phdos.dat' deltaE=0.05, nk1=21, nk2=21, nk3=5, !q-point grid for DOS calculation / EOF $ECHO " calculating phonon DOS...\c" $MATDYN_COMMAND < $NAME.phdos.in > $phdos.out check_failure $? $ECHO " done"