Examples¶
These examples show how to run Quantum ESPRESSO (pw.x) through the AMS driver.
Important
These examples do not necessarily contain scientifically good settings!
See also
PLAMS (python) example for running QE via the AMS Driver.
Basic single-point for Kevlar¶
Single-point calculation with Γ-point sampling, ultrasoft pseudopotentials, and a plane-wave energy cutoff of 40 Ry.
#!/bin/sh
export SCM_AMSPKGS_OVERRIDE_LOGPATH="./"
if ! "$AMSBIN"/amspackages check qe; then
$AMSBIN/amspackages install --yes qe
fi
# Run AMS driver without MPI, so that QE can be MPI parallel.
export SCM_DISABLE_MPI=1
$AMSBIN/ams << EOF
System
Atoms
H -2.190562 10.3521639 6.72545522
H -0.14451627 9.258090340000001 5.22139313
H 1.93358249 3.76617428 1.27908929
H 0.76833283 8.609508290000001 2.88510392
H -1.30976594 4.41475633 6.82740776
O 0.89815415 0.37282504 3.0987997
O -1.17994462 12.65143958 7.04110354
O -0.59677537 6.90465772 4.80524344
O 1.4813234 6.1196069 0.8629396
N -1.57694902 0.88080099 4.15919435
N 0.5011497499999999 12.14346363 0.21689051
N 1.8781419 6.43209382 3.73152476
N -0.19995686 6.5921708 7.6738286
C 1.94924404 13.01511731 3.68679335
C -0.12885472 0.009147310000000001 7.62909719
C 2.20109858 11.55353708 3.8535181
C 0.12299981 1.47072754 7.79582194
C -1.15610157 11.04384253 4.53759188
C 0.9219972 1.98042209 0.59528804
C -0.95468583 9.66571514 4.62231485
C 1.12341294 3.35854948 0.68001101
C -1.87080577 8.77096635 4.03728142
C 0.207293 4.25329827 0.09497758000000001
C 1.49035784 9.28140743 3.34452086
C -0.58774092 3.74285719 7.2868247
C 1.2866631 10.65814311 3.26538811
C -0.79143567 2.36612151 7.20769196
C -1.82521465 2.29124692 4.03962123
C 0.25288412 10.7330177 0.09731739
C 1.51999317 2.83468326 4.66426591
C 3.59809194 10.18958136 0.72196207
C 1.23411848 4.19794262 4.55027824
C 3.31221724 8.826321999999999 0.6079744
C 2.11673297 5.0226504 3.83163288
C 0.0386342 8.00161422 7.77393672
C -1.2305185 4.47962056 3.20357167
C -3.30861727 8.54464406 7.14587551
C -0.9396412200000001 3.11687303 3.32546243
C -3.01773999 9.90739159 7.26776627
C -1.63791061 7.30436228 4.21290713
C 0.44018816 5.71990234 0.27060329
H -0.57791954 0.61188323 4.01127388
H 1.50017922 12.41238139 0.06897004
H 0.8801177100000001 6.7035642 3.87815408
H -1.19798106 6.32070042 7.82045792
H -0.44283575 11.7162125 5.00564329
H 1.63526302 1.30805212 1.06333945
H 0.46799048 11.06912321 2.68272256
H -1.61010828 1.95514141 6.6250264
H 0.82663005 2.18135335 5.1878593
H 2.90472882 10.84291127 1.24555546
H 0.40543736 4.642141 5.09191628
H 2.48353613 8.38212362 1.14961244
H -0.5422079 5.13363984 2.67471694
H -2.62030667 7.89062478 6.61702078
H -0.11246323 2.67210072 2.78315137
End
Lattice
4.46344907 0.0 0.0
0.0 13.02426462 0.0
-4.15619754 0.0 7.88460768
End
End
Task SinglePoint
Properties
Gradients True
StressTensor True
End
Engine QuantumEspresso
System
ecutwfc 40.0
ecutrho 200.0
End
Electrons
conv_thr 1.0e-12
End
Pseudopotentials
H GBRV/h_pbe_v1.4.uspp.F.UPF
C GBRV/c_pbe_v1.2.uspp.F.UPF
N GBRV/n_pbe_v1.2.uspp.F.UPF
O GBRV/o_pbe_v1.2.uspp.F.UPF
End
K_Points Gamma
End
EndEngine
EOF
DFT+U calculation for anti-ferromagnetic FeO¶
Single-point calculation for anti-ferromagnetic FeO with DFT+U.
Note how QE.Label= is used to create two distinct Fe species for Quantum ESPRESSO, which are then given an opposite initial magnetization, leading to an anti-ferromagnetic solution.
#!/bin/sh
export SCM_AMSPKGS_OVERRIDE_LOGPATH="./"
if ! "$AMSBIN"/amspackages check qe; then
$AMSBIN/amspackages install --yes qe
fi
# Run AMS driver without MPI, so that QE can be MPI parallel.
export SCM_DISABLE_MPI=1
"$AMSBIN/ams" << EOF
Task SinglePoint
System
Atoms
Fe 0.0 0.0 0.0 QE.Label=Fe1
Fe 2.165 2.165 0.0 QE.Label=Fe2
O 0.0 2.165 0.0
O 2.165 0.0 0.0
End
Lattice
4.33 0.0 0.0
0.0 4.33 0.0
2.165 0.0 2.165
End
End
Engine QuantumEspresso
System
ecutwfc 40.0
ecutrho 240.0
occupations smearing
smearing mv
degauss 0.02
nspin 2
starting_magnetization Fe1 0.5
starting_magnetization Fe2 -0.5
End
Electrons
conv_thr 1.0e-8
mixing_beta 0.3
End
Pseudopotentials
Fe1 QE/Fe.pbesol-spn-kjpaw_psl.0.2.1.UPF
Fe2 QE/Fe.pbesol-spn-kjpaw_psl.0.2.1.UPF
O QE/O.pbesol-n-kjpaw_psl.0.1.UPF
End
K_Points automatic
12 12 12 0 0 0
End
Hubbard ortho-atomic
U Fe1-3d 4.6
U Fe2-3d 4.6
End
EndEngine
EOF
AgMgO slab with dipole correction¶
Calculation of an MgO layer on top of a Ag, using the dipole correction to simulate a slab system.
#!/bin/sh
export SCM_AMSPKGS_OVERRIDE_LOGPATH="./"
if ! "$AMSBIN"/amspackages check qe; then
$AMSBIN/amspackages install --yes qe
fi
# Run AMS driver without MPI, so that QE can be MPI parallel.
export SCM_DISABLE_MPI=1
"$AMSBIN/ams" << EOF
Task SinglePoint
System
Atoms
Ag 0.0000000000 0.0000000000 8.00000000000
Ag 2.0427491850 2.0427491850 8.00000000000
Ag 2.0427491850 0.0000000000 9.97075621600
Ag 0.0000000000 2.0427491850 9.97076038300
Ag 0.0000003920 0.0000009070 12.0023046480
Ag 2.0427490630 2.0427496840 12.0022872680
O -0.0000018100 0.0000011970 14.6131407560
Mg 2.0427480500 0.0000002450 14.6600091520
Mg -0.0000013280 2.0427499290 14.6600180010
O 2.0427478130 2.0427497490 14.6130973430
End
Lattice [Bohr]
7.72047608 0.00000000 0.00000000
0.00000000 7.72047608 0.00000000
0.00000000 0.00000000 46.32285648
End
End
Engine QuantumEspresso
Control
tefield True
dipfield True
End
System
occupations Smearing
degauss 0.0035
ecutwfc 35
edir 3
emaxpos 0.90
eopreg 0.10
End
Electrons
conv_thr 1.0e-9
End
Pseudopotentials
Ag QE/Ag.pbe-mt_fhi.UPF
Mg QE/Mg.pbe-mt_fhi.UPF
O QE/O.pbe-mt_fhi.UPF
End
K_Points automatic
7 7 1 0 0 0
End
EndEngine
EOF