Examples for Quantum Espresso

From Wiki
Revision as of 17:10, 14 December 2017 by Bob (talk | contribs)
Jump to navigation Jump to search

Go back to Scripts_for_QE

Here are the input examples for a Quantum Espresso (QE) 6.1 for a H2O molecule in vacuum. The main program for single point calculations and geometry/cell optimisation is pw.x.

save to USPP.001_G_D2H2O.in

 &CONTROL
                 calculation = 'relax' ,
                restart_mode = 'from_scratch' ,
                  wf_collect = .true. ,
                      prefix = 'USPP.001_G_D2H2O' ,
                   verbosity = 'high' ,
               etot_conv_thr = 1.0D-9 ,
               forc_conv_thr = 1.0D-5 ,
                     tstress = .true. ,
                     tprnfor = .true. ,
                    !dipfield = .true. ,
                       nstep = 200 ,
 /
&SYSTEM
                      ibrav = 1,
                          A = 15 ,
                        nat = 3 ,
                       ntyp = 2,
                    ecutwfc = 40.0 , !J. Chem. Phys. 138, 194709
                    ecutrho = 320.0 ,!J. Chem. Phys. 138, 194709
                  input_dft = 'PBE' ,
                occupations = 'smearing' ,
                    degauss = 0.02 ,
                   smearing = 'gaussian' ,
                      nspin = 2 ,
    starting_magnetization(1) = 0.0,
    starting_magnetization(2) = 0.0,
                    vdw_corr = Grimme-D2, ! DFT-D2 dispersion correction
                       nosym = .true. !For isolated atom
            assume_isolated = 'makov-payne'
/
&ELECTRONS
           electron_maxstep = 800,
              conv_thr_init = 1e-4 ,
                   conv_thr = 1e-9 ,
                startingpot = 'atomic' ,
                startingwfc = 'random' ,
               adaptive_thr = .true. ,
                mixing_beta = 0.514,
            diagonalization = 'david' ,
/
&IONS
               ion_dynamics = 'bfgs' ,
           trust_radius_min =  1.D-5 ,
/
ATOMIC_SPECIES
   O   15.99990  O.pbe-van_ak.UPF
   H    1.00790  H.pbe-van_ak.UPF
ATOMIC_POSITIONS angstrom
O        4.960864866   4.932204696  10.000041372
H        5.926442340   5.064579477   9.999978448
H        4.592692795   5.834600215   9.99998018
K_POINTS Gamma

to save to USPP.001_G_D2H2O.lsf12

#!/bin/bash
#   - Dra. Nuria's Lopez Group  -
##########################################
# SGE Parameters
##########################################
#$ -S /bin/bash
#$ -N D2H2O
#$ -cwd
#$ -masterq c12m48ib.q
#$ -pe c12m48ib_mpi  12
#$ -m ae
#$ -M YOURMAIL@iciq.es
#$ -o $JOB_NAME.o$JOB_ID
#$ -e $JOB_NAME.e$JOB_ID
cat $TMP/machines.$JOB_ID >> $JOB_NAME.MACHINES.$JOB_ID
INPUT=USPP.001_G_D2H2O.in
OUTPUT=USPP.001_G_D2H2O.out1
# Set up the environment
. /etc/profile.d/modules.sh
module load quantum-espresso/6.1
#module load quantum-espresso/6.1_Env2
##########################################
# Running Job
##########################################
export ESPRESSO_PSEUDO=$HOME/espresso_pseudo
export ESPRESSO_TMPDIR=$HOME/espresso_tmp

export OMP_NUM_THREADS=1

echo $PWD >> $JOB_NAME.o$JOB_ID
echo $TMP >> $JOB_NAME.o$JOB_ID

time mpirun -np $NSLOTS $BIN_DIR/pw.x -input $INPUT > $OUTPUT

save to USPP.001_G_D2H2O_LDOS.in

 &PROJWFC
                      prefix = 'USPP.001_G_D2H2O' ,
                      !outdir = '/media/hnguyen/WAREHOUSE/tekla/espresso_tmp/SurfaceUSPP/001' ,
                      DeltaE = 0.01 ,
                        Emin = -15.0 ,
                        Emax = 15.0 ,
                      ngauss = 0,
                     degauss = 0.001469972, ! =0.02 eV
                     pawproj = .false. ,
 /

save to USPP.001_G_D2H2O_LDOS.lsf12

#!/bin/bash
#   - Dra. Nuria's Lopez Group  -
##########################################
# SGE Parameters
##########################################
#$ -S /bin/bash
#$ -N H2Oldos
#$ -cwd
#$ -masterq c12m48ib.q
#$ -pe c12m48ib_mpi  12
#$ -m ae
#$ -M YOURMAIL@iciq.es
#$ -o $JOB_NAME.o$JOB_ID
#$ -e $JOB_NAME.e$JOB_ID
cat $TMP/machines.$JOB_ID >> $JOB_NAME.MACHINES.$JOB_ID

PREFIXfolder=USPP.001_G_D2H2O
INPUT=USPP.001_G_D2H2O_LDOS.in
OUTPUT=USPP.001_G_D2H2O_LDOS.out
# Set up the environment
. /etc/profile.d/modules.sh
module load quantum-espresso/6.1

##########################################
# Running Job
##########################################
export ESPRESSO_PSEUDO=$HOME/espresso_pseudo
export ESPRESSO_TMPDIR=$HOME/espresso_tmp

export OMP_NUM_THREADS=1

echo $PWD >> $JOB_NAME.o$JOB_ID
echo $TMP >> $JOB_NAME.o$JOB_ID


time mpirun -np $NSLOTS $BIN_DIR/projwfc.x -input $INPUT > $OUTPUT
mkdir PDOS
mkdir PDOS/$PREFIXfolder
mv *pdos* PDOS/$PREFIXfolder/.
grep 'polarization' $OUTPUT > $OUTPUT.polarization
grep 'charge' $OUTPUT > $OUTPUT.charge




Before starting the calculation, you need to create two folder in your $HOME directory:

$HOME/espresso_pseudo where you put all you pseudo potentials (O.pbe-van_ak.UPF[1] and H.pbe-van_ak.UPF[2])

$HOME/espresso_tmp is where all the outputs will be. Put all the .in and .lsf12 files there.

Then, edit in the files .lsf12 and replace

#$ -M YOURMAIL@iciq.es > your email

You can first submit the geometry optimisation job qsub USPP.001_G_D2H2O.lsf12

When it is done, it will create a human readable output USPP.001_G_D2H2O.out1 and a folder USPP.001_G_D2H2O for restart and postprecessing.


if you want to visualize the output of the geometry optimisation, you will need to load quantum espresso module:

module load quantum-espresso/6.1 and then type

pwo2xsf.sh -a USPP.001_G_D2H2O.out1 > USPP.001_G_D2H2O.out1.axsf

This will create a file USPP.001_G_D2H2O.out1.axsf that can be opened with xcrysden.


You can, after the geometry optimisation, submit a PDOS calculation

qsub USPP.001_G_D2H2O_LDOS.lsf12

When finished, it will create a directory in PDOS/USPP.001_G_D2H2O_LDOS containing all the projected DOS and the total DOS (USPP.001_G_D2H2O.pdos_tot) in text format. You can used your favourite program to plot the DOS. Löwdin charges will be in USPP.001_G_D2H2O_LDOS.out.charge and polarization will be in USPP.001_G_D2H2O_LDOS.out.polarization

Standard environ water solvent input

 &ENVIRON
   !
   verbose = 0
   environ_thr = 1.d-1
   environ_type = 'water'
   tolrhopol = 1.d-11
   mixrhopol = 0.6
 /