#SBATCH -A mendoza_q
#SBATCH --exclude=amr-163,amr-178,amr-179
this should submit to our queue, exclude your buyin nodes and flip the jobs to run in the general partition, avoiding incurring cpu.
For a job script example running Quantum Espresso for single-point or optimization in parallel, you can use the following script:
#!/bin/bash --login
#SBATCH --ntasks=16
#SBATCH -N 2
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=3G
#SBATCH --time=05:00:00
#SBATCH -A general
#SBATCH --job-name QE_parallel
export JOB=QE_parallel
export DIR=$SLURM_SUBMIT_DIR
module load QuantumESPRESSO/6.2
srun pw.x < $DIR/${JOB}.in > $DIR/${JOB}.out
This command is for submitting the .slurm file you just create
>> sbatch submit.slurm
These command lines are for showing job information and resource usages.
>> scontrol show job $SLURM_JOB_ID
>> js -j $SLURM_JOB_ID
Besides the memory and the walltime request, you can also change the number of tasks and number of nodes in the first and second #SBATCH lines, respectively. If you want to run on the mendoza partition, change general-long to mendoza_q. Make sure to change the job name according to your input file, i.e. replace both instances of "QE_parallel" for the name of the .in file that you want to run.
E.g. if you use the example below for graphene, you would substitute "QE_parallel" by "graphene."
If you want to submit to general, but not incur cpu hours, as what happens when they don't go through the buyin, they can try submitting with the following options in their submit scripts:
#SBATCH -A mendoza_q
#SBATCH --exclude=amr-163,amr-178,amr-179
this should submit to your queue, exclude your buyin nodes and flip the jobs to run in the general partition, avoiding incurring cpu.
Geometry Optimization
Running a Quantum Espresso input file for structure optimization requires entering the appropriate keywords in agreement with the manual.
Geometry Optimization Example: Graphene
The following is an example of a Quantum Espresso input file for a geometry optimization calculation of a unit cell of graphene. Extra keywords were added so they can help extending the input to different structures. The keywords used in each section are commented for a quick view of their meaning:
graphene.in
&control
calculation='vc-relax' ! total geometry optimization, for atom only use 'relax'
title='graphene'
prefix='graphene' ! output file name
outdir='./' ! output file directory, set to working directory
pseudo_dir = './' ! potential file directory, set to working directory
verbosity='high' ! additional information will be displayed in output file
restart_mode='from_scratch'
nstep=1000 ! number of optimization steps, set to 0 for a 'dry run'
iprint=1 ! display band energies at every step, 0 for convergence only
tprnfor=.true. ! calculate forces, default true if 'relax'
tstress=.true. ! calculate stress, default true if 'vc-relax'
forc_conv_thr=1.0d-4 ! convergence energy threshold for total energy in a.u., default is 1d-4
etot_conv_thr=1.0d-3 ! convergence forces threshold for ionic minimization, default is 1d-3
/
&system
ibrav = 4, ! bravais lattice, see manual for details
celldm(1) = 4.0, ! cell parameters in bohr
celldm(3) = 2.0,
nat = 4, ! number of atoms inside unit cell
ntyp = 1, ! type of atoms
ecutwfc = 40.0 , ! kinetic energy cutoff in Ry for wavefunctions,
ecutrho = 400.0 , ! kinetic energy cutoff in Ry for charge density and potential, depends on pseudopotential for norm-conserving 4*ecutwfc, ultrasoft 8 to 12*ecutwfc
input_DFT = 'PBE' , ! functional
! occupations = 'smearing' , ! for options, see manual
! degauss = 1.0d-4 ,
! smearing = 'gaussian' ,
/
&electrons
electron_maxstep = 100, ! max number of iterations in a SCF step
conv_thr = 1.0d-8 , ! convergence threshold for selfconsistency, default is 1d-6
mixing_mode = 'plain' , ! default plain, see manual for other options
mixing_beta = 0.3d0 , ! mixing factor for self-consistency, default is 0.7
/
&ions
ion_dynamics='bfgs' ! type of ionic dynamics, may differ per type of calculation, see manual for more details
upscale=20.0, ! max reduction factor for conv_thr, default is 100
/
&cell
press_conv_thr = 0.5D0, ! convergence threshold on the pressure for variable cell in Kbar
press = 0.D0, ! target pressure in a variable-cell run (md or relaxation)
cell_dynamics = 'bfgs', ! type of ionic dynamics, may differ per type of calculation, see manual for more details
! cell_dofree = '2Dxy' ! which parameters of the cell should be moved
cell_factor = 2.0D0 ! used in construction of pseudopotential tables usually 2 for variable-cell calculations, 1 otherwise, see manual
/
ATOMIC_SPECIES ! geometry input, there are many different ways other than the method shown below, see manual for detailed explanations
C 12.011 c_pbe_v1.2.uspp.F.UPF ! pseudopotential files for the present elements can be obtained at: https://www.physics.rutgers.edu/gbrv/
ATOMIC_POSITIONS crystal
C 0.000000 0.000000 0.250000
C 0.000000 0.000000 0.750000
C 0.333333 0.666666 0.250000
C 0.666666 0.333333 0.750000
K_POINTS automatic
12 12 2 0 0 0
Manual link for detailed information about keywords: https://www.quantum-espresso.org/Doc/INPUT_PW.html
For additional information you can also use: https://www.quantum-espresso.org/Doc/user_guide_PDF/pw_user_guide.pdf
For a.u. units, remember that this could mean atomic units of energy, force or length:
https://en.wikipedia.org/wiki/Hartree_atomic_units#Units
E.g.
Atomic unit of | Name | Other equivalents
energy | hartree | 27.211386245988(53) eV
force | | 51.421 eV·Å−1
length | bohr | 0.529177210903(80) Å