Quick reference (migration guide)¶
The quick reference tables compare how to set up calculations in AMS and standalone Quantum ESPRESSO. This can be useful if you are already familiar with Quantum ESPRESSO but want to use the AMS interface.
For details, see AMS driver’s tasks and properties or Quantum ESPRESSO Input, or the complete Examples.
Elements, coordinates, lattice, isotopes, charge, labels¶
One of the H atoms has a special label “H1”. Labels can be used to set atom-specific starting magnetizations or Hubbard U values (not shown here).
AMS |
Standalone pw.x |
---|---|
# AMS Driver
System
Atoms
H 0. 0. 0. QE.Label=H1
H 1. 0. 0. mass=2.01
End
Lattice
6. 0. 0.
0. 5. 0.
0. 0. 4.
End
Charge 0
End
|
# pw.x
&SYSTEM
ibrav = 0
nat = 2
ntyp = 2
tot_charge = 0.0
/
CELL_PARAMETERS angstrom
6. 0. 0.
0. 5. 0.
0. 0. 4.
ATOMIC_SPECIES
H1 1.008 'H_ONCV_PBE-1.2.upf'
H 2.01 'H_ONCV_PBE-1.2.upf'
ATOMIC_POSITIONS angstrom
H1 0. 0. 0.
H 1. 0. 0.
|
Pseudopotentials¶
AMS comes with a library of Quantum ESPRESSO pseudopotentials. The correct
files will automatically be picked up when you specify the Family
and
Functional
.
To see the available families or to specify your own pseudopotential files in AMS, see Pseudopotentials.
AMS |
Standalone pw.x |
---|---|
Engine QuantumEspresso
Pseudopotentials
Family SG15
Functional PBE
End
EndEngine
|
# pw.x
&CONTROL
pseudo_dir='/some/path'
/
ATOMIC_SPECIES
H1 1.008 'H_ONCV_PBE-1.2.upf'
H 2.01 'H_ONCV_PBE-1.2.upf'
|
k-space sampling¶
Gamma-point (Γ-point) sampling:
AMS |
Standalone pw.x |
---|---|
Engine QuantumEspresso
K_Points gamma
End
EndEngine
|
# pw.x
K_POINTS gamma
|
Monkhorst-Pack grid (4 x 4 x 4, shifted):
AMS |
Standalone pw.x |
---|---|
Engine QuantumEspresso
K_Points automatic
4 4 4 1 1 1
End
EndEngine
|
# pw.x
K_POINTS automatic
4 4 4 1 1 1
|
Energy cutoff¶
AMS |
Standalone pw.x |
---|---|
Engine QuantumEspresso
System
ecutwfc 40
End
EndEngine
|
# pw.x
&SYSTEM
ecutwfc = 40
/
|
Forces, stress tensor¶
AMS |
Standalone pw.x |
---|---|
# AMS Driver
Properties
Gradients Yes
StressTensor Yes
End
|
# pw.x
&CONTROL
tprnfor = .true.
tstress = .true.
/
|
Singlepoint¶
AMS |
Standalone pw.x |
---|---|
# AMS Driver
Task SinglePoint
|
&CONTROL
calculation = 'scf'
/
|
Geometry optimization¶
Note: If you use AMS, it will not set calculation='relax'
in the pw.x input. Instead it will use the internal AMS geometry optimizer and set calculation='scf'
.
AMS |
Standalone pw.x |
---|---|
# AMS Driver
Task GeometryOptimization
GeometryOptimization
Method FIRE
MaxIterations 100
End
|
# pw.x
&CONTROL
calculation = 'relax'
nstep = 100
/
&IONS
ion_dynamics = 'fire'
/
|
Constraints¶
Keep the position of the first atom fixed and the x-coordinate of the second atom fixed.
AMS |
Standalone pw.x |
---|---|
# AMS Driver
Constraints
Atom 1
Coordinate 2 x
End
System
Atoms
H 0. 0. 0.
H 1. 0. 0.
End
End
|
# pw.x
ATOMIC_POSITIONS angstrom
H 0. 0. 0. 0 0 0
H 1. 0. 0. 0 1 1
|
For more advanced constraints, see the AMS Driver documentation.
Execution¶
AMS |
Standalone pw.x |
---|---|
#!/bin/sh
export SCM_DISABLE_MPI=1
rm -rf ams.results
$AMSBIN/ams <<EOF
Task SinglePoint
System
Atoms
H 0. 0. 0.
H 1. 0. 0.
End
Lattice
6. 0. 0.
0. 5. 0.
0. 0. 4.
End
End
Engine QuantumEspresso
Pseudopotentials
Family SG15
Functional PBE
End
System
ecutwfc 40.0
ecutrho 160.0
End
K_Points gamma
End
EndEngine
EOF
echo Getting results...
# extract energy at end
RKF=quantumespresso.rkf
$AMSBIN/akf \
ams.results/$RKF \
-pv AMSResults%Energy
|
#!/bin/sh
# here show how to find
# the same pseudopotentials
# as on the left,
# but you can set PPDIR manually
PPDIR=`amspackages loc qe`
PPDIR=$PPDIR/upf_files/GGA/PBE
PPDIR=$PPDIR/SR/SG15-1.2/UPFs
$AMSBIN/startqe pw.x <<EOF
&CONTROL
pseudo_dir='$PPDIR'
/
&SYSTEM
ibrav = 0
nat = 2
ntyp = 1
tot_charge = 0.0
ecutwfc = 40
ecutrho = 160
/
&ELECTRONS
/
ATOMIC_SPECIES
H 1.008 'H_ONCV_PBE-1.2.upf'
ATOMIC_POSITIONS angstrom
H 0. 0. 0.
H 1. 0. 0.
CELL_PARAMETERS angstrom
6. 0. 0.
0. 5. 0.
0. 0. 4.
K_POINTS gamma
EOF
|