#PBS -l nodes=1:ppn=8 #PBS -V cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname EXAMPLE_DIR=/home/scicomp/work/LiFeAs-0GPa # 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 . /home/scicomp/work/environment_variables # required executables and pseudopotentials BIN_LIST="pw.x dos.x projwfc.x kvecs_FS.x bands_FS.x bands.x fs.x hp.x" $ECHO $ECHO " executables directory: $BIN_DIR" $ECHO " pseudo directory: $PSEUDO_DIR" $ECHO " temporary directory: $TMP_DIR" $ECHO " checking that needed directories and files exist...\c" # result directory for DIR in "$TMP_DIR" "$EXAMPLE_DIR/NCPP" ; do if test ! -d $DIR ; then mkdir $DIR fi done cd $EXAMPLE_DIR/NCPP # 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" KVECS_COMMAND="$BIN_DIR/kvecs_FS.x " BANDS_COMMAND="$PARA_PREFIX $BIN_DIR/bands.x $PARA_POSTFIX" FS_COMMAND="$BIN_DIR/fs.x " HP_COMMAND="$PARA_PREFIX $BIN_DIR/hp.x $PARA_POSTFIX" $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 kvecs_FS.x as: $KVECS_COMMAND" $ECHO " running bands.x as: $BANDS_COMMAND" $ECHO " running fs.x as: $FS_COMMAND" $ECHO " running hp.x as: $HP_COMMAND" $ECHO # clean TMP_DIR $ECHO " cleaning $TMP_DIR...\c" rm -rf $TMP_DIR/* $ECHO " done" ## =================================================== NAME='LiFeAs-0GPa' PRE='111' ## =================================================== #------------------------------------------------------------------------------------------ # start of self-consistent calculation #------------------------------------------------------------------------------------------ cat > $NAME.scf << EOF &control calculation='scf' restart_mode='from_scratch', pseudo_dir ='/home/scicomp/work/Pseudo/ABINIT_ONCVPP' outdir='./' prefix='$PRE' verbosity='high' / &system ibrav = 6, celldm(1) =7.135, celldm(3) =1.681, nat= 6, ntyp= 3, ecutwfc = 80.0, nspin = 1, occupations='smearing', smearing='gaussian', degauss=0.02 nosym = .true., lda_plus_u = .true., lda_plus_u_kind = 0, U_projection_type = 'ortho-atomic', Hubbard_U(1) = 1.d-8 / &electrons conv_thr = 1.0D-15 mixing_mode = 'plain' mixing_beta = 0.5 diagonalization = 'david' / &ions / &cell cell_dynamics = 'bgfs', cell_dofree = 'shape' / ATOMIC_SPECIES Fe 55.85 Fe_ONCV_PBE_sr.upf Li 6.94 Li_ONCV_PBE_sr.upf As 74.92 As_ONCV_PBE_sr.upf ATOMIC_POSITIONS (crystal) Fe 0.000000000 0.000000000 0.000000000 Fe 0.500000000 0.500000000 0.000000000 Li 0.500000000 -0.000000000 0.760000024 Li -0.000000000 0.500000000 0.240000014 As 0.500000000 -0.000000000 0.239999995 As -0.000000000 0.500000000 0.760000024 K_POINTS (automatic) 12 12 8 0 0 0 EOF $ECHO " running scf calculation ..\c" $PW_COMMAND < $NAME.scf > scf.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of self-consistent calculation #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ # start of hubbard U calculation #------------------------------------------------------------------------------------------ cat > $NAME.hp << EOF &inputhp prefix = '$PRE', outdir = './', nq1 = 2, nq2 = 2, nq3 = 1, conv_thr_chi = 1.0d-8, disable_type_analysis=.true., iverbosity = 2 / EOF $ECHO " running hubbard U calculation ..\c" $HP_COMMAND < $NAME.hp > hp.out check_failure $? $ECHO " done" #------------------------------------------------------------------------------------------ # end of hubbard U calculation #------------------------------------------------------------------------------------------