Examples for Quantum Espresso: Difference between revisions
No edit summary |
No edit summary |
||
| (12 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
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. | 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. | ||
| Line 94: | Line 96: | ||
time mpirun -np $NSLOTS $BIN_DIR/pw.x -input $INPUT > $OUTPUT | time mpirun -np $NSLOTS $BIN_DIR/pw.x -input $INPUT > $OUTPUT | ||
</pre> | </pre> | ||
save to USPP.001_G_D2H2O_LDOS.in | |||
<pre> | |||
&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. , | |||
/ | |||
</pre> | |||
save to USPP.001_G_D2H2O_LDOS.lsf12 | |||
<pre> | |||
#!/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=${PREFIXfolder}_LDOS.in | |||
OUTPUT=${PREFIXfolder}_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 | |||
</pre> | |||
-------------------------------------------------------------------- | |||
Before starting the calculation, you need to create two folder in your $HOME directory: | Before starting the calculation, you need to create two folder in your $HOME directory: | ||
$HOME/espresso_pseudo where you put all | $HOME/espresso_pseudo where you put all your pseudo potentials (O.pbe-van_ak.UPF[http://www.quantum-espresso.org/pseudo/1.3/UPF/O.pbe-van_ak.UPF] and H.pbe-van_ak.UPF[http://www.quantum-espresso.org/pseudo/1.3/UPF/H.pbe-van_ak.UPF]) | ||
$HOME/espresso_tmp is where all the outputs will be. Put all the .in and .lsf12 files there. | $HOME/espresso_tmp is where all the outputs will be. Put all the .in and .lsf12 files there. | ||
| Line 106: | Line 173: | ||
You can first submit the geometry optimisation job | You can first submit the geometry optimisation job | ||
qsub USPP. | qsub USPP.001_G_D2H2O.lsf12 | ||
When it is done, it will create a human readable output USPP. | 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. | ||
| Line 116: | Line 183: | ||
and then type | and then type | ||
<pre> | <pre> | ||
pwo2xsf.sh -a USPP. | pwo2xsf.sh -a USPP.001_G_D2H2O.out1 > USPP.001_G_D2H2O.out1.axsf | ||
</pre> | </pre> | ||
This will create a file USPP. | 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 | You can, after the geometry optimisation, submit a PDOS calculation | ||
<pre> | <pre> | ||
qsub USPP. | qsub USPP.001_G_D2H2O_LDOS.lsf12 | ||
</pre> | |||
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 | |||
<pre> | |||
&ENVIRON | |||
! | |||
verbose = 0 | |||
environ_thr = 1.d-1 | |||
environ_type = 'water' | |||
tolrhopol = 1.d-11 | |||
mixrhopol = 0.6 | |||
/ | |||
</pre> | |||
'''Bader Charge procedure:''' | |||
pw.x <math>\rightarrow</math> pp.x <math>\rightarrow</math> bader | |||
NB: You MUST use PAW pseudopotential to compute Bader charges in QE. | |||
Step1: After a scf calculation you need to run | |||
pp.x < INPUT > OUTPUT | |||
<pre> | |||
&INPUTPP | |||
prefix = 'prefix' , | |||
filplot = 'prefix' , | |||
plot_num = 17, | |||
/ | |||
&PLOT nfile = 1 , | |||
weight(1) = 1.0, | |||
fileout = 'prefix.charge.cube' , | |||
iflag = 3 , | |||
output_format = 6 , | |||
/ | |||
</pre> | |||
This will create a .cube file that can be read by the program bader (not included in QE). | |||
Step2: | |||
After step1, execute | |||
<pre> | |||
bader -v file.charge.cube | |||
</pre> | |||
This will creates 3 files ACF.dat, AVF.dat, BCF.dat. | |||
ACF.dat contains the coordinates of each atom, the charge associated with it according to Bader partitioning, percentage of the whole according to Bader partitioning and the minimum distance to the surface. | |||
BCF.dat contains Bader maxima | |||
AVF.dat contains Bader volumes | |||
For practical reasons, it is highly recommended to rename these files before scripting large data set. | |||
A very simple script for step 2 for computing Bader charges. Recommended name: ''bader.sh'' | |||
<pre> | |||
#!/bin/bash | |||
#lazy script to compute Bader charges | |||
PREFIX=Fe.USPP.001_2x2_145_full_D2_O1-PAW | |||
bader -v ${PREFIX}.charge.cube | |||
mv ACF.dat ${PREFIX}_ACF.dat | |||
mv AVF.dat ${PREFIX}_AVF.dat | |||
mv BCF.dat ${PREFIX}_BCF.dat | |||
</pre> | </pre> | ||
Latest revision as of 17:58, 2 May 2019
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=${PREFIXfolder}_LDOS.in
OUTPUT=${PREFIXfolder}_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 your 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 /
Bader Charge procedure:
pw.x <math>\rightarrow</math> pp.x <math>\rightarrow</math> bader
NB: You MUST use PAW pseudopotential to compute Bader charges in QE.
Step1: After a scf calculation you need to run pp.x < INPUT > OUTPUT
&INPUTPP prefix = 'prefix' , filplot = 'prefix' , plot_num = 17, / &PLOT nfile = 1 , weight(1) = 1.0, fileout = 'prefix.charge.cube' , iflag = 3 , output_format = 6 , /
This will create a .cube file that can be read by the program bader (not included in QE).
Step2: After step1, execute
bader -v file.charge.cube
This will creates 3 files ACF.dat, AVF.dat, BCF.dat.
ACF.dat contains the coordinates of each atom, the charge associated with it according to Bader partitioning, percentage of the whole according to Bader partitioning and the minimum distance to the surface.
BCF.dat contains Bader maxima
AVF.dat contains Bader volumes
For practical reasons, it is highly recommended to rename these files before scripting large data set. A very simple script for step 2 for computing Bader charges. Recommended name: bader.sh
#!/bin/bash
#lazy script to compute Bader charges
PREFIX=Fe.USPP.001_2x2_145_full_D2_O1-PAW
bader -v ${PREFIX}.charge.cube
mv ACF.dat ${PREFIX}_ACF.dat
mv AVF.dat ${PREFIX}_AVF.dat
mv BCF.dat ${PREFIX}_BCF.dat