Car-Parrinello Molecular Dynamics: An Ab Initio Electronic Structure and Molecular Dynamics Program
Car-Parrinello Molecular Dynamics: An Ab Initio Electronic Structure and Molecular Dynamics Program
i,j
(f
i
f
j
)[
i
[ p[
j
)[
2
(
i
j
h)
where
i
are the Kohn-Sham eigenstates,
i
their corresponding eigenvalues, f
i
the
occupation number and the dierence f
i
f
j
takes care of the fermionic occupancy.
This calculation is executed when the keyword PROPERTIES is used in the section
&CPMD ... &END. In the section &PROP ... &END the keyword CONDUCTIVITY
must be present and the interval interval for the calculation of the spectrum is
read from the next line. Note that, since this is a PROPERTIES calculation, you
must have previously computed the electronic structure of your system and have a
consistent RESTART le ready to use. Further keyword: STEP=0.14, where (e.g.)
0.14 is the bin width in eV of the () histogram if you want it to be dierent from
. A le MATRIX.DAT is written in your working directory, where all the non-
zero transition amplitudes and related informations are reported (see the header of
MATRIX.DAT). An example of application is given in Refs. [134, 135].
31
CONFINEMENT POTENTIAL
Section: &ATOMS
The use of this label activates a spherical gaussian connement potential in the cal-
culation of the form factor of pseudopotentials. In the next line(s) two parameters
for each atomic species must be supplied: the amplitude and the cut o radius r
c
.
The gaussian spherical amplitude is computed as A =
3/2
r
3
c
and the gaussian
connement potential reads
V (G) =
G
A [G[ e
G
2
r
2
c
/4
being G the G-vectors, although in practice the loop runs only on the G-shells G =
[G[.
CONJUGATE GRADIENTS [ELECTRONS, IONS, NOPRECONDITION-
ING]
Section: &CPMD
For the electrons, the keyword is equivalent to PCG. The NOPRECONDITIONING pa-
rameter only applies for electrons. For the ions the conjugate gradients scheme is
used to relax the atomic positions.
CONSTANT CUTOFF
Section: &SYSTEM
Apply a cuto function to the kinetic energy term [107] in order to simulate con-
stant cuto dynamics. The parameters A, and E
o
are read from the next line (all
quantities have to be given in Rydbergs).
G
2
G
2
+A
_
1 + erf
_
1
2
G
2
E
o
__
CONSTRAINTS ... END CONSTRAINTS
Section: &ATOMS
With this option you can specify several constraints and restraints on the atoms. (see
section 9.5.2 for more information on the available options and the input format).
32
CONVERGENCE [ADAPT, ENERGY, CALFOR, RELAX, INITIAL]
Section: &CPMD
The adaptive convergence criteria for the wavefunction during a geometry optimiza-
tion are specied. For more informations, see [25]. The ratio TOLAD between the
smallest maximum component of the nuclear gradient reached so far and the maximum
allowed component of the electronic gradient is specied with CONVERGENCE
ADAPT. This criterion is switched o once the value TOLOG given with CON-
VERGENCE ORBITALS is reached. By default, the adaptive gradient criterion
is not active. A reasonable value for the parameter TOLAD is 0.02.
If the parameter TOLENE is given with CONVERGENCE ENERGY, in addi-
tion to the gradient criterion for the wavefunction, the energy change between two
wavefunction optimization cycles must be smaller than the energy change of the last
accepted geometry change multiplied by TOLENE for the wavefunction to be con-
sidered converged. By default, the adaptive energy criterion is not active. It is
particularly useful for transition state search with P-RFO, where the trust radius
is based on the quality of energy prediction. A reasonable value for TOLENE is 0.05.
To save CPU time, the gradient on the ions is only calculated if the wavefunction is
almost converged. The parameter TOLFOR given with CONVERGENCE CAL-
FOR is the ratio between the convergence criteria for the wavefunction and the
criteria whether the gradient on the ions is to be calculated. Default value for TOL-
FOR is 3.0 .
If the wavefunction is very slowly converging during a geometry optimization, a small
nuclear displacement can help. The parameter NSTCNV is given with CONVER-
GENCE RELAX. Every NSTCNV wavefunction optimization cycles, the conver-
gence criteria for the wavefunction are relaxed by a factor of two. A geometry opti-
mization step resets the criteria to the unrelaxed values. By default, the criteria for
wavefunction convergence are never relaxed.
When starting a geometry optimization from an unconverged wavefunction, the nu-
clear gradient and therefore the adaptive tolerance of the electronic gradient is not
known. To avoid the full convergence criterion to be applied at the beginning, a
convergence criterion for the wavefunction of the initial geometry can be supplied
with CONVERGENCE INITIAL. By default, the initial convergence criterion is
equal to the full convergence criterion.
CONVERGENCE [ORBITALS, GEOMETRY, CELL]
Section: &CPMD
The convergence criteria for optimization runs is specied.
The maximum value for the biggest element of the gradient of the wavefunction
(ORBITALS), of the ions (GEOMETRY), or the cell (CELL) is read from the
next line.
Default values are 10
5
for the wavefunction, 510
4
for the ions and 1.0 for the
cell. For diagonalization schemes the rst value is the biggest variation of a density
component. Defaults are 10
3
and 10
3
.
CONVERGENCE
Section: &LINRES
Convergence criterion for linear response calculations.
Default value is 10
5
.
33
CONVERGENCE
Section: &RESP
Convergence criterion on the gradient E/
Default value is 10
5
.
CORE SPECTRA
Section: &PROP
Computes the X-ray adsorption spectrum and related transition matrix elements ac-
cording to Ref. [136]. This calculation is executed when the keyword PROPERTIES
is used in the section &CPMD ... &END. In the section &PROP ... &END the
keyword CORE SPECTRA must be present and the core atom number (e.g. 10 if it
is the 10th atom in your list) and core level energy (in au) are read from the next
line, while in the following line the n and l quantum numbers of the selected core
level, along with the exponential factor a of the STO orbital for the core level must
be provided. In the case of 1s states, the core orbital is reconstructed as
1s
(r) = 2a
3
2
r exp(a r)
and it is this a value in au that must be supplied in input. As a general rule, rst-
row elements in the neutral case have the following a values: B (4.64), C (5.63), N
(6.62), O (7.62). For an excited atom these values would be of course a bit larger;
e.g. for O it is 7.74453, i.e. 1.6 % larger. Since this is a PROPERTIES calculation,
you must have previously computed the electronic structure of your system and have
a consistent RESTART le ready to use. A le XRAYSPEC.DAT is written in
your working directory, containing all the square transition amplitudes and related
informations, part of which are also written in the standard output. Waring: in order
to use this keyword you need special pseudopotentials. These are provided, at least
for some elements, in the PP library of CPMD and are named as * HOLE.psp
COUPLINGS {FD=,PROD=} [NAT]
Section: &SYSTEM
Calculate non-adiabatic couplings [93] using nite dierences (FD and PROD are two
dierent nite-dierence approximations). The displacement is expected in atomic
units. If NAT=n is given, the coupling vector acting on only a subset of n atoms is
calculated. In this case, a line containing n atom sequence numbers is expected. See
COUPLINGS NSURF.
34
COUPLINGS LINRES {BRUTE FORCE,NVECT=n} [THR,TOL]
Section: &SYSTEM
Calculate non-adiabatic couplings [93] using linear-response theory. With BRUTE
FORCE, the linear response to the nuclear displacements along all Cartesian coordi-
nates is calculated. With NVECT=n, at most n cycles of the iterative scheme in [93]
are performed. However, the iterative calculation is also stopped earlier if its contri-
bution to the non-adiabatic coupling vector is smaller a given tolerance (TOL=C
tol
).
In the case of the iterative scheme, also the option THR can be given, followed by
three lines each containing a pair of a threshold contribution to the non-adiabatic
coupling vector and a tolerance for the linear-response wavefunction (see [93]). Do
not forget to include a &LINRES section in the input, even if the defaults are used.
See COUPLINGS NSURF.
COUPLINGS NSURF
Section: &SYSTEM
Required for non-adiabatic couplings: the Kohn-Sham states involved in the tran-
sition. For the moment, only one pair of states makes sense, NSURF=1. On the
following line, the orbital numbers of the two Kohn-Sham states and a weight of 1.0
are expected. For singlet-singlet transitions, the ROKS-based Slater transition-state
density (LOW SPIN EXCITATION LSETS) should be used. For doublet-doublet
transitions, the local spin-density approximation (LSD) with the occupation numbers
(OCCUPATION, NSUP, STATES) of the corresponding Slater transition-state
density should be used.
CUBECENTER
Section: &PROP
Sets the center of the cubeles produced by the CUBEFILE ag. The next line
has to contain the coordinates of the center in Bohr or Angstrom, depending on
whether the ANGSTROM keyword was given. Default is the geometric center of
the system.
CUBEFILE ORBITALS,DENSITY HALFMESH
Section: &PROP
Plots the requested objects in .CUBE le format. If ORBITALS are demanded, the
total number as well as the indices have to be given on the next and second next line.
HALFMESH reduces the number of grid points per direction by 2, thus reducing the
le size by a factor of 8.
CUTOFF [SPHERICAL,NOSPHERICAL]
Section: &SYSTEM
The cuto for the plane wave basis in Rydberg is read from the next line. The
keyword SPHERICAL is used with k points in order to have [g +k[
2
< E
cut
instead
of [g[
2
< E
cut
. This is the default.
35
DAMPING {IONS,ELECTRONS,CELL}
Section: &CPMD
Add a damping factor f
damp
(x) = v(x) to the ionic, electronic, or cell forces in
every time step. The scaling factor is read from the next line. Useful values depend
on the employed masses are generally in the range 5.0 50.0.
Damping can be used as a more ecient alternative to ANNEALING for wavefunc-
tion, geometry or cell optimization (and particularly combinations thereof) of systems
where the faster methods (e.g. ODIIS, PCG, LBFGS, GDIIS) fail to converge or
may converge to the wrong state.
DAVIDSON DIAGONALIZATION
Section: &CPMD
Use Davidson diagonalization scheme.[108]
DAVIDSON PARAMETER
Section: &CPMD
This keyword controls the Davidson diagonalization routine used to determine the
Kohn-Sham energies.
The maximum number of additional vectors to construct the Davidson matrix, the
convergence criterion and the maximum number of steps are read from the next line.
Defaults are 10
5
and the same number as states to be optimized. If the system
has 20 occupied states and you ask for 5 unoccupied states, the default number
of additional vectors is 25. By using less than 25 some memory can be saved but
convergence might be somewhat slower.
DAVIDSON PARAMETER
Section: &TDDFT
The maximum number of Davidson iterations, the convergence criteria for the eigen-
vectors and the maximal size of the Davidson subspace are set. The three parameters
ndavmax, epstdav, ndavspace are read from the next line.
Default values are 100 , 10
10
and 10 .
36
DAVIDSON RDIIS
Section: &TDDFT
This keyword controls the residual DIIS method for TDDFT diagonalization. This
method is used at the end of a DAVIDSON diagonalization for roots that are not yet
converged. The rst number gives the maxium iterations, the second the maximum
allowed restarts, and the third the maximum residual allowed when the method is
invoked.
Default values are 20 , 3 and 10
3
.
DEBROGLIE [CENTROID]
Section: &PIMD
An initial conguration assuming quantum free particle behavior is generated for each
individual atom according to its physical mass at the temperature given in Kelvin on
the following input line. Using DEBROGLIE each nuclear position obtained from the
&ATOMS . . . &END section serves as the starting point for a Gaussian Levy walk of
length P in three dimensions, see e.g. Ref. [90]. Using DEBROGLIE CENTROID each
nuclear position obtained from the &ATOMS . . . &END section serves as the centroid
(center of geometry) for obtaining the centroid (center of geometry) for obtaining the
P normal modes in three dimensions, see e.g. Ref. [14]. This option does only specify
the generation of the initial conguration if INITIALIZATION and GENERATE
REPLICAS are active. Default is DEBROGLIE CENTROID and 500 Kelvin.
DEBUG CODE
Section: &CPMD
Very verbose output concerning subroutine calls for debugging purpose.
DEBUG FILEOPEN
Section: &CPMD
Very verbose output concerning opening les for debugging purpose.
DEBUG FORCES
Section: &CPMD
Very verbose output concerning the calculation of each contribution to the forces for
debugging purpose.
DEBUG MEMORY
Section: &CPMD
Very verbose output concerning memory for debugging purpose.
37
DEBUG NOACC
Section: &CPMD
Do not read/write accumulator information from/to the RESTART le. This avoids
putting timing information to the restart and makes restart les identical for otherwise
identical runs.
DENSITY CUTOFF [NUMBER]
Section: &SYSTEM
Set the plane wave energy cuto for the density. The value is read from the next
line. The density cuto is usally automatically determined from the wavefunction
CUTOFF via the DUAL factor.
With the additional ag NUMBER the number of plane waves can be specied
directly. This is useful to calculate bulk modulus or properties depending on the
volume. The given energy cuto has to be bigger than the one to have the required
plane wave density number.
DIAGONALIZER {DAVIDSON,NONHERMIT,PCG} [MINIMIZE]
Section: &TDDFT
Specify the iterative diagonalizer to be used.
Defaults are DAVIDSON for the TammDanco method, NONHERMIT (a non-
hermitian Davidson method) for TDDFT LR and PCG (Conjugate gradients) for the
optimized subspace method. The additional keyword MINIMIZE applies to the PCG
method only. It forces a line minimization with quadratic search.
Default is not to use line minimization .
DIAGONAL [OFF]
Section: &HARDNESS
Not documented
DIFF FORMULA
Section: &LINRES
Number of points used in nite dierence formula for second derivatives of exchange
correlation functionals. Default is two point central dierences.
38
DIIS MIXING
Section: &CPMD
Use the direct inversion iterative scheme to mix density.
Read in the next line the number of previous densities (NRDIIS) for the mixing
(however not useful).
DIIS MIXING [N = n]
Section: &CPMD
Like DIIS MIXING, but number of previous densities for the mixing can be specied
as a function of the density.
n dierent thresholds for the density can be set. The program reads n lines with
a threshold density and a NRDIIS number (number of previous densities for the
mixing). Numbers NRDIIS have to increase. If the NRDIIS is equal to 0, Anderson
mixing is used. Very ecient is to use Anderson mixing and afterwards DIIS mixing.
DIPOLE DYNAMICS {SAMPLE,WANNIER}
Section: &CPMD
Calculate the dipole moment [109, 110] every NSTEP iteration in MD.
NSTEP is read from the next line if the keyword SAMPLE is present.
Default is every time step.
The keyword Wannier allows the calculation of optimally localized Wannier
functions[17, 56, 129]. The procedure used is equivalent (for single k-point) to Boys
localization.
The produced output is IONS+CENTERS.xyz, IONS+CENTERS, DIPOLE, WAN-
NIER CENTER and WANNIER DOS. The localization procedure is controlled by
the following keywords.
DIPOLE MOMENT [BERRY,RS]
Section: &PROP
Calculate the dipole moment.
Without the additional keywords BERRY or RS this is only implemented for simple
cubic and fcc supercells. The keyword RS requests the use of the real-space algorithm.
The keyword BERRY requests the use of the Berry phase algorithm.
39
DISTRIBUTED LINALG {ON,OFF}
Section: &CPMD
Perform linear algebra calculations using distributed memory algorithms. Setting this
option ON will also enable (distributed) initialization from atomic wavefunctions using
a parallel Lanczos algorithm [143]. Note that distributed initialization is not available
with KPOINTS calculations. In this case, initialization from atomic wavefunctions
will involve replicated calculations.
When setting LINALG ONthe keyword BLOCKSIZE STATES becomes relevant
(see entry). The number of BLOCKSIZE STATES must be an exact divisor of
the number of STATES.
DISTRIBUTE FNL
Section: &CPMD
The array FNL is distributed in parallel runs.
DUAL
Section: &SYSTEM
The ratio between the wavefunction energy CUTOFF and the DENSITY CUT-
OFF is read from the next line.
Default is 4.
There is little need to change this parameter, except when using ultra-soft pseudopo-
tentials, where the wavefunction cuto is very low and the corresponding density
cuto is too low to represent the augmentation charges accurately. In order to main-
tain good energy conservation and have good convergens of wavefunctions and related
parameters, DUAL needs to be increased to values of 610.
Warning: You can have some trouble if you use the DUAL option with the sym-
metrization of the electronic density.
40
DUMMY ATOMS
Section: &ATOMS
The denition of dummy atoms follows this keyword.
Three dierent kinds of dummy atoms are implemented. Type 1 is xed in space,
type 2 lies at the arithmetic mean, type 3 at the center of mass of the coordinates of
real atoms.
The rst line contains the total number of dummy atoms. The following lines start
with the type label TYPE1, TYPE2, TYPE3.
For type 1 dummy atoms the label is followed by the Cartesian coordinates.
For type 2 and type 3 dummy atoms the rst number species the total number of
atoms involved in the denition of the dummy atom. Then the number of these atoms
has to be specied on the same line. A negative number of atoms stands for all atoms.
Example:
DUMMY ATOMS
3
TYPE1 0.0 0.0 0.0
TYPE2 2 1 4
TYPE3 -1
Note: Indices of dummy atoms always start with
total-number-of-atoms plus 1. In the case of a Gromos-QM/MM interface simulations
with dummy hydrogen atoms for capping, it is total-number-of-atoms plus number-
of-dummy-hydrogens plus 1
ELECTRONIC SPECTRA
Section: &CPMD
Perform a TDDFT calculation [112, 113] to determine the electronic spectra. See
below under Electronic Spectra and under the other keywords for the input sections
&LINRES and &TDDFT for further options.
ELECTROSTATIC POTENTIAL [SAMPLE=nrhoout]
Section: &CPMD
Store the electrostatic potential on le. The resulting le is written in platform specic
binary format. You can use the cpmd2cube tool to convert it into a Gaussian cube
le for visualization. Note that this ag automatically activates the RHOOUT ag
as well.
With the optional keyword SAMPLE the le will be written every nrhoout steps
during an MD trajectory. The corresponding time step number will be appended to
the lename.
41
ELF [PARAMETER]
Section: &CPMD
Store the total valence density and the valence electron localization function ELF [80,
81, 101, 102] on les. The default smoothing parameters for ELF can be changed
optionally when specifying in addition the PARAMETER keyword. Then the two
parameters elfcut and elfeps are read from the next line. The particular form of
ELF that is implemented is dened in the header of the subroutine elf.F. Note: it is
a very good idea to increase the planewave cuto and then specify elfcut = 0.0 and
elfeps = 0.0 if you want to obtain a smooth ELF for a given nuclear conguration.
In the case of a spinpolarized (i.e. spin unrestricted) DFT calculation (see keyword
LSD) in addition the spinpolarized average of ELF as well as the separate and
orbital parts are written to the les LSD ELF, ELF ALPHA and ELF BETA,
respectively; see Ref. [82] for denitions and further infos. Note: ELF does not make
much sense when using Vanderbilts ultra-soft pseudopotentials!
EMASS
Section: &CPMD
The ctitious electron mass in atomic units is read from the next line.
Default is 400 a.u..
ENERGY PROFILE
Section: &SYSTEM
Perform an energy prole calculation at the end of a wavefunction optimization using
the ROKS or ROSS methods.
ENERGYBANDS
Section: &CPMD
Write the band energies (eigenvalues) for k points in the le ENERGYBANDS.
42
EPR options, see response p.inc
Section: &RESP
Calculate the EPR g tensor for the system. This routine accepts most, if not all, of
the options available in the NMR routine (RESTART, NOSMOOTH, NOVIRTUAL,
PSI0, RHO0, OVERLAP and FULL). Most important new options are:
FULL SMART: does a calculation with improved accuracy. A threshold value (be-
tween 0 and 1) must be present on the next line. The higher the threshold value, the
lower the computational cost, but this will also reduce the accuracy (a bit). Typically,
a value of 0.05 should be ne.
OWNOPT: for the calculation of the g tensor, an eective potential is needed. By de-
fault, the EPR routine uses the local potential (V
LOC
= V
PP,LOC
+V
HARTREE
+V
XC
).
This works well with Goedecker pseudopotentials, but rather poor with Troullier-
Martins pseudopotentials. When using this option, the following potential is used
instead:
V
EFF
=
Z
r
erf(r/r
c
) +V
HARTREE
+V
XC
and r
c
(greater than 0) is read on the next line.
HYP: calculates the hyperne tensors. See epr hyp.F for details.
Contact [email protected] should you require further information.
EXCHANGE CORRELATION TABLE [NO]
Section: &DFT
Species the range and the granularity of the lookup table for the local exchange-
correlation energy and potential. The number of table entries and the maximum
density have to be given on the next line.
Note that this keyword is only relevant when using OLDCODE and even then it is
set to NO be default. Previous default values were 30000 and 2.0.
EXCITED DIPOLE
Section: &PROP
Calculate the dierence of dipole moments between the ground state density and a
density generated by dierently occupied Kohn-Sham orbitals.
On the next line the number of dipole moments to calculate and the total number
orbitals has to be given. On the following lines the occupation of the states for each
calculation has to be given. By default the dipoles are calculated by the method
used for the DIPOLE MOMENT option and the same restrictions apply. If the
LOCAL DIPOLE option is specied the dipole moment dierences are calculated
within the same boxes.
EXTERNAL POTENTIAL {ADD}
Section: &CPMD
Read an external potential from le. With ADD specied, its eects is added to the
forces acting on the ions.
43
EXTERNAL FIELD
Section: &SYSTEM
Applies an external electric eld to the system using the Berry phase. The electric
eld vector in AU is read from the next line.
EXTRAPOLATE WFN {STORE}
Section: &CPMD
Read the number of wavefunctions to retain from the next line.
These wavefunctions are used to extrapolate the initial guess wavefunction in Born-
Oppenheimer MD. This can help to speed up BO-MD runs signicantly by reducing
the number of wavefunction optimization steps needed through two eects: the initial
guess wavefunction is much improved and also you do not need to converge as tightly
to conserve energy. BO-MD without needs CONVERGENCE ORBITALS to be set
to 1.0e-7 or smaller to maintain good energy conservation.
With the additional keyword STORE the wavefunction history is also written to
restart les. See RESTART for how to read it back.
FACMASS
Section: &PIMD
Obtain the ctitious nuclear masses M
I
within path integral molecular dynamics
from the real physical atomic masses M
I
(as tabulated in the DATA ATWT / . . . /
statement in atoms.F) by multiplying them with the dimensionless factor WMASS
that is read from the following line; if the NORMAL MODES or STAGING propagator
is used obtain M
(s)
I
= WMASS M
(s)
I
for all replicas s = 1, . . . , P; see e.g. Ref. [99]
eq. (2.37) for nomenclature.
Default value of WMASS is 1.0
FACTOR
Section: &PATH
Step for propagating string (see [145]).
Default value is 1.0
44
FFTW WISDOM [ON,OFF]
Section: &CPMD
Controls the use of the wisdom facility when using FFTW or compatible libraries.
When enabled, CPMD will switch to using the measure mode, which enables search-
ing for additional runtime optimizations of the FFT. The resulting parameters will be
written to a le called FFTW WISDOM and re-read on subsequent runs. The param-
eters in the le are machine specic and when moving a job to a dierent machine,
the le should be deleted.
The use of tw wisdom incurs additional overhead and thus may lead to slower ex-
ecution. It is recommended to stick with the default settings unless you know what
you are doing.
FILE FUSION
Section: &CPMD
Reads in two separate RESTART les for ground state and ROKS excited state
and writes them into a single restart le.
Required to start SURFACE HOPPING calculations.
FILEPATH
Section: &CPMD
The path to the les written by CPMD (RESTART.x, MOVIE, ENERGIES, DEN-
SITY.x etc.) is read from the next line. This overwrites the value given in the
environment variable CPMD FILEPATH. Default is the current directory.
FINITE DIFFERENCES
Section: &CPMD
The step length in a nite dierence run for vibrational frequencies (VIBRATIONAL
ANALYSIS keywords) is read from the next line.
With the keywords COORD=coord fdi(1..3) and RADIUS=radius put in the
same line as the step length, you can specify a sphere in order to calculate the
nite dierences only for the atoms inside it. The sphere is centered on the position
coord fdi(1..3) with a radius radius (useful for a point defect).
NOTE: The the step length for the nite dierence is always in Bohr (default is
1.0d-2 a.u.). The (optional) coordinates of the center and the radius are read in either
Angstrom or Bohr, depending on whether the ANGSTROM keyword is specied
or not.
45
FIXRHO UPWFN [VECT LOOP WFTOL]
Section: &CPMD
Wavefunctions optimization with the method of direct inversion of the iterative sub-
space (DIIS), performed without updating the charge density at each step. When
the orbital energy gradients are below the given tolerance or when the maximum
number of iterations is reached, the KS energies and the occupation numbers are cal-
culated, the density is updated, and a new wavefunction optimization is started. The
variations of the density coecients are used as convergence criterium. The default
electron temperature is 1000 K and 4 unoccupied states are added. Implemented also
for k-points. Only one sub-option is allowed per line and the respective parameter is
read from the next line. The parameters mean:
VECT: The number of DIIS vectors is read from the next line. (ODIIS
with 4 vectors is the default).
LOOP: the minimum and maximum number of DIIS iterations per each
wfn optimization is read from the following line. Default values
are 4 and 20.
WFTOL: The convergence tolerance for the wfn optimization during the
ODIIS is read from the following line. The default value is 10
7
.
The program adjusts this criterion automatically, depending on
the convergence status of the density. As the density improves
(when the density updates become smaller), also the wavefunction
convergence criterion is set to its nal value.
FORCE FIELD ... END FORCE FIELD
Section: &CLASSIC
FORCEMATCH
Section: &CPMD
Activates the QM/MM force matching procedure. This keywords requires the pres-
ence of a &QMMM ... &END section with a correspoding FORCEMATCH ...
END FORCEMATCH block. See sections 11.14 and 11.14.11 for more details.
FORCE STATE
Section: &TDDFT
The state for which the forces are calculated is read from the next line. Default is for
state 1.
46
FREE ENERGY FUNCTIONAL
Section: &CPMD
Calculates the electronic free energy using free energy density functional [13, 88, 89]
from DFT at nite temperature.
This option needs additional keywords (free energy keywords).
By default we use Lanczos diagonalization with Trotter factorization and Bo-
goliubov correction. If the number of states is not specied, use N
electrons
/2 + 4.
FREEZE QUANTUM
Section: &CLASSIC
Freeze the quantum atoms and performs a classical MD on the others (in QMMM
mode only !).
FULL TRAJECTORY
Section: &CLASSIC
Not documented
FUNCTIONAL functionals
Section: &DFT
Single keyword for setting up XC-functionals.
Available functionals are NONE, SONLY, LDA (in PADE form),
BONLY, BP, BLYP, XLYP, GGA (=PW91), PBE, PBES, REVPBE,
HCTH, OPTX, OLYP, TPSS, PBE0, B1LYP, B3LYP, X3LYP,PBES
FUKUI [N=nf ]
Section: &RESP
Calculates the response to a change of occupation number of chosen orbitals. The
indices of these orbitals are read from the following nf lines (default nf=1). The
orbitals themselves are not read from any RESTART le but from WAVEFUNC-
TION.* les generated with RHOOUT in the &CPMD section; to recall this the
orbital numbers have to be negative, just like for the RHOOUT keyword.
A weight can be associated with each orbital if given just after the orbital number,
on the same line. It corresponds to saying how many electrons are put in or taken
from the orbital. For example;
FUKUI N=2
-i 1.0
-j -1.0
corresponds to the response to taking one electron from orbital i and put it in orbital
j.
47
GAUGE {PARA,GEN,ALL}
Section: &LINRES
Gauge of the linear-response wavefunctions. Default is the parallel-transport gauge
(PARA) for closed-shell calculations and a sensible combination of the parallel-
transport gauge and the full-rotation gauge (GEN) for all other cases. The full-
rotation gauge can be enforced for all states by selecting ALL. See [94].
GC-CUTOFF
Section: &DFT
On the next line the density cuto for the calculation of the gradient correction has to
be specied. The default value is 10
8
. Experience showed that for a small CUTOFF
value (e.g. when using Vanderbilt pseudopotentials) a bigger values have to be used.
A reasonable value for a 25 ryd cuto calculation is 5 10
6
.
Warning: for the HCTH functional, since it includes both the xc part and the
gradient correction in a unique functional, a GC-CUTOFF too high (e.g. 5 10
5
)
could result in not including any xc part with uncontrolled related consequences.
GDIIS
Section: &CPMD
Use the method of direct inversion in the iterative subspace combined with a quasi-
Newton method (using BFGS) for optimization of the ionic positions [58].The number
of DIIS vectors is read from the next line.
GDIIS with 5 vectors is the default method in optimization runs.
GENERATE COORDINATES
Section: &ATOMS
The number of generator atoms for each species are read from the next line.
These atoms are used together with the point group information to generate all other
atomic positions. The input still has to have entries for all atoms but their coordinates
are overwritten. Also the total number of atoms per species has to be correct.
GENERATE REPLICAS
Section: &PIMD
Generate quantum free particle replicas from scratch given a classical input congu-
ration according to the keyword DEBROGLIE specication. This is the default if
INITIALIZATION is active.
48
GRADIENT CORRECTION [functionals]
Section: &DFT
Individual components of gradient corrected functionals can be selected. Rarely
needed anymore, use the FUNCTIONAL keyword instead.
Functionals implemented are for the exchange energy:
BECKE88 [64], GGAX [68] PBEX [69], REVPBEX [70],
HCTH [71], OPTX [72],PBESX [144]
and for the correlation part:
PERDEW86 [66], LYP [63], GGAC [68], PBEC [69], REVPBEC [70], HCTH
[71] OLYP [72],PBESC [144].
Note that for HCTH, exchange and correlation are treated as a unique functional.
The keywords EXCHANGE and CORRELATION can be used for the default
functionals (currently BECKE88 and PERDEW86). If no functionals are specied
the default functionals for exchange and correlation are used.
GSHELL
Section: &CPMD
Write a le GSHELL with the information on the plane waves for further use in S(q)
calculations.
HAMILTONIAN CUTOFF
Section: &CPMD
The lower cuto for the diagonal approximation to the Kohn-Sham matrix [40] is read
from the next line.
Default is 0.5 atomic units.
For variable cell dynamics only the kinetic energy as calculated for the reference cell
is used.
HAMILTONIAN CUTOFF
Section: &RESP
The value where the preconditioner (the approximate Greens function (V
kin
+V
coul
KS
)
1
) is truncated. HTHRS can also be used. Default value is 0.5.
HARMONIC REFERENCE SYSTEM [OFF]
Section: &CPMD
Switches harmonic reference system integration [40] on/o.
The number of shells included in the analytic integration is controlled with the key-
word HAMILTONIAN CUTOFF.
By default this option is switched o.
49
HARTREE-FOCK
Section: &DFT
Do a HartreeFock calculation. This only works correctly for isolated systems. It
should be used with care, it needs enormous amounts of CPU time.
HARTREE
Section: &DFT
Do a Hartree calculation. Only of use for testing purposes.
HESSCORE
Section: &CPMD
Calculates the partial Hessian after relaxation of the enviroment, equivalent to NS-
MAXP=0 (PRFO NSMAXP).
HESSIAN [DISCO,SCHLEGEL,UNIT,PARTIAL]
Section: &CPMD
The initial approximate Hessian for a geometry optimization is constructed using
empirical rules with the DISCO [57] or Schlegels [49] parametrization or simply a unit
matrix is used.
If the option PARTIAL is used the initial approximate Hessian for a geometry
optimization is constructed from a block matrix formed of the parametrized Hessian
and the partial Hessian (of the reaction core). If the reaction core spans the entire
system, its Hessian is simply copied. The keywords RESTART PHESS are required.
HFX CUTOFF
Section: &SYSTEM
Set an additional cuto for wavefunctionand density to be used in the calculation of
exact exchange. Cutos for wavefunctions and densities are read from the next line
in Rydberg units. Defaults are the same cutos as for the normal calculation. Only
lower cutos than the defaults can be specied.
HTHRS
Section: &LINRES
Threshold for Hessian in preconditioner for linear response optimizations. Default is
0.5.
50
IMPLICIT NEWTON RAPHSON{PREC, CONTINUE, VERBOSE, ALTER-
NATIVE, STEP} [N=nreg]
Section: &CPMD
Not documented.
INITIALIZATION
Section: &PIMD
Provide an initial conguration for all replicas as specied either by GENERATE
REPLICAS or by READ REPLICAS. This option is automatically activated if
RESTARTCOORDINATES is not specied. It is defaulted to GENERATE REPLI-
CAS together with DEBROGLIE CENTROID and a temperature of 500 Kelvin.
INITIALIZE WAVEFUNCTION [RANDOM, ATOMS]
Section: &CPMD
The initial guess for wavefunction optimization are either random functions or func-
tions derived from the atomic pseudo-wavefunctions.
Default is to use the atomic pseudo-wavefunctions.
INTERFACE {EGO,GMX} {[MULLIKEN, LOWDIN, ESP, HIRSH-
FELD],PCGFIRST}
Section: &CPMD
Use CPMD together with a classical molecular dynamics code. CPMD and the clas-
sical MD code are run simultaneously and communicate via a le based protocol. See
the le egointer.F for more details. This needs a specially adapted version of the
respective classical MD code. So far, there is an interface[15, 32] to the MD programs
ego[114, 115] and Gromacs[116].
When using the suboption PCGFIRST the code will use PCG MINIMIZE on the
very rst wavefunction optimization and then switch back to DIIS.
INTFILE [READ,WRITE,FILENAME]
Section: &CPMD
This keyword means Interface File and allows to select a special le name in the
reading and writing stages. The le name (max 40 characters) must be supplied in
the next line.
51
ISOLATED MOLECULE
Section: &CPMD
Calculate the ionic temperature assuming that the system consists of an isolated
molecule or cluster.
Note: This keyword aects exclusively the determination of the number of dynamical
degrees of freedom. This keyword does not activate the cluster option SYMME-
TRY 0, but it is activated if SYMMETRY 0 is used unless the keyword QMMM is
set as well. It allows studying an isolated molecule or cluster within periodic boundary
conditions.
ISOTOPE
Section: &ATOMS
Changes the default masses of the atoms.
This keyword has to be followed by NSP lines (number of atom types). In each line
the new mass (in a.m.u.) of the respective species has to be specied (in order of
their denition).
ISOTROPIC CELL
Section: &SYSTEM
Species a constraint on the super cell in constant pressure dynamics or geometry
optimization. The shape of the cell is held xed, only the volume changes.
KEEPREALSPACE
Section: &RESP
Like the standard CPMD option, this keeps the C0 ground state wavefunctions in
the direct space representation during the calculation. Can save a lot of time, but is
incredibly memory intensive.
KOHN-SHAM ENERGIES [OFF,NOWAVEFUNCTION]
Section: &CPMD
Calculation of the Kohn-Sham energies and the corresponding orbitals [7].
The number of empty states that have to be calculated in addition to the occupied
states is read from the next line.
The Kohn-Sham orbitals are stored on the le RESTART.x except if the keyword
NOWAVEFUNCTIONis used. In this case, the program does not allocate memory
for wavefunctions for all k points. It computes eigenvalues k point per k point losing
information about wavefunctions. This keyword is used for band structure calculation
to compute the eigenvalues for many k points.
Default is not to calculate Kohn-Sham energies (OFF ).
Warning: The usage of this keyword needs special care (especially restarts).
52
KPERT [MONKHORSTPACK,SCALE]
Section: &RESP
Calculation of total energy and electronic density of states with an arbitraty number
of k-points (at almost no additional computational eort). The method is based
on a k plike approximation developed in the framework of the density functional
perturbation theory [24]. For a sampling of the BZ determined by the Monkhorst-
Pack algorithm, the option MONKHORSTPACK has to be specied, followed by
the dimension of the mesh along the 3 reciprocal space axis (NK
1
, NK
2
, NK
3
). If
omitted, the individual absolute coordinates of the k-points have to be given one by
one in the following lines. The SCALE option allows to specify them in units of the
reciprocal cell vectors.
The line after KPERT has to contain the the total number of k-points (NKPTS),
which have then to be given by their coordinates and the associated weights
(RK, WK) in the format:
NKPTS
RK
x1
RK
y1
RK
z1
WK
1
. . .
RK
xNKPTS
RK
yNKPTS
RK
zNKPTS
WK
NKPTS
.
Three response wavefunctions are calculated, corresponding to the three independent
orientations of the k basis vectors in reciprocal space. Therefore, 3 independent op-
timization loops are started (x, y and z), and the 3 sets of wfns are stored (you need
4 times the memory required for a standard wavefunction optimization). The second
order correction to the -point total energy is calculated for the requested k-point
mesh.
Further options are (each in a new line of the input le ):
WRITE C1 the 3 sets of response wfns are stored in three separate restart les.
HAMILTONIAN the k-dependent Hamiltonian is constructed via the second or-
der perturbation theory approximation, and the corresponding KS energies are
calculated. Due to technical reasons, for each k-point 2 NSTATE KS ener-
gies are calculated, however only those corresponding to occupied orbitals are
reliable.
READ C1 the response wfns are read from RESTART.P xyz.
BUILD C00 the set of k-dependent wfns (rst order correction) is calculated from
the unperturbed -point wfns together with the response orbitals. They are
then written in a standard RESTART le. From this restart le one can
perform a calculation of the Hamiltonian matrix for each kpoint and calculate
the KS energies (use LANCZOS DIAGO in &CPMD and the KPOINT
option ONLYDIAG in &SYSTEM. The k-point mesh must be the same used
in the linear response calculation. set also NOSPHERICAL CUTOFF in
&SYSTEM).
NORESTART no RESTART le is written.
KPOINTS options
Section: &SYSTEM
With no option, read in the next line with the number of k-points and for each k-point,
read the components in the Cartesian coordinates (units 2/a) and the weight.
53
MONKHORST-PACK Read in the next line three numbers for the Monkhorst-Pack mesh.
The program calculates then the special k-points. With the keyword SHIFT=kx ky kz in
the same line, you can precise the constant vector shift.
SYMMETRIZED Symmetrized special k-points mesh (useful if you use a constant vector shift).
FULL Construct full Monkhorst-Pack mesh with only inversion symmetry. Useful for molecular
dynamics simulation The keywords SYMMETRIZED FULL preserves all symmetry of
Bravais lattice so there is no need to symmetrize density and forces.
SCALED You can give k-points in reciprocal space coordinates.
BANDS This option is to calculate the band structure.
For each line you have to specify the number of k-points for the band, the initial and the
nal k-point. To nish the input, put:
0 0. 0. 0. 0. 0. 0.
BLOCK=n [OPTIONS] The block option, species the number of k-points in the memory.
The program uses a swap le to store the wavefunctions only by default. With the following
options, you can change this behaviour:
ALL Three swap les are used to store wavefunctions and others arrays related to k-points.
Swap les are in the current directory or the temporary directory given by environment
variable TMPDIR. The use of memory is smaller than with the above option.
CALCULATED One swap le is used to store only wavefunctions. The other arrays related
to k-points are calculated each time if needed.
NOSWAP The wavefunctions are not swapped. This is useful to calculate eigenvalues for
each k point with few memory used.
Warning: The wavefunctions calculated are irrelevant. You have to specify explicitly
some other options to use it:
MAXSTEP 1 and
STORE OFF WAVEFUNCTIONS DENSITY POTENTIAL.
LANCZOS DIAGONALIZATION {ALL}
Section: &CPMD
Use Lanczos diagonalization scheme.
Default with free energy functional.
LANCZOS DIAGONALIZATION {OPT,RESET=n}
Section: &CPMD
Use Lanczos diagonalization scheme after (OPT) or periodically during (RE-
SET=n) direct wavefunction optimization using ODIIS. The number n species the
number of DIIS resets (ODIIS NO RESET=nreset) due to poor progress until the
wavefunction is diagonalized. This can be helpful if the wavefunction is converging
very slowly.
54
LANCZOS PARAMETER [N=n] [ALL]
Section: &CPMD
Give four parameters for Lanczos diagonalization in the next line:
Maximal number of Lanczos iterations (50 is enough),
Maximal number for the Krylov sub-space (8 best value),
Blocking dimension ( NSTATE, best in range 20-100) If you put a negative
or zero number, this parameter is xed by the program in function of the number
of states ((n + 1)/(int(n/100 + 1))).
Tolerance for the accuracy of wavefunctions
(10
8
otherwise 10
12
with Trotter approximation)
If n is specied, read n1 lines after the rst one, containing a threshold density and
a tolerance. See the hints section 11.12.1 for more information.
LANCZOS [CONTINUE,DETAILS]
Section: &RESP
lanczos dim iterations conv threshold lanczos dim= dimension of the vibrational d.o.f.
iterations = no. of iterations desired for this run conv threshold = threshold for con-
vergence on eigenvectors CONTINUE = argument for continuing Lanczos diagonaliza-
tion from a previous run (reads le LANCZOS CONTINUE) DETAILS = argument
for verbosity. prints a lot of stu
LBFGS [NREM, NTRUST, NRESTT, TRUSTR]
Section: &CPMD
Use the limited-memory BFGS method (L-BFGS) for linear scaling optimization
of the ionic positions. For more informations, see [25]. The information about the
Hessian for the quasi-Newton method employed is derived from the history of the
optimization [25, 45].
Only one sub-option is allowed per line and the respective parameter is read from the
next line. The parameters mean:
NREM: Number of ionic gradients and displacements remembered
to approximate the Hessian. The default is either 40 or the num-
ber of ionic degrees of freedom, whichever is smaller. Values
greater the number of degrees of freedom are not advisable.
NTRUST: NTRUST=1 switches from a trust radius algorithm to a line
search algorithm. The default value of 0 (trust radius) is rec-
ommended.
NRESTT: NRESTT>0 demands a periodic reset of the optimizer every
NRESTT steps. Default is 0 (no periodic reset). This option
makes only sense if the ionic gradient is not accurate.
TRUSTR: Maximum and initial trust radius. Default is 0.5 atomic units.
It can be useful to combine these keywords with the keywords PRFO, CONVER-
GENCE ADAPT, RESTART LSSTAT, PRINT LSCAL ON and others.
55
LDA CORRELATION [functional]
Section: &DFT
The LDA correlation functional is specied.
Possible functionals are NO (no correlation functional), PZ [65], VWN [62],
LYP [63] and PW [67].
Default is the PZ, the Perdew and Zunger t to the data of Ceperley and Alder [61].
LDOS
Section: &PROP
Calculate the layer projected density of states. The number of layers is read from
the next line.
To use the LDOS keyword, the user must rst have performed a wavefunction
optimization and then restart with with the PROPERTIES and LANCZOS
DIAGONALIZATION keywords in the &CPMD section (and LDOS in the
&PROP section).
Warning: If you use special k-points for a special structure you need to symmetrize
charge density for which you must specify the POINT GROUP.
LINEAR RESPONSE
Section: &CPMD
A perturbation theory calculation is done, according to the (required) further input in
the &RESP section. In the latter, one of the possible perturbation types (PHONONS,
LANCZOS, RAMAN, FUKUI, KPERT, NMR, EPR, see section 11.9.2) can be cho-
sen, accompagnied by further options.
LOCAL DIPOLE
Section: &PROP
Calculate numloc local dipole moments.
numloc is read from the next line followed by two numloc lines with the format:
xmin ymin zmin
xmax ymax zmax
LOCALIZATION
Section: &TDDFT
Use localized orbitals in the TDDFT calculation. Default is to use canonical orbitals.
56
LOCALIZE
Section: &HARDNESS
Use localized orbitals in an orbital hardness calculation
LOCALIZE
Section: &PROP
Localize the molecular orbitals as dened through the atomic basis set.
The same localization transformation is then applied also to the wavefunctions in the
plane wave basis. These wavefunction can be printed with the keyword RHOOUT
specied in the section &CPMD . . . &END.
LR KERNEL functional
Section: &DFT
Use another functional for the linear response kernel.
LR-TDDFT
Section: &TDDFT
Use full linear response version of TDDFT. Default is to use TAMM-DANCOFF
approximation.
LSD
Section: &CPMD
Use the local spin density approximation.
Warning: Not all functionals are implemented for this option.
LOCAL SPIN DENSITY
Section: &CPMD
Use the local spin density approximation.
Warning: Not all functionals are implemented for this option.
LOW SPIN EXCITATION [ROKS,ROSS,ROOTHAAN,CAS22]
Section: &SYSTEM
Use the low spin excited state functional [30]. For ROKS calculations, see also the
ROKS keyword in the &CPMD-section.
57
LOW SPIN EXCITATION LSETS
Section: &SYSTEM
Slater transition-state density with restricted open-shell Kohn-Sham (low spin excited
state). Currently works only with ROKS but not with ROSS, ROOTHAAN, or
CAS22. See Ref. [94].
LSE PARAMETERS
Section: &SYSTEM
Determines the energy expression used in LSE calculations. The two parameters
LSEA and LSEB are read from the next line.
E = LSEA E(Mixed) + LSEB E(Triplet)
The default (LSEA = 2 and LSEB = 1) corresponds to singlet symmetry. For the
lowest triplet state, the LSE PARAMETERS must be set to 0 and 1 (zero times
mixed state plus triplet). See ref [30] for a description of the method.
LZ-SHTDDFT
Section: &TDDFT
Non adiabatic (nonadiabatic, non-adiabatic) trajectory surface hopping scheme based
on Landau-Zener transition probabilities. Excited state dynamics is performed on
TDDFT potential energy surfaces. To be used together with the keywords MOLEC-
ULAR DYNAMICS BO and TDDFT in the &CPMD section (see section ??).
Do NOT use this keyword together with SURFACE HOPPING in &CPMD, which
invokes the surface hopping scheme based on ROKS (see SURFACE HOPPING).
See also the related approach beased on Tullys hopping probabilities T-SHTDDFT.
MAXCPUTIME
Section: &CPMD
The maximum CPU TIME in seconds to be used is read from the next line. The
calculation will stop after the given amount of time.
Default is no limit.
MAXITER
Section: &CPMD
The maximum number of iteration steps for the self-consistency of wavefunctions.
Recommended use instead of MAXSTEP for pure wavefunction optimisation. The
value is read from the next line.
Default is 10000 steps.
58
MAXSTEP
Section: &CPMD
The maximum number of steps for geometry optimization or molecular dynamics to
be performed. In the case of pure wavefunction optimisation, this keyword may be
used instead of MAXITER. The value is read from the next line.
Default is 10000 steps.
MAXSTEP
Section: &LINRES
Maximum number of optimization steps for linear response optimizations. Default is
1000.
MEMORY {SMALL, BIG}
Section: &CPMD
Using BIG, the structure factors for the density cuto are only calculated once and
stored for reuse.
This option allows for considerable time savings in connection with Vanderbilt pseu-
dopotentials.
Default is (SMALL) to recalculate them whenever needed.
MESH
Section: &SYSTEM
The number of real space mesh points in x, y and zdirection is read from the
next line.
If the values provided by the user are not compatible with the plane-wave cuto or the
requirements of the FFT routines the program chooses the next bigger valid numbers.
Default are the minimal values compatible with the energy cuto and the FFT
requirements.
METADYNAMICS ... END METADYNAMICS
Section: &ATOMS
Initiate Metadynamics (see section 11.10 for more information on the available options
and the input format).
MIRROR
Section: &CPMD
Write the input le to the output.
59
MIXDIIS
Section: &CPMD
Not documented
MIXSD
Section: &CPMD
Not documented
MODIFIED GOEDECKER [PARAMETERS]
Section: &CPMD
To be used in combination with LOW SPIN EXCITATION ROKS.
Calculation of the o-diagonal Kohn-Sham matrix elements F
AB
and F
BA
(with A,
B: ROKS-SOMOs) is performed according to a modied Goedecker-Umrigar scheme
( F
AB
:= (1
AB
)F
AB
+
AB
F
BA
and F
BA
:= (1
BA
)F
BA
+
BA
F
AB
). Default
values are
AB
= 0.5 and
BA
= 0.5. see Ref. [36].
With the optional keyword PARAMETERS:
AB
and
BA
are read from the next
line. Can be used to avoid unphysical rotation of the SOMOs. Always check the
orbitals!
See also 11.11.
MOLECULAR DYNAMICS [CP, BO, PT, CLASSICAL, FILE [XYZ,
NSKIP=N, NSAMPLE=M]]
Section: &CPMD
Perform a molecular dynamics (MD) run. CP stands for a Car-Parrinello type MD.
With the option BO a Born-Oppenheimer MD is performed where the wavefunction
is reconverged after each MD-step. CLASSICAL means that a MD that includes
classical atoms is performed.
If FILE is set, then the trajectory is reread from a le instead of being calculated.
This is useful for performing analysis on a previous trajectory. Can be used in con-
jonction with the standard MD options like DIPOLE DYNAMICS and WANNIER;
some other features like LINEAR RESPONSE are also enabled. The trajectory is read
from a le named TRAJSAVED (usually a copy of a previous TRAJECTORY le),
or TRAJSAVED.xyz if XYZ is set. NSKIP and NSAMPLE control the selection
of frames read: the frame read at step ISTEP is NSKIP+ISTEP*NSAMPLE.
Default is CP.
MOLECULAR STATES
Section: &TDDFT
Calculate and group KohnSham orbitals into molecular states for a TDDFT calcu-
lation.
60
MOVERHO
Section: &CPMD
Mixing used during optimization of geometry or molecular dynamics. Use atomic or
pseudowavefunctions to project wavefunctions in order to calculate the new ones with
movement of atoms. Read in the next line the parameter (typically 0.2).
MOVIE TYPE
Section: &ATOMS
Assign special movie atom types to the species.
The types are read from the next line. Values from 0 to 5 were allowed in the original
MOVIE format.
MOVIE [OFF, SAMPLE]
Section: &CPMD
Write the atomic coordinates without applying periodic boundary conditions in
MOVIE format every IMOVIE time steps on le MOVIE. IMOVIE is read from
the next line.
Default is not to write a movie le.
MULTIPLICITY
Section: &SYSTEM
This keyword only applies to LSD calculations.
The multiplicity (2S+1) is read from the next line.
Default is the smallest possible multiplicity.
NEQUI
Section: &PATH
Number of equilibration steps discarded to calculate the mean force.
61
NEWCODE
Section: &DFT
Switch to select one out of two versions of code to calculate exchange-correlation
functionals.
NEWCODE is the default, but not all functionals are available with NEWCODE, if
you select one of these, OLDCODE is used automatically. NEWCODE is highly
recommended for all new projects and especially for vector computers, also some of
the newer functionality is untested or non-functional with OLDCODE.
NLOOP
Section: &PATH
Maximum number of string searches for Mean Free Energy Path searches.
NMR options, see response p.inc
Section: &RESP
Calculate the NMR chemical shielding tensors for the system. Most important option:
FULL, does a calculation with improved accuracy for periodic systems but takes a lot
of time. Isolated systems: Use OVERLAP and 0.1 (on next line) for the same eect.
Be careful for non-hydrogen nuclei. The shielding is calculated without contribution
from the core electrons. Contact [email protected] for further details.
NOGEOCHECK
Section: &CPMD
Default is to check all atomic distances and stop the program if the smallest disctance
is below 0.5 Bohr. This keyword requests not to perform the check.
NONORTHOGONAL ORBITALS [OFF]
Section: &CPMD
Use the norm constraint method [42] for molecular dynamics or nonorthogonal orbitals
in an optimization run.
On the next line the limit of the o diagonal elements of the overlap matrix is dened.
Warning: Adding or deleting this option during a MD run needs special care.
NOOPT
Section: &RESP
Do not perform a ground state wfn optimization. Be sure the restarted wfn is at the
BO-surface.
62
NOPRINT ORBITALS
Section: &PROP
Do not print the wavefunctions in the atomic basis set.
NORMAL MODES
Section: &PIMD
Use the normal mode representation [14] of the path integral propagator. It is possible
to impose a mass disparity between centroid and noncentroid coordinates by dividing
the ctitious masses of only the noncentroid s = 2, . . . , P replicas by the adiabaticity
control factor FACSTAGE. This dimensionless factor must always be specied in the
following line. Note: the eigenfrequencies of the s > 1 replicas are changed by
only
FACSTAGE, see Ref. [92](b). Using FACSTAGE ,= 1.0 makes only sense in
conjunction with CENTROID DYNAMICS where WMASS=1.0 has to be used as
well.
NOSE PARAMETERS
Section: &CPMD
The parameters controlling the Nose thermostats [5, 6] are read in the following
order from the next line:
The length of the Nose-Hoover chain for the ions,
the length of the Nose-Hoover chain for the electrons,
the length of the Nose-Hoover chain for the cell parameters.
(The respective default values are 4.)
The multiplication factor (NEDOF0, a real number) for the number of electronic
degrees of freedom. The used degrees of freedom (NEDOF) are dened as NEDOF =
NEDOF0 X If NEDOF0 is a negative number X is the true number of DOFs, if
its a positive number, X is the number of electronic states (default for NEDOF0 is
6).
The order of the Suzuki/Yoshida integrator (default is 7, choices are 3, 5, 7, 9,
15, 25, 125 and 625),
and the decomposition ratio of the time step (default is 1).
If this keyword is omitted, the defaults are used.
If the keyword is used all parameters have to be specied.
63
NOSE {IONS, ELECTRONS, CELL} [ULTRA,MASSIVE,CAFES,LOCAL]
Section: [T0]
&CPMD
Nose-Hoover chains [5, 6] for the ions, electrons, or cell parameters are used.
The target temperature in Kelvin and the thermostat frequency in cm
1
, re-
spectively the ctitious kinetic energy in atomic units and the thermostat fre-
quency in cm
1
are read from the next line. For the ionic case the additional
keyword ULTRA selects a thermostat for each species, the keyword MASSIVE
selects a thermostat for each degree of freedom, and the keyword CAFES can be
used to give dierent temperatures to dierent groups of atoms[54]. The syntax in
the CAFES case is:
NOSE IONS CAFES
ncafesgrp
cpnumber a 1 cpnumber a 2 Temperature Frequency
. . .
cpnumber n 1 cpnumber n 2 Temperature Frequency
There are ncafesgrp groups, specied by giving their rst CPMD atom number (cp-
number X 1) and last CPMD atom number (cpnumber X 2). In the case of hybrid
QM/MM simulations, you have to consult the QMMM ORDER le to nd those
numbers. The temperature and frequency can be dierent for each group. All atoms
of the system have to be in a CAFES group. A new le, CAFES is created containing
the temperature of each group (cols. 2 . . . ncafesgrp+1) and the energy of the Nose-
Hoover chains of that group (last columns).
Using CAFES with dierent temperatures only makes sense if the dierent groups
are decoupled from each other by increasing the masses of the involved atoms. The
mass can be specied in the topology / or with the ISOTOPE keyword. However,
you can only change the mass of a complete CPMD species at a time. Hence, the
topology and/or the input should be such that atoms of dierent CAFES group are
in dierent species.
NOTE: CAFES is currently not restartable.
The keyword LOCAL collects groups of atoms to seperate thermostats, each having
its own Nose-Hoover chain. Specify the local thermostats as follows:
NOSE IONS LOCAL
n
l
(number of local thermostats)
temperature 1 frequency 1
.
.
.
temperature n
l
frequency n
l
n
r
(number of atom ranges)
thermostat number start atom end atom
.
.
. (n
r
entries)
The parser for the atom ranges uses either the CPMD ordering or the GROMOS
ordering in case of classical or QM/MM runs. Multiple ranges may be specied for
the same thermostat. Atoms belonging to the same CPMD constraint or the same
solvent molecule in QM/MM runs must belong to the same local thermostat.
If T0 option is present, the initial temperature for the Nose-Hoover chains are read
soon after the thermostat frequencies in the same line (also for the LOCAL thermo-
stat). By default it is same as the target temperature of the thermostat. Note: This
is not implemented for the CAFES thermostat.
64
NPREVIOUS
Section: &PATH
String index to restart from. Note that this is just for numbering les, the initial path
in collective variables for the search is always string.inp.
OCCUPATION [FIXED]
Section: &SYSTEM
The occupation numbers are read from the next line.
This keyword must be preceeded by STATES. The FIXED option xes the occupa-
tion numbers for the diagonalization scheme, otherwise this option is meaningless.
ODIIS [NOPRECONDITIONING,NO RESET=nreset]
Section: &CPMD
Use the method of direct inversion in the iterative subspace for optimization of
the wavefunction [43].
The number of DIIS vectors is read from the next line.
(ODIIS with 10 vectors is the default method in optimization runs.)
The preconditioning is controlled by the keyword HAMILTONIAN CUTOFF.
Optionally preconditioning can be disabled.
By default, the number of wavefunction optimization cycles until DIIS is reset on poor
progress, is the number of DIIS vectors. With ODIIS NO RESET, this number
can be changed, or DIIS resets can be disabled altogether with a value of -1.
OLDCODE
Section: &DFT
see NEWCODE
OPTIMIZE GEOMETRY [XYZ, SAMPLE]
Section: &CPMD
This option causes the program to optimize the geometry of the system through a se-
quence of wavefunction optimizations and position updates. The additional keyword
XYZ requests writing the trajectory of the geometry additionally in xmol/xyz-
format in a le GEO OPT.xyz. If the keyword SAMPLE is given, NGXYZ is read
from the next line, and then only every NGXTZ step is written to the xmol/xyz le.
The default is to write every step (NGXYZ = 1).
By default the a BFGS/DIIS algorithm is used (see GDIIS) to updated the ionic po-
sitions. Other options are: LBFGS, PRFO, and STEEPEST DESCENT IONS.
See OPTIMIZE WAVEFUNCTION for details on the corresponding options for
wavefunction optimizations.
65
OPTIMIZE SLATER EXPONENTS
Section: &PROP
Not documented
OPTIMIZE WAVEFUNCTION
Section: &CPMD
Request a single point energy calculation through a wavefunction optimization.
The resulting total energy is printed (for more output options see, e.g.,: PRINT,
RHOOUT, ELF) and a RESTART le is written. This restart le is a prereq-
uisite for many other subsequent calculation types in CPMD, e.g. MOLECULAR
DYNAMICS CP or PROPERTIES. By default a DIIS optimizer is used (see
ODIIS), but other options are: PCG (optionally with MINIMIZE), LANCZOS
DIAGONALIZATION, DAVIDSON DIAGONALIZATION, and STEEP-
EST DESCENT ELECTRONS.
OPTIMIZER [SD,DIIS,PCG,AUTO]
Section: &LINRES
Optimizer to be used for linear response equations. Default is AUTO which will
rst use PCG, then switch to DIIS and nally switch to DIIS with full storage and
state dependent preconditioner. THAUTO sets the two tolerances for when to do
the switch.
ORBITAL HARDNESS [LR,FD]
Section: &CPMD
Perform an orbital hardness calculation. See section &Hardness for further input
options.
ORBITALS
Section: &HARDNESS
Specify the number of orbitals to be used in a hardness calculation on the next line.
ORTHOGONALIZATION {LOWDIN, GRAM-SCHMIDT}
Section: &CPMD
Orthogonalization in optimization runs is done either by a Lowdin (symmetric) or
Gram-Schmidt procedure.
Default is Gram-Schmidt except for parallel runs where Lowdin orthogonalization is
used with the conjugate-gradient scheme.
66
OUTPUT [ALL, GROUPS, PARENT]
Section: &PIMD
Output les for each processor, processor group, or only grandparent. Default is
PARENT to standard output le (Note: some information such as messages for cor-
rect reading / writing of restart les is lost); GROUPS and ALL write to the les
OUTPUT n where n is the group and bead number, respectively.
OUTPUT [ALL, GROUPS, PARENT]
Section: &PATH
Idem as above, here for Mean Free Energy Path runs.
PARRINELLO-RAHMAN {NPT,SHOCK}
Section: &CPMD
To be used together with MOLECULAR DYNAMICS.
A variable cell MD with the Parrinello-Rahman Lagrangian is performed [10,
11]. With the additional keyword a constant NPT MD using the method of Mar-
tyna, Tobias, and Klein [85].
If this keyword is used together with other run options like OPTIMIZE WAVEFUNC-
TIONS, calculations with dierent reference cells can be performed.
With the additional keywork SHOCK
a MD simulation using the multiscale shock method [35] is performed.
PATH INTEGRAL
Section: &CPMD
Perform a path integral molecular dynamics calculation [8, 9].
This keyword requires further input in the section &PIMD ... &END.
PATH MINIMIZATION
Section: &CPMD
Perform a mean free energy path search [145].
This keyword requires further input in the section &PATH ... &END.
PATH SAMPLING
Section: &CPMD
Use CPMD together with a reaction path sampling [111] program. This needs special
software. Note: this keyword has nothing to do with path integral MD as activated
by the keyword PATH INTEGRAL and as specied in the section &PIMD ... &END.
67
PCG PARAMETER
Section: &TDDFT
The parameters for the PCG diagonalization are read from the next line. If MINI-
MIZE was used in the DIAGONALIZER then the total number of steps (default
100) and the convergence criteria (default 10
8
) are read from the next line. Without
minimization in addition the step length (default 0.5) has also to be given.
PCG [MINIMIZE,NOPRECONDITIONING]
Section: &CPMD
Use the method of preconditioned conjugate gradients for optimization of the
wavefunction.
The xed step length is controlled by the keywords TIMESTEP and EMASS.
If the additional option MINIMIZE is chosen, then additionally line searches are
performed to improve the preconditioning.
The preconditioning is controlled by the keyword HAMILTONIAN CUTOFF.
Optionally preconditioning can be disabled.
PHONON
Section: &RESP
Calculate the harmonic frequencies from perturbation theory.
POINT GROUP [MOLECULE], [AUTO], [DELTA=delta]
Section: &SYSTEM
The point group symmetry of the system can be specied in the next line. With the
keyword AUTO in the next line, the space group is determined automatically. This
aects the calculation of nuclear forces and ionic positions. The electronic density
and nuclear forces are symmetrized in function of point group symmetry. The group
number is read from the next line.
Crystal symmetry groups:
1 1 (c1) 9 3m (c3v) 17 4/mmm (d4h) 25 222 (d2)
2 <1>(ci) 10 <3>m(d3d) 18 6 (c6) 26 mm2 (c2v)
3 2 (c2) 11 4 (c4) 19 <6> (c3h) 27 mmm (d2h)
4 m (c1h) 12 <4> (s4) 20 6/m (c6h) 28 23 (t)
5 2/m(c2h) 13 4/m (c4h) 21 622 (d6) 29 m3 (th)
6 3 (c3) 14 422 (d4) 22 6mm (c6v) 30 432 (o)
7 <3>(c3i) 15 4mm (c4v) 23 <6>m2(d3h) 31 <4>3m(td)
8 32 (d3) 16 <4>2m(d2d) 24 6/mmm(d6h) 32 m3m (oh)
68
You can specify the point group by its name using the keyword NAME= followed by
the name of the point group (one of both notations).
For molecular point groups the additional keyword MOLECULE has to be specied.
The Schonies symbol of the group is read in the following format from the next line:
Group symbol; order of principle axis
Possible group symbols are any Schonies symbol with the axis number replaced by
n (e.g. DNH). For molecular point groups a special orientation is assumed. The
principle axis is along z and vertical symmetry planes are orthogonal to x.
DELTA= species the required accuracy (default=10
6
).
With the keyword AUTO, the point group is determined automatically.
POISSON SOLVER {HOCKNEY, TUCKERMAN, MORTENSEN} [PARAME-
TER]
Section: &SYSTEM
This keyword determines the method for the solution of the Poisson equation for
isolated systems. Either Hockneys method [28] or Martyna and Tuckermans
method [77] is used. The smoothing parameter (for Hockneys method) or L
for Tuckermans method can be read from the next line using the PARAMETER
keyword.
For more information about the usage of this parameter see also section 11.4.
POLAK
Section: &RESP
Uses the Polak-Ribiere formula for the conjugate gradient algorithm. Can be safer in
the convergence.
POLARISABILITY
Section: &PROP
Computes the polarisability of a system, intended as dipole moment per unit volume.
POLYMER
Section: &SYSTEM
Assume periodic boundary condition in x-direction.
69
POPULATION ANALYSIS [MULLIKEN, DAVIDSON],[n-CENTER]
Section: &PROP
The type of population analysis that is performed with the projected wavefunctions.
Lowdin charges are given with both options. For the Davidson analysis [78] the
maximum complexity can be specied with the keyword n-CENTER.
Default for n is 2, terms up to 4 are programmed. For the Davidson option one has to
specify the number of atomic orbitals that are used in the analysis. For each species
one has to give this number in a separate line. An input example for a water molecule
is given in the hints section 11.13.
PRESSURE
Section: &SYSTEM
The external pressure on the system is read from the next line (in kbar).
PRFO [MODE, MDLOCK, TRUSTP, OMIN, PRJHES, DISPLACEMENT, HES-
STYPE]
Section: &CPMD
Use the partitioned rational function optimizer (P-RFO) with a quasi-Newton method
for optimization of the ionic positions. For more informations, see [25]. The
approximated Hessian is updated using the Powell method [46]. This method is
used to nd transition states by following eigenmodes of the approximated Hes-
sian [44, 25].
Only one suboption is allowed per line and the respective parameter is read from the
next line. The suboption PRJHES does not take any parameter. If it is present, the
translational and rotational modes are removed from the Hessian. This is only mean-
ingful for conventional (not microiterative) transition state search. The parameters
mean:
MODE: Number of the initial Hessian eigenmode to be followed. De-
fault is 1 (lowest eigenvalue).
MDLOCK: MDLOCK=1 switches from a mode following algorithm to a
xed eigenvector to be maximized. The default value of 0
(mode following) is recommended.
TRUSTP: Maximum and initial trust radius. Default is 0.2 atomic units.
OMIN: This parameter is the minimum overlap between the max-
imized mode of the previous step and the most overlapping
eigenvector of the current Hessian. The trust radius is reduced
until this requirement is fullled. The default is 0.5.
DISPLACEMENT: Finite-dierence displacement for initial partial Hessian. The
default is 0.02.
HESSTYPE: Type of initial partial Hessian. 0: Finite-dierence. 1: Taken
from the full Hessian assuming a block-diagonal form. See key-
word HESSIAN. The default is 0.
It can be useful to combine these keywords with the keywords CONVERGENCE
ENERGY, RESTART LSSTAT, RESTART PHESS, PRFO NSVIB, PRINT
LSCAL ON and others.
70
PRFO [NVAR, CORE, TOLENV, NSMAXP]
Section: &CPMD
If any of these suboptions is present, the microiterative transition state search
scheme for optimization of the ionic positions is used. For more informations,
see [25]. A combination of the L-BFGS and P-RFO methods is employed for linear
scaling search for transition states [25, 47]. Before each P-RFO step in the reaction
core towards the transition state, the environment is fully relaxed using L-BFGS.
Only one suboption is allowed per line. The reaction core can be selected using the
NVAR or CORE=ncore suboptions. The value in the line after PRFO NVAR
sets the number of ionic degrees of freedom in the reaction core. The ncore values
following the line PRFO CORE=ncore select the member atoms of the reaction
core. If unspecied, the NVAR/3 rst atoms form the reaction core. The parameters
read with the two remaining suboptions are:
TOLENV: Convergence criterion for the maximum component of the gra-
dient acting on the ions of the environment until a P-RFO step
within the reaction core is performed. Default is one third of the
convergence criterion for the gradient of the ions (CONVER-
GENCE GEOMETRY).
NSMAXP: Maximum number of P-RFO steps to be performed in the re-
action core. The keyword HESSCORE corresponds to PRFO
NSMAXP with NSMAXP=0.
It can be useful to combine these keywords with the keywords LBFGS, CON-
VERGENCE ADAPT, CONVERGENCE ENERGY, RESTART LSSTAT,
RESTART PHESS, PRFO NSVIB, PRINT LSCAL ON, the other suboptions of
PRFO, and others.
PRFO NSVIB
Section: &CPMD
Perform a vibrational analysis every NSVIB P-RFO steps on the y. This option
only works with the P-RFO and microiterative transition state search algorithms. In
case of microiterative TS search, only the reaction core is analyzed.
PRINT COORDINATES
Section: &CLASSIC
Not documented
PRINT ENERGY {ON, OFF} [EKIN, ELECTROSTATIC, ESR, ESELF, EFREE,
EBAND, ENTROPY, EPSEU, EHEP, EHEE, EHII, ENL, EXC, VXC, EGC,
EBOGO]
Section: &CPMD
Display or not information about energies.
71
PRINT FF
Section: &CLASSIC
Not documented
PRINT LEVEL
Section: &PIMD
The detail of printing information is read as an integer number from the next line.
Currently there is only minimal output for < 5 and maximal output for 5.
PRINT LEVEL
Section: &PATH
Idem as above, here for Mean Free Energy Path searches.
PRINT {ON,OFF} [INFO, EIGENVALUES, COORDINATES, LSCAL, FORCES,
WANNIER]
Section: &CPMD
A detailed output is printed every IPRINT iterations. Either only dierent contri-
bution to the energy or in addition the atomic coordinates and the forces are printed.
IPRINT is read from the next line if the keywords ON or OFF are not specied.
Default is only energies after the rst step and at the end of the run. OFF switches
the output o.
PROCESSOR GROUPS
Section: &PIMD
This is only needed for netuning load balancing in case of path integral runs i
two level parallelization is used. The default optimizes the combined load balancing
of the parallelization over replicas and gvectors. The default load distribution is
usually optimal. Separate the total number of processors into a certain number of
processor groups that is read from the following line; only 2
N
= 2, 4, 8, 16, . . .
groups are allowed and the maximum number of groups is the number of replicas.
Every processor group is headed by one PARENT and has several CHILDREN that
work together on a single replica at one time; the processor groups work sequentially
on replicas if there is more than one replica assigned to one processor group. Note: if
the resulting number of processor groups is much smaller than the number of replicas
(which occurs in odd cases) specifying the number of processor groups to be equal
to the number of replicas might be more ecient. This keyword is only active in
parallel mode.
72
PROCESSOR GROUPS
Section: &PATH
Idem as above, here for mean free energy path search.
PROJECT WAVEFUNCTION
Section: &PROP
The wavefunctions are projected on atomic orbitals.
The projected wavefunctions are then used to calculate atomic populations and bond
orders. The atomic orbitals to project on are taken from the &BASIS section. If there
is no &BASIS section in the input a minimal Slater basis is used. See section 9.5.3
for more details.
PROJECT [NONE, DIAGONAL, FULL]
Section: &CPMD
This keyword is controlling the calculation of the constraint force in optimization
runs.
PROPERTIES
Section: &CPMD
Calculate some properties.
This keyword requires further input in the section &PROP . . . &END.
PROPERTY { STATE }
Section: &TDDFT
Calculate properties of excited states at the end of an ELECTRONIC SPECTRA
calculations. default is to calculate properties for all states. Adding the keyword
STATE allows to restrict the calculation to only one state. The number of the state
is read from the next line.
QMMM [QMMMEASY]
Section: &CPMD
Activate the hybrid QM/MM code. This keyword requires further input in the section
&QMMM . . . &END.
The QM driver is the standard CPMD. An interface program (MM Interface) and a
classic force eld (Gromos[50]/Amber[51]-like) are needed to run the code in hybdrid
mode[18, 19, 20, 52, 53]. This code requires a special licence and is not included in
the standard CPMD code. (see section 11.14 for more information on the available
options and the input format).
73
QS LIMIT
Section: &LINRES
Tolerance above which we use quadratic search algorithm in linear response calcula-
tions.
QUENCH [IONS, ELECTRONS, CELL, BO]
Section: &CPMD
The velocities of the ions, wavefunctions or the cell are set to zero at the beginning
of a run.
With the option BO the wavefunctions are converged at the beginning of the MD
run.
RAMAN
Section: &RESP
Calculate the polarizability (also in periodic systems) as well as Born-charges and
dipole moment.
RANDOMIZE [COORDINATES, WAVEFUNCTION, DENSITY, CELL]
Section: &CPMD
The ionic positions or the wavefunction or the cell parameters are randomly
displaced at the beginning of a run.
The maximal amplitude of the displacement is read from the next line.
RANDOMIZE
Section: &TDDFT
Randomize the initial vectors for the diagonalization in a TDDFT calculation. The
amplitude is read from the next line. Default is not to randomize the vectors.
RATTLE
Section: &CPMD
This option can be used to set the maximum number of iterations and the tolerance
for the iterative orthogonalization. These two numbers are read from the next
line.
Defaults are 30 and 10
6
.
74
READ REPLICAS
Section: &PIMD
Read all P replicas from a le with a name to be specied in the following line, for
the input format see subroutine rreadf.F.
REAL SPACE WFN KEEP [SIZE]
Section: &CPMD
The real space wavefunctions are kept in memory for later reuse. This minimizes the
number of Fourier transforms and can result in a signicant speedup at the expense
of a larger memory use. With the option SIZE the maximum available memory for
the storage of wavefunctions is read from the next line (in MBytes). The program
stores as many wavefunctions as possible within the given memory allocation.
REFATOM
Section: &HARDNESS
Specify the reference atom to be used in a hardness calculation on the next line. This
option is to be used together with the ORBITALS and LOCALIZE.
REFERENCE CELL [ABSOLUTE, DEGREE, VECTORS]
Section: &SYSTEM
This cell is used to calculate the Miller indices in a constant pressure simulation. This
keyword is only active together with the option PARRINELLO-RAHMAN.
The parameters specifying the reference (super) cell are read from the next line.
Six numbers in the following order have to be provided: a, b/a, c/a, cos , cos ,
cos .
The keywords ABSOLUTE and DEGREE are described in CELL option.
REFUNCT functionals
Section: &DFT
Use a special reference functional in a calculation. This option is not active.
75
REORDER LOCAL
Section: &TDDFT
Reorder the localized states according to a distance criteria. The number of reference
atoms is read from the next line. On the following line the position of the reference
atoms within the set of all atoms has to be given. The keyword LOCALIZE is
automatically set. The minimum distance of the center of charge of each state to the
reference atoms is calculated and the states are ordered with respect to decreasing dis-
tance. Together with the SUBSPACE option in a TAMM-DANCOFF calculation
this can be used to select specic states for a calculation.
REORDER
Section: &TDDFT
Reorder the canonical KohnSham orbitals prior to a TDDFT calculation. The num-
ber of states to be reordered is read from the next line. On the following line the
nal rank of each states has to be given. The rst number given corresponds to the
HOMO, the next to the HOMO - 1 and so on. All states down to the last one changed
have to be specied, no holes are allowed. This keyword can be used together with the
SUBSPACE option in a TAMM-DANCOFF calculation to select arbitrary states.
Default is to use the ordering of states according to the KohnSham eigenvalues.
REPLICA NUMBER
Section: &PATH
Number of replicas along the string.
RESCALE OLD VELOCITIES
Section: &CPMD
Rescale ionic velocities after RESTART to the temperature specied by either
TEMPERATURE, TEMPCONTROL IONS, or NOSE IONS. Useful if the
type of ionic thermostatting is changed, (do not use RESTART NOSEP in this case).
Note only for path integral runs: the scaling is only applied to the rst (centroid)
replica.
RESTART [OPTIONS]
Section: &CPMD
This keyword controls what data is read (at the beginning) from the le RESTART.x.
Warning: You can only read data that has been previously written into the
RESTART-le.
A list of dierent OPTIONS can be specied. List of valid options:
WAVEFUNCTION Read old wavefunction from restart le.
OCCUPATION Read old occupation numbers (useful for free energy functional.
76
COORDINATES Read old coordinates from restart le.
VELOCITIES Read old ionic, wavefunction and (cell) velocities from restart le.
CELL Read old cell parameters from restart le.
GEOFILE Read old ionic positions and velocities from le GEOMETRY. This le is up-
dated every time step. It has higher priority than the COORDINATES option.
ACCUMULATORS Read old accumulator values, for example the time step number, from
restart le.
HESSIAN Read old approximate Hessian from le HESSIAN.
NOSEE Restart Nose thermostats for electrons with values stored on restart le.
NOSEP Restart Nose thermostats for ions with values stored on
restart le.
NOSEC Restart Nose thermostats for cell parameters with values stored on restart le.
LATEST Restart from the latest restart le as indicated in le LATEST.
PHESS Read partial Hessian (Hessian of the reaction core) for transition state search or
vibrational analysis from restart le. Useful with the keywords PRFO or HESSIAN
[DISCO,SCHLEGEL,UNIT] PARTIAL.
LSSTAT Read all status information of the linear scaling optimizers (L-BFGS and P-RFO)
including L-BFGS history but excluding partial Hessian for P-RFO from restart le. The
partial Hessian is read separately using RESTART PHESS. Useful with the keywords
LBFGS and/or PRFO.
ADPTTL Read wavefunction convergence criteria at the current point of geometry opti-
mization from restart le. Useful with the keywords CONVERGENCE [ADAPT, EN-
ERGY, CALFOR].
VIBANALYSIS Use the information on nite dierences stored in the le FINDIF. This option
requires a valid restart le for the wavefunctions, even when wavefunctions and coordinates
are recalculated or read from the input le.
POTENTIAL Read an old potential from the restart le. This applies to restarts for Kohn-Sham
energy calculations.
KPOINTS Restart with k points.
DENSITY Restart with electronic density.
CONSTRAINTS Restart with old values for constraints. This option is mainly for restraints
with GROWTH option.
EXTRAP Restart from a previously saved wavefunction history. See EXTRAPOLATE WFN
for details.
ALL Restart with all elds of RESTART le
RESTFILE
Section: &CPMD
The number of distinct RESTART les generated during CPMD runs is read from
the next line.
The restart les are written in turn. Default is 1. If you specify e.g. 3, then the les
RESTART.1, RESTART.2, RESTART.3 are used in rotation.
77
REVERSE VELOCITIES
Section: &CPMD
Reverse the ionic and electronic (if applicable) velocities after the initial setup of an
MD run. This way one can, e.g., go backwards from a given RESTART to improve
sampling of a given MD path.
RFO ORDER=nsorder
Section: &CPMD
Rational function approximation combined with a quasi-Newton method (using
BFGS) for optimization of the ionic positions is used [44]. A saddle point of
order nsorder is searched for.
RHOOUT [BANDS,SAMPLE=nrhoout]
Section: &CPMD
Store the density at the end of the run on le DENSITY.
If the keyword BANDS is dened then on the following lines the number of bands
(or orbitals) to be plotted and their index (starting from 1) have to be given. If
the position specication is a negative number, then the wavefunction instead of the
density is written. Each band is stored on its own le DENSITY.num. For spin
polarized calculations besides the total density also the spin density is stored on the
le SPINDEN. The following example will request output of the orbitals or bands
number 5, 7, and 8 as wavefunctions:
RHOOUT BANDS
3 -5 -7 -8
With the optional keyword SAMPLE the requested le(s) will be written every
nrhoout steps during an MD trajectory. The corresponding time step number will be
appended to the lename.
ROKS {SINGLET, TRIPLET},{DELOCALIZED, LOCALIZED, GOEDECKER}
Section: &CPMD
Calculates the rst excited state using Restricted Open-shell Kohn-Sham theory [30].
By default, the singlet state is calculated using the delocalized variant of the modied
Goedecker-Umrigar scheme, which is supposed to work in most cases. That is, for
doing a ROKS simulation, it is usually sucient to just include this keyword in the
CPMD section (instead of using the LSE input). See 11.11 for further information.
78
ROTATION PARAMETER
Section: &TDDFT
The parameters for the orbital rotations in an optimized subspace calculation (see
TAMM-DANCOFF) are read from the next line. The total number of iterations
(default 50), the convergence criteria (default 10
6
) and the step size (default 0.5)
have to be given.
SCALED MASSES [OFF]
Section: &CPMD
Switches the usage of g-vector dependent masses on/o.
The number of shells included in the analytic integration is controlled with the key-
word HAMILTONIAN CUTOFF.
By default this option is switched o.
SCALE [CARTESIAN] [S=sascale] [SX=sxscale] [SY=syscale] [SZ=szscale]
Section: &SYSTEM
Scale atomic coordinates of the system with the lattice constants (see CELL).
You can indicate an additional scale for each axis with the options SX, SY and
SZ. For instance, if you indicate SX=sxscale, you give your x-coordinates between 0.
and sxscale (by default 1.). This is useful when you use many primitive cells. With
the keyword CARTESIAN, you specify that the given coordinates are in Cartesian
basis, otherwise the default with the SCALE option is in direct lattice basis. In
all cases, the coordinates are multiplied by the lattice constants. If this keyword
is present an output le GEOMETRY.scale is written. This le contains the lattice
vectors in
Aand atomic units together with the atomic coordinates in the direct lattice
basis.
SHIFT POTENTIAL
Section: &CPMD
After this keyword, useful in hamiltonian diagonalization, the shift value V
shift
must
be provided in the next line. This option is used in the Davidson diagonalization
subroutine and shifts rigidly the total electronic potential as V
pot
(r) V
pot
(r)+V
shift
then it is subtracted again at the end of the main loop, restoring back the original
V
pot
(r) that remains basically unaected once that the calculation is completed.
SLATER [NO]
Section: &DFT
The value for the Slater exchange functional [60] is read from the next line. With
NO the exchange functional is switched o.
Default is a value of 2/3.
This option together with no correlation functional, allows for X theory.
79
SMOOTH
Section: &DFT
A smoothening function is applied to the density [73].
The function is of the Fermi type.
f(G) =
1
1 +e
GG
cut
G is the wavevector, G
cut
= G
max
and = G
max
. Values for and have to be
given on the next line.
SPLINE [POINTS, QFUNCTION, INIT, RANGE]
Section: &CPMD
This option controls the generation of the pseudopotential functions in g-space.
All pseudopotential functions are rst initialized on a evenly spaced grid in g-space
and then calculated at the needed positions with a spline interpolation. The number
of spline points is read from the next line when POINTS is specied.
( The default number is 5000.) For calculations with the small cutos typically used
together with Vanderbilt PP a much smaller value, like 1500 or 2000, is sucient.
In addition it is possible to keep the Q-functions of the Vanderbilt pseudopotentials
on the spline grid during the whole calculation and do the interpolation whenever
needed. This option may be useful to save time during the initialization phase and
memory in the case of Vanderbilt pseudopotentials when the number of shells is not
much smaller than the total number of plane waves, i.e. for all cell symmetries except
simple cubic and fcc.
SSIC
Section: &CPMD
Apply an ad hoc Self Interaction Correction (SIC) to the ordinary DFT calculation
expressed in terms of total energy as
E
tot
a E
H
[m] b E
xc
[m, 0]
where m(x) =
(x)
FACSTAGE, see Ref. [92](b). Note: using FACSTAGE ,= 1.0 essentially makes no
sense within the STAGING scheme, but see its use within CENTROID DYNAMICS
and NORMAL MODES.
STATES
Section: &SYSTEM
The number of states used in the calculation is read from the next line.
This keyword has to preceed the keyword OCCUPATION.
NSUP
Section: &SYSTEM
The number of states of the same spin as the rst state is read from the next line.
This keyword makes only sense in spin-polarized calculations (keyword LSD).
STATES {MIXED,SINGLET,TRIPLET}
Section: &TDDFT
The number of states to be calculated is read from the next line. The type of state
SINGLET, TRIPLET can be given for non-spinpolarized calculations. Default is to
calculate one singlet state for LDA and 1 mixed state for LSD calculations.
STEEPEST DESCENT [ELECTRONS, IONS, CELL],[NOPRECONDITION-
ING],[LINE]
Section: &CPMD
NOPRECONDITIONING works only for electrons and LINE only for ions. Use the
method of steepest descent for the optimization of wavefunction and/or atomic
positions and/or cell.
If both options are specied in a geometry optimization run, a simultaneous opti-
mization is performed.
Preconditioning of electron masses (scaled masses) is used by default. The precon-
ditioning is controlled by the keyword HAMILTONIAN CUTOFF. Optionally
preconditioning can be disabled.
For ions optimization, the steplength is controlled by the keywords TIMESTEP and
EMASS.
81
STEPLENGTH
Section: &LINRES
Step length for steepest descent and preconditioned conjugate gradient methods used
in linear response calculations. Default is 0.1.
STORE {OFF} [WAVEFUNCTIONS, DENSITY, POTENTIAL]
Section: &CPMD
The RESTART le is updated every ISTORE steps. ISTORE is read from the
next line. Default is at the end of the run.
Moreover, in the same line of the number ISTORE, you can specify the number of self-
consistent iterations (with SC=number) between two updates of restart le. If OFF
is specied , do not store wavefunctions and/or density (ISTORE is not necessary).
STRESS TENSOR
Section: &CPMD
Calculate the stress tensor every NSTEP iteration in a constant volume MD.
NSTEP is read from the next line. Works also for wavefunction or geometry optimi-
sation. In this case NSTEP is meaningless.
STRESS TENSOR
Section: &SYSTEM
In extension to the keyword PRESSURE the complete stress tensor in kbar can be
specied. The stress on the system is read in the form:
t
11
t
12
t
13
t
21
t
22
t
23
t
31
t
32
t
33
STRUCTURE [BONDS, ANGLES, DIHEDRALS, SELECT]
Section: &CPMD
Print structure information at the end of the run.
Bonds, angles and dihedral angles can be printed. Dihedral angles are dened between
0 and 180 degrees. This might change in the future.
If the option SELECT is used the output is restricted to a set of atoms. The number
of atoms and a list of the selected atoms has to be given on the next lines.
82
SUBTRACT [COMVEL, ROTVEL]
Section: &CPMD
If COMVEL is selected, the total momentum of the system is removed, if ROTVEL
is selected the global angular momentum of the system is removed. Both options
can be used separately and simultaneously. The subtraction is done each ncomv or
nrotv steps, where the value is read in the next line.
If this key is activated but no number provided, the default is 10000 steps.
Note: The use of these keywords is strongly recommended for long runs (e.g.
t > 10 ps) and/or low density systems (e.g. isolated molecules, gas phase & Co.).
Otherwise the whole system will start to translate and/or rotate toward a (random)
direction with increasing speed and spinning. The relative translation within the
system slows down correspondingly and thus the system eectively cools down. As a
consequence dynamic properties, like self-diusion coecients will be wrong.
This option should not be used for systems, where some atoms are kept at xed
positions, e.g. slab congurations. Here the center of mass may (or should) move.
Due to the interactions with the xed atoms, a drift of the whole system should be
much reduced, anyways.
Note: since the subtracted kinetic energy is put back into the system by simple
rescaling of the ionic velocities, these options is not fully compatible with NOSE
thermostats.
SURFACE HOPPING
Section: &CPMD
Nonadiabatic dynamics involving the ground state and a ROKS excited state[117].
Do NOT use this keyword together with T-SHTDDFT, which invokes the surface
hopping MD scheme based on TDDFT [118] (see T-SHTDDFT).
SURFACE
Section: &SYSTEM
Assume periodic boundary condition in x- and y-direction.
SYMMETRIZE COORDINATES
Section: &SYSTEM
Input coordinates are symmetrized according to the point group specied.
This only makes sense when the structure already is close to the symmetric one.
83
SYMMETRY
Section: &SYSTEM
The supercell symmetry type is read from the next line.
You can put a number or a keyword.
0 ISOLATED system in a cubic/orthorhombic box [28]with ISOLATED MOLECULE
option activated. By default the Hockney method (see POISSON SOLVER) is
used for solving the Poisson equations. You can use this option in combination with
POLYMER or SURFACE for systems that are periodic in only 1 or 2 dimensions.
The default Poisson solver is MORTENSEN in this case. See the Hints and Tricks
section for some additional requirements when calculating isolated system.
1 Simple CUBIC
2 FACE CENTERED CUBIC (FCC)
3 BODY CENTERED CUBIC (BCC)
4 HEXAGONAL
5 TRIGONAL or RHOMBOHEDRAL
6 TETRAGONAL
7 BODY CENTRED TETRAGONAL (BCT)
8 ORTHORHOMBIC
12 MONOCLINIC
14 TRICLINIC
Warning: This keyword should not be used with the keyword CELL VECTORS.
T-SHTDDFT
Section: &TDDFT
Non adiabatic (nonadiabatic, non-adiabatic) Tullys trajectory surface hopping dy-
namics using TDDFT energies and forces. To be used together with the keywords
MOLECULAR DYNAMICS BO and TDDFT in the &CPMD section (see sec-
tion ??). Do NOT use the keyword T-SHTDDFT together with the keyword SUR-
FACE HOPPING in &CPMD, which invokes the SH scheme based on ROKS [117]
(see SURFACE HOPPING).
For a given initial conguration, the run produces a trajectory that undergoes sur-
face hopping according to the algorithm by Tully adapted to TDDFT [118]. The
forces on the excited state surfaces are computed using TDDFT as for the adia-
batic case. A suciently large number of excited states must be declared using the
keyword STATES in the section &TDDFT. The initial running surface is speci-
ed with the keyword FORCE STATE in the section &TDDFT. This can change
during the dynamics when a surface hop occurs. After a restart the value of the
running state is taken from the le SH STATE.dat (see below). The run produces
a series of additional les: SH COEFA.dat (absolute value of the state amplitudes),
SH COEFC.dat (their complex values), SH COUPL.dat (the coupling strength per
state), SH ENERG.dat (the energy of the dierent states: setp number, ground state
energy, rst excited state energy, . . . , highest excited state energy, energy of the run-
ning state), SH PROBS.dat (transition probabilities between running state and all
other states), SH STATE.dat (the running state at each step). All these les (in
addition to SH WAVEFUNCTIONS and SH LRWAVEFUNCTIONS) are needed to
restart the SH dynamics. Note that each run produces a single SH trajectory. Several
subsequent runs starting from dierent initial coordinates and velocities are required
to collect statistics.
84
TAMM-DANCOFF [SUBSPACE,OPTIMIZE]
Section: &TDDFT
Use the TammDanco approximation. This is the default for TDDFT calculations.
Optionally, only a SUBSPACE of the occupied orbitals can be included in the calcu-
lation. The subspace can be optimized at each step (not recommended). Default is
to use all states.
TASKGROUPS [MINIMAL,MAXIMAL,CARTESIAN]
Section: &CPMD
The number of taskgroups is read from the next line. The number of taskgroups has
to be a divisor of the number of nodes in a parallel run; Cartesian Taskgroups use
cartesian communicators.
TD METHOD A [functionals]
Section: &TDDFT
Use a dierent potential for the eigenvalue diernce part of the response equations
than was used to generate the ground state orbitals. The potential generating func-
tional has to be given after the keyword. For possible functionals see the code. Most
likely you want to use the SAOP functional.
This functional does not aect the choice of functional used in the TDDFT kernel.
The kernel functional is set in the &DFT section. It is either the standard functional
or the functional dened by the keyword LR KERNEL.
TDDFT
Section: &CPMD
Calculate the energy according to TDDFT. This keyword can be used together
with OPTIMIZE GEOMETRY or MOLECULAR DYNAMICS BO. Use
the &TDDFT section to set parameters for the calculation. This keyword requires
RESTART LINRES.
TEMPCONTROL [IONS, ELECTRONS, CELL]
Section: &CPMD
The temperature of the ions in Kelvin or the ctitious kinetic energy of the
electrons in atomic units or the kinetic energy of the cell in atomic units (?) is
controlled by scaling.
The target temperature and the tolerance for the ions or the target kinetic energy
and the tolerance for the electrons or the cell are read from the next line.
As a gentler alternative you may want to try the BERENDSEN scheme instead.
85
TEMPERATURE ELECTRON
Section: &CPMD
The electronic temperature is read from the next line.
Default is 1000K.
TEMPERATURE
Section: &CPMD
The initial temperature in Kelvin of the system is read from the next line.
TESR
Section: &SYSTEM
The number of additional supercells included in the real space sum for the Ewald
term is read from the next line. Default is 0, for small unit cells larger values (up to
8) have to be used.
THAUTO
Section: &LINRES
The two values read from the next line control the switch to dierent optimizers for
an automatic selection of optimizers during a linear response calculation. This also
applies to the Z-vector optimization for TDDFT forces. The rst value is the threshold
for switching from conjugate gradients to DIIS (with compressed storage and averged
preconditioner, subspace size dened with ODIIS). The second value is the threshold
for switching to DIIS with full storage and state dependent preconditioner. See also
ZDIIS for specication of the subspace size.
TIGHTPREC
Section: &RESP
Uses a harder preconditioner. For experts: The Hamiltonian is approximated by the
kinetic energy, the G-diagonal Coulomb potential and the KS-energies. The number
obtained this way must not be close to zero. This is achieved by smoothing it with
This is achieved by smoothing it with
x f(x) =
_
x
2
+
2
[default]
or
x f(x) = (x
2
+
2
)/x [this option]
The HARD option conserves the sign of the approximate Hamiltonian whereas the
default formula does never diverge.
86
TIMESTEP ELECTRONS
Section: &CPMD
The time step for electron dynamics in atomic units is read from the next line.
TIMESTEP IONS
Section: &CPMD
The time step in atomic units is read from the next line.
TIMESTEP
Section: &CPMD
The time step in atomic units is read from the next line.
Default is a time step of 5 a.u. (1 a.u. = 0.0241888428 fs).
TRAJECTORY [OFF, XYZ, DCD, SAMPLE, BINARY, RANGE, FORCES]
Section: &CPMD
Store the atomic positions, velocities and optionally forces at every NTRAJ time step
on le TRAJECTORY. This is the default for MD runs. With the additional
keyword XYZ the trajectory is also writthen in xyz-format on the le TRAJEC.xyz,
similarly with the additional keyword DCD a trajectory in dcd-format (binary and
single precision, as used by CHARMM, X-PLOR and other programs) is written on
the le TRAJEC.dcd. If the keyword SAMPLE is given NTRAJ is read from the next
line, otherwise the default value for NTRAJ is 1. A negative value of NTRAJ will
disable output of the TRAJECTORY le, but e.g. TRAJEC.xyz will still be written
every -NTRAJ steps. A value of 0 for NTRAJ will disable writing of the trajectory
les alltogether.
The TRAJECTORY le is written in binary format if the keyword BINARY is present.
If FORCES is specied also the forces are written together with the positions and
velocities into the le FTRAJECTORY. It is possible to store the data of a subset of
atoms by specifying the suboption RANGE, the smallest and largest index of atoms
is read from the next line. If both, SAMPLE and RANGE are given, the RANGE
parameters have to come before the SAMPLE parameter.
87
TRANSITION MOMENT
Section: &PROP
Calculate the dipole transition matrix element.
On the following lines, the number of transitions and the involved orbitals are given.
Example:
TRANSITION MOMENT
2
6 7
6 8
This calculates the dipole transition matrix ele-
ments between KS states 6 and 7, and between 6 and 8.
TROTTER DIMENSION
Section: &PIMD
The Trotter number P, i.e. the number of replicas, beads, or imaginary time
slices which are used in order to discretize the FeynmanKac path integral of the
nuclei, is read from the next line. If NORMAL MODES or STAGING is not acti-
vated the path integral is discretized in cartesian coordinates in real space (socalled
primitive coordinates). A discussion about controlling discretization errors and on
estimating P in advance is given in Ref. [100].
TROTTER FACTORIZATION OFF
Section: &CPMD
Do not use Trotter factorization to calculate free energy functional.
Remark: Place this keywords only after FREE ENERGY FUNCTIONAL; before
it has no eect. Note: this keyword has nothing to do with path integral MD as
activated by the keyword PATH INTEGRAL and as specied in the section &PIMD
... &END.
TROTTER FACTOR
Section: &CPMD
Solve e
H/k
B
T
directly using Trotter approximation
_
e
pH
e
pK/2
e
pV
e
pK/2
_
.
The Trotter approximation is twice as fast.
The Trotter factor is read from the next line (typically 0.001 is very accurate).
VDW CORRECTION [ON,OFF]
Section: &CPMD
An empirical van der Waals correction scheme is applied to pairs of atom types spec-
ied with this keyword. This activates reading the corresponding parameters from
the &VDW ... & END section. See VDW PARAMETERS for more details.
88
VDW PARAMETERS
Section: &VDW
Parameters for empirical van der Waals correction schemes are set with the keyword.
This requires the VDW CORRECTION keyword to be set in the &CPMD section.
For the GRIMME type (see below) an automatic assignment of the parameters can
be requested by putting ALL GRIMME on the next line. Otherwise the number of
pairs NVDW is read from the next line and followed by NVDW lines of parameters:
TYPE, , , C
6
, R
0
, and d for each pair of atom types and , where and
are the indexes of pseudopotentials (and their associated groups of atoms) in the
order they are listed in the &ATOMS section. For type GRIMME only and
are required. If the other parameters are ommited the internal table of parameters is
used.
A presently implemented damped dispersion model, described by M. Elstner et al.[29],
having the same form as that constructed by Mooij et al.[97], is activated by specifying
C6 as TYPE. This model is expressed as
E
vdW
=
ij
C
6
R
ij
6
_
_
1 exp
_
_
d
_
R
ij
R
0
_
7
_
_
_
_
4
. (1)
A table of parameters appropriate for this particular model, using the PBE and BLYP
functionals, is available [98].
Alternatively Van der Waals correction according to Grimme can be used [37] by
selecting TYPE GRIMME.
E
disp
= s
6
N
at
1
i=1
N
at
j=i+1
C
ij
6
R
6
ij
f
dmp
(R
ij
) (2)
The values of C
6
and R
0
are not specicthat are used by this method are taken from
[37] and stored internally (see above for details).
VDW-CUTOFF
Section: &VDW
On the next line the short range cuto of van der Waals correction has to be specied.
The default value is 10
2
.
VDW-CELL
Section: &VDW
The number of additional supercells to be included in the sum of van der Waals
correction.
89
VELOCITIES ... END VELOCITIES
Section: &ATOMS
Sets an initial velocity for specied atoms.
The rst line contains rst the total number of specied atomic velocities followed on
the same line by the list of atomic numbers for which the velocities will be read.
On each of the follwoing lines the x, y and z coordinates of the velocities of an atom
have to be specied. These values will ignored in case of starting with RESTART
VELOCITIES..
NOTE: these velocities are rescaled to produce the initial temperature as specied by
TEMPERATURE. The default temperature, however, is 0K, so you have to set
the matching temperature or your initial velocities will be useless.
VIBRATIONAL ANALYSIS [FD, LR, IN], [GAUSS, SAMPLE, ACLIMAX]
Section: &CPMD
Calculate harmonic frequencies by nite dierences of rst derivatives (FD) (see
also keyword FINITE DIFFERENCES), by linear response to ionic displace-
ments (LR) or from a pre-calculated Hessian (IN). K-point sampling is currently
possible using nite dierences. If the option GAUSS is specied, additional out-
put is written on the le VIB1.log which contains the modes in a style similar
to GAUSSIAN 98 output. This le can be read in and visualized with programs
like MOLDEN or MOLEKEL. The option SAMPLE reads an integer from the next
line. If this number is 2 an additional le VIB2.log containing the lowest modes
is written. The default value is 1. If the option ACLIMAX is specied, addi-
tional output is written on the le VIB.aclimax which contains the modes in a style
readable by aClimax (http://www.isis.rl.ac.uk/molecularspectroscopy/aclimax/). If
a section &PROP is present with the keyword DIPOLE MOMENT[BERRY] or
DIPOLE MOMENT[RS], the Born charge tensor is calculated on the y. See also
the block &LINRES ... &END and the keywords RESTART PHESS and HES-
SIAN DISCO,SCHLEGEL,UNIT PARTIAL.
WANNIER DOS
Section: &CPMD
Outputs the projected density of states of the Wannier orbitals (le WANNIER DOS)
and the KS hamiltonian in the Wannier states representation (le WANNIER HAM).
When running MOLECULAR DYNAMICS CP the les WANNIER DOS and
WANNIER HAM solely written at the last step.
WANNIER MOLECULAR
Section: &CPMD
Generates eective molecular orbitals from the Wannier representation. It rst at-
tributes Wannier orbitals to molecules and then diagonalizes by molecular blocks the
KS Hamiltonian.
Does not work with MOLECULAR DYNAMICS CP.
90
WANNIER OPTIMIZATION {SD,JACOBI}
Section: &CPMD
Use steepest descent or Jacobi rotation method for the orbital localization.
Default are Jacobi rotations.
WANNIER PARAMETER
Section: &CPMD
W STEP, W EPS, W RAN, W MAXS are read from the next line. W STEP is the
step size of the steepest descent algorithm used in the optimization procedure (default
value 0.1). W EPS the convergence criteria for the gradient (default value 1.e 7).
W RAN the amplitude for the initial random rotation of the states (default value 0.0).
W MAXS is the maximum steps allowed in the optimization (default value 200).
WANNIER REFERENCE
Section: &CPMD
The vector W REF is read from the next line, which consists of 3 coordinates x, y, z.
These are assumed as the origin for the WFCs positions and related ionic coordi-
nates (i.e. R
I
R
I
(x, y, z)). The default value is the center of the supercell, if
CENTER MOLECULE keyword is active (Note, that this is implicitely turned
on, for calculations with SYMMETRY 0). Otherwise it is set to (0,0,0), which is
usually not the center of the box. In order to get the best results displaying the
IONS+CENTERS.xyz le this parameter should be set explicitly.
WANNIER SCREENING {WFC,DENSITY,DIAG}
Section: &DFT
Read DWFC DWFMAX from the next line.
Perform the calculation of exact exchange using Wannier functions. Orbital pairs
are screened according to the distance of the Wannier centers (WFC, cuto DWFC),
the density overlap (DENSITY, cuto DWFMAX), or only the diagonal terms are
included (DIAG).
WANNIER SERIAL
Section: &CPMD
Requests that the calculation of Wannier functions is performed using the serial code,
even in parallel runs.
WANNIER TYPE {VANDERBILT,RESTA}
Section: &CPMD
Indicates the type of Wannier functions. Vanderbilt type is the default.
91
WANNIER WFNOUT [ALL,PARTIAL,LIST,DENSITY]
Section: &CPMD
Controls the printing of Wannier functions. Either all or only some of the functions
can be printed. This will be done at the end of each calculation of Wannier functions.
For PARTIAL output you have to give the indices of the rst and the last wannier
function to print; the LIST directive follows the syntax of RHOOUT BANDS.
WANNIER WFNOUT PARTIAL
5 8
XC ANALYTIC
Section: &LINRES
Use analytic second derivatives of the XC functional (only available for some LDA
functionals)
XC EPS
Section: &LINRES
Finite dierence parameter for XC derivative. Default is 5 10
4
.
XC DD ANALYTIC
Section: &LINRES
Use analytic second derivatives of the XC functional, see Ref. [31] (only available for
some LDA and gradient-corrected functionals). For the analytic third derivatives of
some LDA XC functionals, XC ANALYTIC can be combined with this keyword
ZDIIS
Section: &LINRES
The subspace size for the optimizer is read from the next line.
92
ZFLEXIBLE CELL
Section: &SYSTEM
Species a constraint on the super cell in constant pressure dynamics or geometry
optimizations. The supercell may only shrink or grow in z-direction. Should be very
useful for dense slab congurations, e.g. a water layer between solid slabs.
Please note: this is by no means intended to give a statistically meaningful ensemble,
but merely to provide a tool for ecient equilibration of a specic class of system.
[TSDE, TSDP, TSDC] [NOPRECONDITIONING] NOPRECONDITIONING only
electrons
Section: &CPMD
Short forms for the dierent STEEPEST DESCENT options.
n-CENTER CUTOFF
Section: &PROP
The cuto for printing the n-center shared electron numbers is read from the next
line. All one and two center terms are printed.
93
9.5 Further details of the input
9.5.1 Pseudopotentials
The general format for entering the pseudo potentials in the input le is:
The input for a new atom type is started with a * in the rst column. This line further
contains:
the le name (ECPNAME) where to nd the pseudopotential information starting
in column 2
and several labels:
. The rst label
[GAUSS-HERMITE, KLEINMAN-BYLANDER]
species the method to be used for the calculation of the nonlocal parts of the
pseudopotential. It can be omitted for Vanderbilt pseudopotentials and Stefan
Goedeckers pseudopotentials. For semi-local pseudopotentials the default is Gauss-
Hermite integration with 20 special points. The number of integration points can
be changed using GAUSS-HERMITE=xx.
. It is further possible to specify nonlinear core correction [NLCC] and the width
of the ionic charge distribution [RAGGIO]. (Default is no NLCC and the
default value for RAGGIO is 1.2.)
. The label UPF indicates that the pseudopotential was stored using the Universal
Pseudopotential Format.
. For Vanderbilt ultrasoft pseudopotentials one of the following options has to
be specied: BINARY indicates the binary version of the output le from Van-
derbilts atomic code.
FORMATTED indicates the formatted version of the Vanderbilt pseudopotential
les after a conversion with the program reform.f from the Vanderbilt atomic code
package (see section 4)
For Vanderbilt pseudopotentials the option NLCC is ignored. The nonlinear core
correction will always be used if the pseudopotential was generated with a partial
core.
It is strongly recommended to use only Vanderbilt pseudopotentials that were gen-
erated with a new version of Vanderbilts atomic code (version 7.3.0 or newer).
. The label CLASSIC indicates that the following atoms are to be traeted with
classical force elds only. See section &CLASSIC for more information.
. The label EAM indicates that the following atoms are treated using the EAM
approach.
. The label FRAC indicates that the core charge of a pseudopotential should not be
rounded for the calculation of the number of electrons (for pseudopotentials with
fractional core charge).
. The label ADD H indicates that the potential should used to saturate dangling
bonds or hydrogenize united atom potentials in a CPMD/Gromos-QM/MM cal-
culation (see section 11.14 for more details).
The next line contains information on the nonlocality of the pseudopotential (LMAX,
LOC, SKIP).
On the following lines the coordinates for this atomic species have to be given.
The rst line gives the number of atoms (NATOMS) of the current type.
Afterwards the coordinates of the atoms are listed (in Cartesian coordinates by default). For
CPMD/Gromos-QM/MM calculation, however, the Gromos atom numbers have to be given
instead of coordinates (see section 11.14 for more details).
The information on the nonlocal part of the pseudopotential can be given in two dierent styles:
94
- You can specify the maximum l - quantum number with LMAX=l where l is S, P or D.
If this is the only input, the program assumes that LMAX is the local potential (LOC).
You can use another local function by specifying LOC=l.
In addition it is possible to assign the local potential to a further potential with SKIP=l.
- Alternatively you can specify these three angular quantum numbers by their numerical values
(S=0, P=1, D=2) in the order LMAX LOC SKIP.
If values for LOC and SKIP are provided outside the range 0 - LMAX the program uses the
default.
Examples: The following lines are equivalent
LMAX=P
LMAX=P LOC=P
1 1 2
1 2 2
Note:
Also for Vanderbilt and Goedecker pseudopotentials this line has to be in a valid format, but the
actual values are not used.
9.5.2 Constraints and Restraints
CONSTRAINTS ... END CONSTRAINTS
Within this input block you can specify several constraints and restraints on the atoms.
Please note, that for calculations using the Gromos QM/MM-interface (see section 11.14) the atom
indices refer to the ordering of the atoms as it appears in the respective Gromos coordinate le.
In all cases the indices of dummy atoms start sequentially from total-number-of-atoms plus one.
The following suboptions are possible:
FIX ALL
All coordinates of all atoms are kept xed.
For wavefunction optimization via simulated annealing.
FIX QM
All coordinates of all QM atoms are kept xed.
This is the same as above unless you are running a QM/MM calculation with the Gromos
interface code.
FIX MM
All coordinates of all MM atoms are kept xed.
This is ignored unless you are running a QM/MM calculation with the Gromos interface
code.
FIX SOLUTE
All coordinates of all solute atoms are kept xed.
This is ignored unless you are running a QM/MM calculation with the Gromos interface
code. The denition of what is a solute is taken from the respecitve GROMOS topology le.
FIX SEQUENCE
All coordinates of a series of atoms are kept xed.
This keyword is followed by the index numbers of the rst and the last atoms to be xed in
the next line. Example:
FIX SEQUENCE
5 25 all coordinates of atoms no. 5 to 25 are kept xed
95
FIX ELEMENT [SEQUENCE]
All coordinates of all atoms belonging to the same element are kept xed. This works
across pseudopotential types or QM and MM atoms in case of a QM/MM calculation. The
keyword is followed by the core charge of the respective element. With the optional SE-
QUENCE modier two more numbers are read in, specifying the rst and the last index of
a sequence of atoms to which this keyword will be applied. Example:
FIX ELEMENT
8 all coordinates of oxygen atoms are kept xed
FIX PPTYPE [SEQUENCE]
All coordinates of all atoms belonging to the same potential type are kept xed. The
keyword is followed by the atom type index number on the next line, corresponds to the
sequence of how the atom types are specied in the &ATOMS section of the CPMD input.
In case of a QM/MM calculation this is expanded to respective classical atom types. In this
case the QM atom types come rst followed by the GROMOS atom types. With the optional
SEQUENCE modier two more numbers are read in, specifying the rst and the last index
of a sequence of atoms to which this keyword will be applied. Example:
FIX PPTYPE SEQUENCE
2 5 25 atoms corresponding to the second atom type with an index between 5 and 25 are
kept xed
FIX ATOMS
All coordinates of certain atoms can be xed.
This keyword is followed by the number of atoms to be xed and a list of these atoms specify-
ing them by the number of their position in the input le (NOTE: in the le GEOMETRY.xyz
the atoms have the same ordering). Example:
FIX ATOMS
5 2 5 20 21 23 all coordinates of atoms 2, 5, 20, 21, and 23 are kept xed
FIX COORDINATES
Certain coordinates of atoms are xed.
This keyword is followed by the number of atoms with xed coordinates and a list of these
atoms together with ags indicating which coordinates are xed. A zero indicates a xed
coordinate. Example:
FIX COORDINATES
2 Two atoms have xed coordinates
1 1 1 0 for atom #1 z is xed
4 0 1 0 for atom #4 x and z are xed
FIX COM
Fix the center of mass.
NOTE: This currently works only for OPTIMIZE GEOMETRY and not for the LBFGS
optimizer.
FIX STRUCTURE [SHOVE]
This keyword starts a group of individual constraints where whole structural units can be
xed. The keyword is followed by the number of individual constraints on the next line.
DIST n1 n2 R
Fixes the distance R between the atoms n1 and n2.
STRETCH n1 n2 R
Fixes R
2
dened by the atoms n1 and n2.
DIFFER n1 n2 n3 R
Fixes R
12
R
23
dened by the atoms n1, n2, and n3, where R
ab
is the distance between
atoms a and b.
96
BEND n1 n2 n3
Fixes the bending angle dened by the atoms n1, n2 and n3.
TORSION n1 n2 n3 n4
Fixes the torsion angle dened by the atoms n1, n2, n3 and n4.
OUTP n1 n2 n3 n4
Out of Plane; Angle between plane (n1, n2, n3) and atom n4 is xed.
RIGID nr n1 n2 ... nx
Keeps the structure formed by the nr atoms n1, n2, . . .
You can put your atom index in several lines. The number of constraints nx is equal
to 3nr 6 for nr > 2 (nfix = 1 for nr = 2).
COORD n1 Rc d
0
Coordination constraint for atom n1. The parameters and Rc for the Fermi function
are given in Bohr (Rc) and 1/Bohr (), (or in Angstrom (Rc) and 1/Angstrom () if
the keyword ANGSTROM was set), see Ref. [95].
COORSP n1 jsp Rc d
0
Fixes the coordination number (CN) of one selected atom i with respect to only one
selected species jsp. The CN is dened by a Fermi like function as for COORD, but in
this case j runs only over the atoms belonging to the selected species jsp.
COOR RF n1 jsp p q Rc d
0
CN of one selected atom i with respect to one selected species, jsp. The CN value is
calculated as the sum of rational functions
CN
i
=
n
list
j=i
1
_
d
ij
d
0
_
p
1
_
d
ij
d
0
_
p+q
, (3)
where j runs over the indexes of the atoms belonging to jsp or over the indexes given
in the list j1 jn
list
.
BNSWT n1 n2 p q Rc d
0
Reciprocal CN between 2 selected atoms, dened with the same functional form as the
one described for COOR RF. This coordinate states the presence of the bond between
the two atoms i and j.
TOT COOR isp jsp p q Rc d
0
Average CN of the atoms belonging to a selected species isp with respect to a second
selected species, jsp, or with respect to a given list of atoms, j1 jn
list
. The same
functional forms and input options are used, as those described for COOR RF, but the
index of one selected species isp is read in place of the index of one atom.
n1, ... are the atom numbers, R distances and angles. A function value of -999. for R or
refers to the current value to be xed. The constraint is linearly added to the CP Lagrangian
according to the Blue Moon ensemble prescription[87]. The values of the Lagrange multipliers
and of the actual constraint are printed in the le CONSTRAINT.
The options DIST, STRETCH, BEND, TORSION, OUTP, DIFFER, COORD,
COORSP, COOR RF, TOT COOR can have an optional additional keyword at the end
of the line of the form
DIST 1 2 -999. GROWTH 0.001
The keyword GROWTH indicates that the constraint value should be changed at each
time step. The rate of change is given after the keyword in units per atomic time unit, i.e.
independent from the current length of a time step.
Note: In MD runs only the actual initial value (-999.) can be xed.
The SHOVE option requires an additional entry at the end of each constraint line. This
entry has to be either 1, 0, or 1. The constraint is then either xed (0) or allowed to shrink
(1) or grow (1).
97
RESTRAINTS [HYPERPLANE [K=scal ]]
Denes restraints.
nres
Number of restraints.
DIST n1 n2 R kval
Restrains the distance R between the atoms n1 and n2 by a harmonic potential.
STRETCH n1 n2 R kval Restrains R
2
dened by the atoms n1 and n2 by a harmonic
potential.
DIFFER n1 n2 n3 R kval Restrains R
12
R
23
dened by the atoms n1, n2, and n3,
where R
ab
is the distance between atoms a and b by a harmonic potential.
BEND n1 n2 n3 kval
Restrains the bending angle dened by the atoms n1, n2 and n3 by a harmonic potential.
TORSION n1 n2 n3 n4 kval
Restrains the torsion angle dened by the atoms n1, n2, n3 and n4 by a harmonic
potential.
OUTP n1 n2 n3 n4 kval Out of Plane; Angle between plane (n1, n2, n3) and atom
n4 is restrained by a harmonic potential.
RESPOS n1, x
0
, y
0
, z
0
d
0
kval Restrains the position R = (x, y, z)
of atom n1 to oscillate around R
0
= (x
0
, y
0
, z
0
) with a constraint harmonic potential
V
c
= (kval/2)([RR
0
[ d
0
)
2
[146]. The limits kval = 0 and kval correspond to
free and xed atomic positions, respectively. The keyword GROWTH is not supposed
to be used for this restraint. For the sake of clarity and consistency with the atomic
units used through the code, coordinates and distances are expected to be in atomic
units (not
A).
n1, ... are the atom numbers, R distances and angles. A function value of -999. for R or
refers to the current value. The restraining potential is harmonic with the force constant
kval. The options can have an optional additional keyword at the end of the line of the form
DIST 1 2 -999. 0.1 GROWTH 0.001
The keyword GROWTH indicates that the constraint value should be changed at each time
step. The rate of change is given after the keyword in units per atomic time unit.
If the keyword HYPEPLANE is set, the system is not restrained around a point in the
collective variable space but in an hyperplane. This hyperplane is dened as going through
a point in the collective variable space, dened from the R and above, and by a vector
dened from the kval values. K=scal applies a scaling to the vector dening the hyperplane
so as to modulate the strength of the restraint.
The energy formula for an hyperplane restraint is then:
E
r
=
1
2
((c c
0
) n)
2
,
where the vectors are vectors in the collective variable space.
If a le RESVAL is found after parsing the input, the current restraint target values will
be replaced by the values found in this le.
PENALTY
The weight factors for the penalty function for stretches, bends and torsions are read from
the next line.
9.5.3 Atomic Basis Set
The &BASIS section is used in CPMD only to provide an atomic basis set for generating the
initial guess and for analyzing orbitals. If the input le contains no &BASIS section, a minimal
Slater basis is used.
98
There have to be number of species dierent entries in this section.
The order of the basis sets has to correspond with the order of the atom types in the section
&ATOMS . . . &END.
With the keyword SKIP the species is skipped and the default minimal Slater function basis is
used.
Basis sets are either specied as Slater functions or given on an additional input le.
The respective input formats are given below:
Slater type basis
SLATER nshell [OCCUPATION]
n1 l1 exp1
.. .. ....
nx lx expx
[f1 f2 ... ]
Pseudo atomic orbitals
PSEUDO AO nshell [OCCUPATION]
l1 l2 .. lx !a function with l=-1 is skipped
[f1 f2 ... ]
Numerical functions
*filename nshell FORMAT=n [OCCUPATION]
l1 l2 .. lx
[f1 f2 ... ]
Gaussian basis functions
*filename nshell GAUSSIAN [OCCUPATION]
l1 l2 .. lx
[f1 f2 ... ]
Skip atom type and use default minimal slater function
SKIP
nshell is the number L-values l1 l2 .. lx to be used.
[f1 f2 ... ] is their occupation.
The format PSEUDO AO refers to the &WAVEFUNCTION section on the corresponding pseu-
dopotential le.
With a L-value of -1 a specic function can be skipped.
The * for the numerical basis has to be in the rst column. The default format is 1, other possible
formats are 2 and 3. The numbers correspond to the format numbers in the old pseudopotential
denitions for the atomic wavefunctions.
The format GAUSSIAN allows to use any linear combination of Gaussian functions. The format
of the le is as follows:
99
Comment line
Lmax
(for each l value)
Comment line
# of functions; # of exponents
exp1 exp2 ... expn
c11 c21 cn1
c12 c22 cn2
... ... ...
c1m c2m cnm
9.5.4 Van der Waals potential
This section ( &VDW . . . &END) contains information about the empirical van der Waals cor-
rection. There are currently two major types of corrections implemented: the one described by
M. Elstner et al.[29] requires parameter sets designed to use only in conjunction with a specic
corresponding density functional, the alternate parametrization by S. Grimme[37] is less specic
and therefore easier to use and independent of the chose functional. Parameters for elements up to
Xe have been directly coded into CPMD. (This part of the input is read via the code in vdwin.F).
See the description of the keyword VDW PARAMETERS for more details.
100
Part III
Miscellaneous
10 Postprocessing
The given output from a calculation with the CPMD code can be used for postprocessing. There
are several types of output. The most typical types of output are density-like les, trajectories
and/or xyz-les. These can be visualized or analyzed with a number of dierent programs. Some
of them are (in no specic order):
Molden: (homepage: http://www.cmbi.kun.nl/ schaft/molden/molden.html
gOpenMol: (homepage: http://www.csc./gopenmol/)
Molekel: (homepage: http://www.cscs.ch/molekel/)
VMD: (homepage: http://www.ks.uiuc.edu/Research/vmd/)
Starting with version 1.8.2 VMD does fully support the CPMD trajectory format, xyz-movie format
and Gaussian Cube les. Since version 1.8.3 VMD supports periodic display of non-orthogonal
supercells. A tutorial on Visualization and Analysis of CPMD data with VMD can be found at
http://www.theochem.ruhr-uni-bochum.de/go/cpmd-vmd.html.
10.1 Density les
10.1.1 List
DENSITY.x, ELF, LSD ELF, SPINDEN.x, WANNIER 1.x ...
10.1.2 Postprocessing
These les are created in a binary format, they have to be transformed to a Gaussian cube-File
format to be readable by visualization programs. The cpmd2cube.x to convert the output can be
download at www.cpmd.org and is used in the following way:
cpmd2cube: Convert CPMDs Wannier-function files to cube
usage is: cpmd2cube [options] Wannier_file [Wannier_file...]
If you specify more than one Wannier file, they MUST have the
same g-vectors and (for the moment) atom positions
The program will create one cube file for each Wannier file
and one pdb file with the atom positions
Example:
cpmd2cube.x WANNIER_1.*
possible options are
-v <verbosity>:
<verbosity> is 0-2 (default is 1)
-double:
Read the density in double precision (default is single)
-halfmesh:
leave out half the grid points in each direction.
Reduces the file size by 1/8th (on by default).
-fullmesh:
use the full real space grid.
-n <n1> <n2> <n3>:
change the REAL-space mesh. Default is to take the same mesh as CPMD
-o <prefix>:
specify the prefix of the name used for the cube and pdb-files
-rep <n1> <n2> <n3>:
replicate the cell n<j> times along the <j>-th direction by periodicity
101
-shift <r1> <r2> <r3>:
shift cube density by r1*a1+r2*a2+r3*a3
-centre:
-center:
centre density around centre of mass of system.
-inbox:
put atoms inside unit cell centred around origin
-rho:
-dens:
store the density instead of the wavefunction into the cube file.
-psi:
-wave:
store the wavefunction instead of the density into the cube file.
--:
last option. Useful if you have a file with the same name as an option
-h or -? or -help or --help or no files:
write this help
10.2 xyz-les
10.2.1 List
GEOMETRY.xyz, ION+CENTERS.xyz
10.2.2 Postprocessing
These les can be directly read by a visualisation program. Note, that at the current status it is
useful to include a reference point (WANNIER REFERENCE) for the ION+CENTERS.xyz which
has to be put at the middle of the box.
10.3 TRAJECTORY-File
10.3.1 List
TRAJECTORY
10.3.2 Postprocessing
1. Looking at a movie
The TRAJECTORY les contains the coordinates and the velocities. To create a movie le in the
xyz-format, you have to transfer the coordinates from Bohr to
A and you have to add the symbols
of the atoms in the rst position. Two lines have to be at the beginning of each time step, from
which the rst line gives the number of the total atoms. An .xyz le can also be recorded directly
during the simulation Using the TRAJECTORY keyword with the option XYZ.
Please note, that CPMD does not apply the minium image convention to these trajectory les, i.e.
atoms are nor replaced by their images, if they leave the supercell.
2. Calculating radial pair distribution functions
The simplest analysis of the structure is given by the radial pair distribution function g(r). This
quantity is a to unity normalized function and describes the probability of nding two atoms
separated by a distance r relative to the probability expected for a completely random distribution
102
at the same density. It is formally dened as:
g(r) =
2
_
i=j
(r
i
)(r
j
r)
_
=
V
N
2
_
i=j
(r r
ij
)
_
with r being the atomic separation, the number density, N the number of atoms, V the volume,
r the atomic position, and r
ij
the position of the atom i relative to the atom j. The average <> is
taken over particles and time. Examples of code can be found in the following references [2, 39].
10.4 The MOVIE format
Besides the TRAJECTORY le CPMD also produces a specialy formated trajectory in the MOVIE
le. This le contains the position of all atoms of the system in Angstrom units at a rather low
precision (10
4
). The sampling of the positions can be done independently from the trajectory
le. The sets of coordinates are follwoing each other contigously. The format of each line is
x-coordinate, y-coordinate, z-coordinate, atomic number, type .
103
11 Hints and Tricks
11.1 Pseudopotentials and Plane Wave Cuto
The selection of proper pseudopotentials and the corresponding plane wave cuto are crucial for
obtaining good results with a CPMD calculation. The cuto required is mainly determined by
the type and the softness of a pseudopotential.
Ideally a pseudopotential for a specic atom type should be usable for all kinds of calculations
(Transferability), but in practice one frequently has to make compromises between accuracy and
impact on the computational eort when creating a pseudopotential. Therefore one always has
to test pseudopotentials before using them on new systems. There are quite a large number
of CPMD calculations published (see http://www.cpmd.org/cpmd publications.html) which can
serve as a guideline.
Since CPMD uses a plane wave basis, a concept of several dierent, formalized basis sets of
dierent quality, like with gaussian basis set based quantum chemical software, does not apply
here. Since plane waves are delocalized in space, they provide the same quality everywhere
in space and one can increase the basis set almost arbitrarily by increasing the number of
plane waves via the CUTOFF keyword. The cuto has to be chosen in such a way, that
all required quantities are reasonably converged with respect to the plane wave cuto. For a
molecular dynamics run this refers primarily to the atomic forces. For the calculation of other
properties like the stress tensor a dierent, usually a much higher cuto is required. Its al-
ways a good idea to make checks at some critical points of the calculations by increasing the cuto.
Typical cuto values range from 2040 ry for Vanderbilt ultra-soft pseudopotentials, 60100 ry for
Troullier-Martins norm-conserving pseudopotentials to 80200 ry for Goedecker pseudopotentials.
Pseudopotentials of dierent types can be freely mixed, but the required plane wave cuto is
determined by the hardest pseudopotential. Support for Vanderbilt ultra-soft pseudopotentials
is (mostly) limited to the basic functionality like molecular dynamics and geometry optimization.
11.2 Wavefunction Initialization
The default initial guess for the wavefunctions is calculated from the atomic pseudo-wavefunctions
and gives usually excellent results. Good results can also be obtained by using wavefunctions from
other calculations with a dierent cuto or slightly dierent geometry. The other initialization
available, starts from random coecients and should only be used as a last resort. Cases where the
default method does not work are when the molecule has less occupied states than one of the atoms
(in this case add some empty states for the molecule) or when the additional memory required for
the atomic calculation is not available.
11.2.1 Using Vanderbilt Ultrasoft Pseudopotentials
When using Vanderbilt ultrasoft pseudopotentials (USPPs) [4] and starting from atomic pseudo-
wavefunctions, the calculations often do not converge or converge to a wrong state, especially if
3d-elements are involved. Convergence is generally much better when assigning (partial) charges
via the ATOMIC CHARGES keyword in the &SYSTEM . . . &END section. Values from a
classical MD forceeld or an NBO calculation are usually good values. Alternatively a random
initialization of the wave functions (via INITIALIZE WAVEFUNCTION RANDOM) can be
used.
Also, due to the comparatively small plane wave cutos, you will have small but signicant mod-
ulations of the density in especially in regions with little electron density. These lead to strange
eects with gradient corrected functionals, causing the optimization to fail. To avoid this, you can
skip the calculation of the gradient correction for low electron density areas using GC-CUTOFF
with a value between 1.D-6 and 1.D-5 in the &DFT section.
104
In case of geometry optimizations, also the accurate calculation of the forces due to the augmen-
tation charges may need a higher density cuto and/or a tighter real space grid. This can be
achieved by either using a higher plane wave cuto or via increasing DUAL to 5.0 or even 6.0
and/or setting the real space grid explicitely via the MESH keyword in the &SYSTEM section.
For the same reason, these options may be needed to increase energy conservation during molec-
ular dynamics runs. Use these options with care, as they will increase the cpu time and memory
requirements signicantly und thus can easily take away one of the major advantages of ultra-soft
pseudopotentials.
11.3 Wavefunction Convergence
Some general comments on wavefunction optimizations:
Any optimization that takes more than 100 steps should be considered slow.
Optimizations using ODIIS that have repeated resets (more than a few) will probably never con-
verge. Convergence for LSD is normaly slower and more dicult than for unpolarized cases.
If the ODIIS converger gets stuck (more than one reset) stop the run and restart using
PCG MINIMIZE
TIMESTEP
20
The conjugate gradient minimizer with line search is much more robust. For LSD and larger
systems it should be used from the start.
A typical behavior will be that after the restart the energy goes down and the gradient increases.
This means that we are in a region where there are negative curvatures. In such regions the DIIS
minimizer moves in the wrong direction. After some iterations we will be back to normal behavior,
energy and gradient get smaller. At this point it may be save to switch back to ODIIS.
Sometimes, it can also be helpful to wait longer for a DIIS reset and to diagonalize after repeated
resets to get out of this region. This can be accomplished using
ODIIS NO_RESET=20
5
LANCZOS DIAGONALIZATION RESET=2
Starting a Car-Parrinello MD from a random wavefunction with all atom positions xed, a
comparatively high electron mass and using ANNEALING ELECTRONS is another alternative
to get to a reasonably converged wavefunction. Due to the exponential convergence of the
annealing procedure, one should switch to a dierent optimizer as soon as the ctitious kinetic
energy of the electrons drops below the typical range for a (normal) MD run.
Wavefunction optimizations for geometries that are far from equilibrium are often dicult. If you
are not really interested in this geometry (e.g. at the beginning of a geometry optimization or this
is just the start of a MD) you can relax the convergence criteria to 10
3
or 10
4
and do some
geometry steps. After that optimization will be easier.
Some general remarks on comparing the nal energies:
Converge the wavefunction very well, i.e. set CONVERGENCE ORBITALS to 10
6
or better.
Make sure that all parameters are the same:
- same geometry,
- same functional,
- same number of grid points (this may dier if you use dierent FFT libraries)
- same number of spline points for the PP
(IMPORTANT: the default for SPLINE POINTS has changed between dierent CPMD versions,
105
500 3000 5000). A very good test is to start always from the same RESTART le and only
do one single step. This way ALL energies have to be exactly the same and no problems with
dierent convergence rates occure.
11.4 Cell Size for Calculations with SYMMETRY 0
Calculations of isolated systems (i.e. decoupling of the electrostatic images in the Poisson solver)
are initialized with:
SYMMETRY
0
The box is assumed to be orthorhombic. With the additional options SURFACE or POLYMER
periodic boundary conditions in two or one dimensions, respectively, are assumed. Poisson solvers
available are:
POISSON SOLVER HOCKNEY,TUCKERMAN,MORTENSEN
All methods require that the charge density is zero at the border of the box. For normal systems
this means that about 3 Angstrom space between the outermost atoms and the box should be
enough. However, for some systems and for high accuracy this may not be enough. Some methods
have additional requirements (see below).
The ISOLATED MOLECULE keyword has only an eect on the calculation of the degrees of
freedom (3N-6 vs. 3N-3 for periodic systems).
CENTER MOLECULE ON/OFF: The main purpose of this is to center the molecule (center
of mass) in the box. This is needed for the HOCKNEY Poisson solver. This solver gives wrong
results if the charge density is not centered in the computational box. All other solvers behave
like the periodic counterpart, i.e. the relative position of the charge density and the box are not
important.
Further requirements:
HOCKNEY Method:
molecule has to be in the center of the box
box size molecule + 3
A border
expensive for very small systems
not available for some response calculations
POLYMER is available but gives (currently, Version 3.9) wrong results.
SURFACE is available and works.
TUCKERMAN Method:
box size : molecule + 3
A border AND 2*size of charge distribution
expensive for large systems, smaller boxes might be used without loosing too much accuracy
SURFACE or POLYMER are not available
MORTENSEN Method:
same as TUCKERMAN, but using analytic formula made possible by using special boundary
conditions (sphere, rod)
SURFACE and POLYMER are available and should be safe to use (MORTENSEN is
default for SURFACE and POLYMER)
If you do an isolated system calculation, your cell has to be cubic, if you use POLYMER
cell dimensions b and c have to be equal.
106
Finally, for many systems using a large enough cell and periodic boundary conditions is also an
option. In general, the computed properties of molecules should be independent of the scheme
used (either pbc or isolated box) except in dicult cases such as charged molecules, where the
calculation in an isolated box is recommended. The PBC calculation is always cheaper for a box of
the same size, so for a neutral molecule such as water molecule you would save time and memory
by not using SYMMETRY 0.
11.5 Geometry Optimization
Any combination of methods for geometry optimization and wavefunction optimization is allowed.
Possible options for geometry optimization are GDIIS, LBFGS, PRFO, RFO, BFGS and steepest
descent. If you choose steepest descent for both, geometry variables and the wavefunction, a com-
bined method is used. For all other combinations a full wavefunction optimization is performed
between changes of the ionic coordinates. The convergence criteria for the wavefunction optimiza-
tion can be adapted to the requirements of the geometry optimization (CONVERGENCE ADAPT
and CONVERGENCE ENERGY). The default options are GDIIS and ODIIS. Some quasi-Newton
methods (GDIIS, RFO and BFGS) are using the BFGS method to update an approximate Hes-
sian. At the beginning of a run the Hessian can either be initialized as a unit matrix HESSIAN
UNIT or with an empirical force eld. Two force elds are implemented: The DISCO and the
SCHLEGEL force eld. The algorithm for the empirical force elds has to identify bonds in the
system. For unusual geometries this may fail and the Hessian becomes singular. To prevent this
you can add or delete bonds with the keyword CHANGE BONDS.
The linear-scaling geometry optimizers (options LBFGS and PRFO) do not require an approximate
Hessian. To achieve linear scaling with the system size, the L-BFGS optimizer starts from a unit
Hessian and applies the BFGS update on the y using the history of the optimization. The P-
RFO method can nd transition states by following eigenmodes of the Hessian. The mode to
be followed does not necessarily have to be the lowest eigenvalue initially (PRFO MODE). For
larger systems, only the reaction core should be handled by the P-RFO optimizer (PRFO NVAR
and PRFO CORE), and the environment is variationally decoupled using the L-BFGS optimizer.
The normal LBFGS options can be used for the environment. The Hessian used for transition-
state search therefore spans only a subset of all degrees of freedom, is separate from the Hessian
for the other optimizers and the vibrational analysis, but it can be transferred into the appropriate
degrees of freedom of the regular Hessian (HESSIAN PARTIAL). In order to allow negative
eigenvalues, the Powell update instead of BFGS is used for transition-state search.
Although tailored for large systems, the linear-scaling geometry optimizers are suitable for smaller
systems as well.
11.6 Molecular Dynamics
11.6.1 Choosing the Nose-Hoover chain thermostat parameters
The Nose-Hoover chain thermostat is dened by specifying three parameters: A target kinetic
energy, a frequency and a chain length. For the ions, given the target temperature T
W
, the
target kinetic energy is just gkT
W
, where g is the number of degrees of freedom involved in a
common thermostat. For example, if there is one thermostat on the entire ionic system, then
g = 3N
AT
N
const
, where N
const
is the number of constraints to which the atoms are subject.
The frequency for the ionic thermostat should be chosen to be some characteristic frequency of the
ionic system for which one wishes to insure equilibration. In water, for example, one could choose
the O-H bond vibrational frequency. (Having a precise value for this frequency is not important,
as one only wishes to insure that the thermostat will couple to the mode of interest.) The choice of
chain length is not terribly important as it only determines how many extra thermostats there will
be to absorb energy from the system. Usually a chain length of 4 is sucient to insure eective
equilibration. Longer chains may be used in situations where heating or cooling eects are more
dramatic.
For the electrons, the target kinetic energy is not usually known a priori as it is for the ions.
107
However, by performing a short run without thermostats, one can determine a value about which
the electron kinetic energy naturally uctuates and take this as the target value. While the precise
value is not important, a little experience goes a long way, as a choice that is either too small or too
large can cause spurious damping of the ions or departures from the Born-Oppenheimer surface,
respectively. A good choice for the frequency of the electron thermostat can be made based on
max
I
,
the maximum frequency in the phonon spectrum. The frequency of the electron thermostat should
be at least 2-3 times this value to avoid coupling between the ions and the electron thermostats. As
an example, for silicon, the highest frequency in the phonon spectrum is 0.003 a.u., so a good choice
for the electron thermostat frequency is 0.01 a.u. The chain length of the electron thermostat can
be chosen in the same way as for the ions. 4 is usually sucient, however longer chains may be
used if serious heating is expected. In addition, the electron thermostats have an extra parameter
that scales the number of dynamical degrees of freedom for the electrons. (1/
e
= 2E
e
/N
e
, where
E
e
is the desired electron kinetic energy and N
e
is the number of dynamical degrees of freedom for
the electrons see Eq. (3.4) in Ref.[40]). The default value is the true number of dynamical degrees
of freedom N
e
= (2 N
GW
1) N
ST
N
p
ST
, where p = 2 for orthonormality constraints and
p = 1 for norm constraints. When this number is very large, it may not be possible to integrate
the electron chain thermostats stably using a frequency above that top of the phonon spectrum.
Should this be the case in your problem, then the number of dynamical degrees of freedom should
be scaled to some smaller number such that the system can once again be integrated stably. This
parameter has no other eect that to change the relative time scales between the rst element of
the electron thermostat chain and the other elements of the chain.
In addition to the basic parameters dening the chains themselves, one needs to specify two more
parameters related to the integration of the thermostated equations of motion. The rst is the
order M
SUZ
of the Suzuki integrator. Experience shows that the choice M
SUZ
= 3 is sucient
for most applications. Finally, one must specify the number of times the Suzuki integrator will be
applied in a given update. This is the parameter N
SUZ
which determines the basic Suzuki time
step t = t/N
SUZ
, where t is the time step being used in the MD run. N
SUZ
= 2 or 3 is usually
large enough to give stable integration. If more stable integration is required, try M
SUZ
= 4 or
make N
SUZ
larger.
11.7 Restarts
11.7.1 General information
All restart information for CPMD simulations are stored within one binary le. There are very
few exceptions we will discuss later. The name of the restart les is RESTART or RESTART.n, where
n stands for an integer number. If the keyword RESTART is found the program processes the
le with the name RESTART. Using suboptions to the RESTART option, the information retained
from the le can be specied. For example the suboptions COORDINATES WAVEFUNCTION will force
the program to use the geometry and orbitals from the RESTART le.
At the end of a simulation or at regular intervals (using the keyword STORE) a restart le with
the default name RESTART.1 is written. If this happens more than once (e.g. during a molecular
dynamics run) the restart le is being overwritten. Using the keyword RESTFILE it can be
specied that more than one restart le should be used for writing. If the RESTFILE parameter
was set to 4, then 4 restart les with the names RESTART.1, . . ., RESTART.4 will be written. If
more than 4 restart les are needed the rst one will be overwritten. This option is useful if there
is the possibility that restart les get corrupted (e.g. on instable systems), or if simulations are
performed that might lead to unphysical results. In this case it might be possible to go back to a
restart le which contains still intact information.
The name of the last restart le written is stored in the le LATEST. Using the suboption LATEST
to the keyword RESTART changes the default name of the le to be read from RESTART to
the name found in the le LATEST. The danger of using this option is that the le from which
the simulation is started gets overwritten during the simulation. Using the default (starting from
RESTART) ensures that the original le stays intact. However, it requires the renaming of the
nal le of a simulation from RESTART.n to RESTART.
108
11.7.2 Typical restart scenarios
Wavefunction optimizations The restart options used in wavefunction optimizations are
RESTART WAVEFUNCTION COORDINATES. The suboption COORDINATES is not
really necessary but it is adviced to use it anyway, as in this way the correspondence of wavefunction
and ionic geometry is assured.
Geometry optimizations Typical suboptions used in a geometry optimizations are
RESTART WAVEFUNCTION COORDINATES HESSIAN. With the suboption HES-
SIAN the information from previous runs stored in the updated approximate HESSIAN can be
reused.
Molecular dynamics Molecular dynamics simulations use restart options of the kind
RESTART WAVEFUNCTION COORDINATES VELOCITIES. These are the minimal
options needed for a smooth continuation of a CarParrinello molecular dynamics simulation. Use
of the suboption ACCUMULATORS ensures that the calculated means (e.g. temperature) are
correct for the whole simulation, not just the current run. If Nose thermostats are used it is
important also the restart the thermostat variables. This is achieved by adding the corresponding
keywords to the RESTART (NOSEE, NOSEP, NOSEC).
KohnSham energies The calculation of canonical KohnSham orbitals requires a restart. In
general, this will be a restart from converged orbitals from a wavefunction optimization. There is
no way that the program can check this. However, if the same convergence criteria are used, the
number of occupied states orbitals should converge in the rst iteration of the diagonalization.
11.7.3 Some special cases
The suboption VELOCITIES will result in a restart from both, ionic and wavefunction velocities.
In special cases, this is not the desired behavior. Using the additional keyword QUENCH the read
velocities can be set back to zero. This will be most likely used for wavefunctions with QUENCH
ELECTRONS. Another possibility is to reoptimize the wavefunction at the start of a molecular
dynamics simulation. This is achieved with the keywords QUENCH BO.
For performance reasons the writing of the restart le should be done only occasionally. This
might cause problems if the simulation was terminated incorrectly. Several hundreds or thousands
of simulation steps might be lost. For this reason CPMD writes a special output le GEOMETRY
after each molecular dynamics step. Together with a normal restart le this allows to start the
simulation form the last ionic conguration and velocities. To achieve this another suboption
GEOFILE has to be added to the RESTART keyword. After reading the positions and velocities
of the ions from the restart le, they are also read from the GEOMETRY le and overwritten.
Special restarts to be used with the keywords TDDFT and VIBRATIONAL ANALYSIS are
discussed in the sections covering that type of simulations.
11.8 TDDFT
The TDDFT part of CPMD is rather new. Therefore it hasnt yet reached the stability of other
parts of the code. It has to be used with special care.
There are four dierent type of calculations that can be performed using the TDDFT module;
calculation of the electronic spectra, geometry optimization and vibrational analysis, and molecular
dynamics in excited states.
All options (spectra and forces, spin polarized and unpolarized) are implemented for the Tamm
Danco approximation to TDDFT. Only part of these options are available for the full TDDFT
response calculation.
109
11.8.1 Electronic spectra
Electronic excitation energies can be calculated using the keyword ELECTRONIC SPECTRA
in the &CPMD section. This calculation is performed in three parts. First, the ground state
wavefunctions are optimized, then a limited set of unoccupied orbitals is determined and nally
the TDDFT response equations are solved. A typical input for such a calculation would look like
&CPMD
ELECTRONIC SPECTRA
DIAGONALIZATION LANCZOS
COMPRESS WRITE32
&END
&TDDFT
STATES SINGLET
5
TAMM-DANCOFF
DAVIDSON PARAMETER
150 1.D-7 50
&END
For this calculation of the electronic spectra defaults are used for the ground state optimization
(ODIIS and 10
5
convergence). The calculation of the empty states is performed using the Lanczos
diagonalizer with default settings. The nal wavefunction will be stored in the restart le using 32
bit precision.
Five single states with the TammDanco approximation have to be calculated. The parameters for
the Davidson diagonalization have been changed to 50 for the Davidson subspace and a convergence
criteria of 10
7
is used.
Restarting this type of calculation has to be done with care. At the end of each phase of the
calculation a new restart le is written. If the defaults are used, each time the le RESTART.1 is
overwritten. For a restart from converged ground state wavefunctions and canonical KohnSham
orbitals a restart with
RESTART WAVEFUNCTION COORDINATES
will be used. A restart also including the linear response orbitals will use
RESTART WAVEFUNCTION COORDINATES LINRES.
In this case only restarts from the le RESTART are possible as after phase one and two the le
RESTART.1 would be overwritten and the information on the linear response orbitals, read only in
phase three, would be lost.
11.8.2 Geometry optimizations and molecular dynamics
Geometry optimizations and molecular dynamics simulations can only be performed after an elec-
tronic spectra calculation. A typical input le would contain the sections
&CPMD
OPTIMIZE GEOMETRY
TDDFT
RESTART WAVEFUNCTION COORDINATES LINRES
&END
&TDDFT
STATES SINGLET
1
TAMM-DANCOFF
DAVIDSON PARAMETER
150 1.D-7 50
110
FORCE STATE
1
&END
The keywords in section &CPMD are all mandatory. The section &TDDFT species that the
optimization should be performed for the rst excited singlet state. Replacing OPTIMIZE GE-
OMETRY by MOLECULAR DYNAMICS BO would result in a molecular dynamics simu-
lation. In this case further input specifying the time step, maximal number of steps, thermostats,
etc. would also be supplied.
11.9 Perturbation Theory / Linear Response
11.9.1 General
Ref: [21].
Perturbation theory describes the reaction of a system onto an external perturbation. At the
time when the perturbation occurs, the system is in its ground state (or unperturbed state).
The perturbation then changes slightly the potential energy surface and therefore also the state
where the systems energy is minimum. As a consequence, the system tries to move towards that
state of minimum energy. This movement or the new state often have properties which can be
accessed experimentally. Example: An external electric eld will slightly deform the electronic
cloud, creating a dipole. That dipole can then be measured.
Assume that the magnitude of the perturbation is small compared to the strength of the forces
acting in the unperturbed system. Then, the change in the minimum energy state will be small as
well and perturbation theory can be applied to compute how the system reacts onto the pertur-
bation. Generally, the Schrodinger equation is expanded in powers of the perturbation parameter
(ex: the strength of the electric eld), and the equations obtained for those powers are solved
individually. At power zero, one rends the equation of the unperturbed system:
(H
(0)
k
)[
(0)
k
) = 0. (4)
For the part which is linear in the perturbation, the general format of the resulting equation is
(H
(0)
k
)[
(1)
k
) = H
(1)
[
(0)
k
). (5)
Grosso modo, this equation is solved during a linear response calculation through a wavefunction
optimization process for [
(1)
k
).
The presence of a rst order perturbation correction for the wavefunctions, [
(tot)
k
) = [
(0)
k
) +[
(1)
k
)
implies that the total density of the perturbed system is no longer equal to the unperturbed one,
n
(0)
, but also contains a rst order perturbation correction, n
(1)
. That density is given by
n
(1)
(r) =
(1)
k
[r) r[
(0)
k
) + c.c. (6)
The Hamiltonian depends on the electronic density. Therefore, the rst order density correction
implies automatically an additional indirect perturbation hamiltonian coming from the expansion
of the unperturbed Hamiltonian in the density. It has to be added to the explicit perturbation
Hamiltonian determined by the type of the (external) perturbation. The contribution is
H
(1)
indirect
(r) =
_
d
3
r
H
(0)
(r)
n
(0)
(r
)
n
(1)
(r
) (7)
The calculation of this indirect Hamiltonian represents almost 50% of the computational cost of the
response calculation, especially in connection with xc-functionals. After several unsuccessful trials
111
with analytic expressions for the derivative of the xc-potential with respect to the density, this
is done numerically. That means that at each step, the xc-potential is calculated for the density
n
(0)
+ n
(1)
and for n
(0)
n
(1)
(with an empirically set to 0.005), and the dervative needed in
(7) is calculated as
_
d
3
r
n
(1)
(r
)
v
xc
n
(0)
(r
)
=
v
xc
[n
(0)
+n
(1)
] v
xc
[n
(0)
n
(1)
]
2
. (8)
In the case of the local density approximation, the derivative can be done analytically, in which
case it only needs to be done once. This improves the performance of the optimization.
11.9.2 &RESP section input
Generally, the keyword LINEAR RESPONSE in the &CPMD input section initiates the
calculation. In the section &RESP, the type of the perturbation needs to be specied. Either
one of the following keywords must appear:
PHONON
LANCZOS
RAMAN
FUKUI
KPERT
NMR
They are discussed in detail in the following. An overview is also contained in the le respin p.F.
In addition to the specic keywords of every option, there are several keywords which are common
to all perturbation types. They determine ne-tuning parameters of the wavefunction optimization
process, and usually you do not need to change them. A # indicates that a command takes an
argument which is read from the next line. All other keywords toggle between two states and do
not require any argument. Those keywords can be put together, and they can also gure in the
main keyword line (example: NMR NOOPT FAST WANNIERCENTERS)
NB: The linear response code works with all cell symmetries
1
, but it is not implemented for
k-points.
# CG-ANALYTIC: The wavefunction optimization uses a preconditioned conjugate gradient
technique. The optimum length of the time step can be calculated analytically assuming
a purely linear equation, according to the Numerical Recipes Eq. 10.6.4. However, this is
somewhat expensive, and experience shows that the time step is almost constant except
at the very beginning. Therefore, it is only calculated a few times, and lateron, the last
calculated value is used. This option controls the number of times the step length is calculated
analytically. Default is 3 for NMR and 99 for all other perturbations.
# CG-FACTOR: The analytic formula for the time step assumes that the equation to be
solved is purely linear. However, this is not the case, since the right hand side can still depend
on the rst order wavefunctions through the dependence of the perturbation hamiltonian H
(1)
on the perturbation density n
(1)
. Therefore, the analytic formula has a tendency to overshoot.
This is corrected by an empirical prefactor which is controlled by this option. Default is 0.7.
# CONVERGENCE: The criterium which determines when convergence is reached is that
the maximum element of the gradient of the energy with respect to the wavefunction coe-
cients be below a certain threashold. This value is read from the next line. Default is 0.00001.
Experience shows that often, it is more crucial to use a strict convergence criterium on the
ground state wavefunctions than for the response. A rule of thumb is that good results are
obtained with a 10 times stricter convergence on the ground state orbitals compared to that
of the response orbitals.
1
except for isolated systems, SYMMETRY=0, where only the NMR part is adapted to.
112
# HTHRS or HAMILTONIAN CUTOFF: The preconditioning calculates the diago-
nal (G, G) matrix elements of = H
(0)
1
N
k
k
to do an approximate inversion of
Eq. (5). However, these diagonal values can become very small, yielding numerical insta-
bilities. Therefore, a smoothing is applied instead of simply taking the reciprocal values:
2
+
2
_
1/2
(9)
2
+
2
(10)
The value of the parameter in a.u. is read from the line after HTHRS, default is 0.5. By
default, Eq. (9) is used. TIGHTPREC switches to Eq. (10).
NOOPT: In order for the wavefunction optimization to work properly, the ground state
wavefunction must be converged. For this reason, a ground state optimization is performed
by default prior to computing the response. When restarting from an already converged
wavefunction, this step can be skipped through this keyword and the computer time for
initializing the ground state optimization routine is saved. However, the use of this option is
strongly discouraged.
POLAK: There are several variants of the conjugate gradient algorithm. This keyword
switches to the Polak-Ribiere formulation (see the Numerical Recipes, Eq. 10.6.7) which is
usually signicantly slowlier but safer in the convergence. By default, the Fletcher-Reeves
formula is used.
TIGHTPREC: Switches to another preconditioning formula. See HTHRS.
11.9.3 Response output
While the calculations are being done, the program prints the progress of the optimization process:
The scaling input prints the number by which the right-hand-side of Eq. (5) is multiplied
in order to deal with reasonable numbers during the optimization. The number is determined
through the condition
[[ H
(1)
[
(0)
k
) [[
2
= 1. (11)
When leaving the optimization routine, the inverse scaling is applied to the [
(1)
k
), of course.
The standard output shows (A) the maximum gradient of the second order energy with
respect to the rst order perturbation wavefunction, (B) the norm of that gradient, (C) the
second order energy, (D) its dierence with respect to the last value, and nally (E) the CPU
time needed for one step. The last value decreases by somewhat after the number of steps
determined by the CG-ANALYTIC keyword, because the analytic line search is no longer
performed, as discussed above.
A line full of tildes () indicates that the energy has increased. In that case, the conjugate
direction is erased and the conjugate gradient routine is restarted. Also the time step is
calculated again using the analytic quadratic line search formula.
The warning line search instable indicates that the length which has been calculated using
the analytic quadratic line search approximation (Numerical Recipes Eq. 10.6.4) has given
a numerical values larger than 3. This does not happen in normal cases, and it can yield to
program crashes due to oating point overows ( NaN, not a number). Thus, a safe value,
1, is used instead.
113
The warning gradient norm increased by more than 200% indicates that the quadratic
approximation is not valid in the momentary position of the optimization. If it was, the
gradient (of the energy with respect to the rst order perturbation wavefunctions) would
only decrease and nally reach zero. If this situation occurs, the conjugate direction is erased
and the conjugate gradient algorithm is restarted.
11.9.4 Phonons
Theory
A phonon corresponds to small displacements of the ionic positions with respect to their equilibrium
positions. The electrons principally follow them, in order to minimize again the energy of the
system.
The expansion of the Hamiltonian in powers of the displacement u
R
Z
R
[r R[
. (13)
The second is due to the pseudopotential which is rigidly attached to the ions and which must be
moved simultaneously. In particular, the nonlocal pseudopotential projectors must be taken into
account as well:
H
(1)
PP
= u
R
i
[P
R
i
)P
R
i
[
_
(14)
= u
R
i
__
R
[P
R
i
)
_
P
R
i
[ +[P
R
i
)
_
R
P
R
i
[
__
(15)
where [P
R
i
) designates the projectors, whatever type they are. The index i comprises the l and m
quantum numbers, for example. The superscript R just says that of course only the projectors of
the pseudopotential of the displaced atom at R are considered in this equation.
In CPMD 3.15.1, these projectors are stored in G-space, and only one copy is stored (that is the
one for a ctitious ion at the origin, R = 0). The projectors for an ion at its true coordinates is
then obtained as
G[P
R
i
) = e
iGR
G[P
R=0
i
). (16)
This makes the derivative
R
m
1
(e
j
)
m
2
(e
j
)
.
.
.
m
N
(e
j
)
_
_
_
_
_
s
j
=
_
_
_
_
_
m
1
(e
j
R
1
)
m
2
(e
j
R
2
)
.
.
.
m
N
(e
j
R
N
)
_
_
_
_
_
(17)
2
The reader might wonder whether Einstein summations over repeated indices like and R are done or not. The
answer is that it depends. If only one atom is displaced along one of the axes, there is no summation needed. The
generalization to a simultaneous displacement of all atoms in arbitrary directions is trivially done by assuming the
summation over and R.
114
where j=x,y,z, e
j
= unit vectors in the Cartesian directions and R
k
= positions of the atoms
(referred to the COM). The rotations s
j
constructed in this way are not orthogonal; before being
used they are orthogonalized with respect to the translations and with each other.
The projection on the internal mode subspace is done this way: rst one constructs a projector of
the form,
P =
j
(t
j
t
T
j
+s
j
s
T
j
) (18)
and then applies the projector to the Hessian matrix,
A = (I P) A (I P) (19)
with I being the unit matrix. The projection is controlled by the keyword DISCARD, vide infra.
Phonon input
The input for the phonon section is particularly simple due to the absence of any special keywords.
Only the word PHONON should appear in the &RESP-section.
Phonon output
In total analogy to CPMD 3.15.1s VIBRATIONAL ANALYSIS, the displacement of all atoms
in all cartesian directions are performed successively. The dierence is, of course, that there is no
real displacement but a dierential one, calculated in perturbation theory. Thus, only one run is
neccessary per ion/direction
3
.
At the end, the harmonic frequencies are printed like in the VIBRATIONAL ANALYSIS.
They should coincide to a few percent.
11.9.5 Lanczos
Theory
Ref: [119]
A dierent way of diagonalizing the Hessian matrix comes from the Lanczos procedure. It is easy
to generalize eq.15 to a collective displacement of atoms,
H
(1)
PP
=
R,
u
R
i
[P
R
i
)P
R
i
[
_
(20)
=
R,
u
R
i
__
R
[P
R
i
)
_
P
R
i
[ +[P
R
i
)
_
R
P
R
i
[
__
(21)
In this way the information contained in the Hessian matrix, A, can be used to compute terms of
the type
A w =
_
_
_
_
_
_
2
E
R
1x
w
2
E
R
1y
w
.
.
.
2
E
R
Nz
w
_
_
_
_
_
_
(22)
where w is the collective displacement. This is the building block for Lanczos diagonalization,
that is performed by iterative application of the symmetric matrix to be diagonalized, over a set
of vectors, known as Lanczos vectors, according to the scheme
r
0
= q
1
;
0
= 1; q
0
= 0; k = 0
WHILE
k
,= 0
3
In contrast to this, the VIBRATIONAL ANALYSIS displaces each atom in each direction rst by +0.01
and then by -0.01.
115
k = k + 1
k
= q
T
k
Aq
k
r
k
= Aq
k
k
q
k
k1
q
k1
k
=| r
k
|
2
q
k+1
= r
k
/
k
Orthogonalization, q
k+1
q
1
, , q
k
Diagonalization of T
k
END WHILE
The matrix A is thus projected onto a kk subspace, in a tridiagonal form, T
k
. Ts eigenvalues
are approximations to As, while the eigenvectors are brought in the nn space by means of the
orthogonal matrix Q = [q
1
, q
2
, . . . , q
k
]. The advantage with respect to the usual diagonalization
schemes is that the highest and the lowest end of the spectrum tend to converge before the ionic
degrees of freedom are fully explored.
The projection of the trivial eigenmodes is performed by eliminating their contribution from every
Lanczos vector at the orthogonalization step reported in the algorithm above,
q
k
= q
k
j
_
(q
T
k
t
j
)t
j
+ (q
T
k
s
j
)s
j
_
(23)
This procedure seems slightly dierent from that of the PHONON case, but they are perfectly
equivalent. It is controlled by the same keyword DISCARD with the same arguments.
Lanczos input
The input for the Lanczos routine is given by the keyword LANCZOS plus some optional ar-
guments and a mandatory following line with numerical data. Plese note that this keyword is
analogous to that for the Lanczos diagonalization of the electronic degrees of freedom. Given its
presence in the &RESP-section there should be no ambiguity.
LANCZOS [CONTINUE,DETAILS]; the keyword LANCZOS simply activates the
diagonalization procedure. At every cycle the program writes a le, LANCZOS CONTINUE.1
which contains the information about the dimension of the calculation, the number of itera-
tion, the elements of the Lanczos vectors and the diagonal and subdiagonal elements of the
T matrix.
With the option CONTINUE one restart a previous job, asking the program to read
the needed information from the le LANCZOS CONTINUE; if the program does not nd
this le, it stops. This option is to be used when the calculation that one wants to
perform does not t in the time of a queue slot.
The argument DETAILS prints a lot of information about the procedure at the end of
the output. It is intended for debugging purposes.
The subsequent line is mandatory, and contains three numerical parameters;
Lanczos dimension; it is the dimension of the vibrational degrees of freedom to be
explored. Normally it is 3N
at
, -3 if you are eliminating the translations or -6 if you
are eliminating also the rotations(vide infra). It is possible to use lower values. Higher
are non sense.
no. of iterations; it is the number of cycles that are to be performed during the
actual calculation. It must be to Lanczos dimension; the program checks and stops
if it is higher. In case of a continued job, the program checks if the given number
of iterations + the index of the iteration from which it restarts is within the limit of
Lanczos dimension; if not it resets the number to t the dimension, printing a warning
on std. output.
116
conv threshold; it is the threshold under which an eigenvector is to be considered as
converged. It is the component of the eigenvector over the last Lanczos vector. The
lower it is, the lower is the information about this mode which has still to be explored.
DISCARD {PARTIAL,TOTAL,OFF,LINEAR}; this keyword controls the elimination
of the trivial eigenmodes (i.e. translations and rotations) from the eigenvector calculations.
It works both for PHONON and LANCZOS. Omitting it is equivalent to DISCARD
PARTIAL. When using it, the choice of one of the arguments is mandatory; the program
stops otherwise. They are;
PARTIAL; only the translational degrees of freedom are eliminated (useful for crys-
tals). This is the default.
TOTAL; both translational and rotational degrees of freedom are eliminated.
OFF; the option is disactivated and no projection is performed.
Lanczos output In the output, all the informations about the perturbed wavefunction opti-
mization are reported, just like in the PHONON case. The dierences are in the form of the
perturbation and in the eigenmodes information coming from the diagonalization of T
k
.
The report of the perturbation for a water dimer reads like;
********************** perturbations **********************
**** atom= 1 O .04171821 .07086763 .07833475
**** atom= 2 O .03615521 .08499767 .07082773
**** atom= 3 H .29222111 .13357862 .09032954
**** atom= 4 H .33764012 .15750912 .25491923
**** atom= 5 H .06426954 .26020430 .01822161
**** atom= 6 H .15765937 .27370013 .29183999
cpu time for wavefunction initialization: 89.22 seconds
where at every atom corresponds the x,y,z displacemnts applied to calculate the perturbed wave-
functions.
At every iteration information about the elements of the T
k
matrix, alphas and betas, are re-
ported. Here we are at the end of the calculation. Note the numerical zero in the nal +1 beta
value. Then the spectrum in a.u. is reported, together with the convergence information. At the
last iteration there are vectors which are not converged. But this comes only from the denition,
since some of the eigenvectors must have a component over the last Lanczos vectors. Following
there are the familiar eigenvalues in cm
1
.
****************************************************************
*+* L2 norm[n[i+1]] = 0.100262974102936016E-02
*=* overlap: alpha[ 12 ] = 0.982356847531824437E-03
*=* off-diag: beta[ 13 ] = 0.300011777832112837E-19
*=* norm: = 0.300011777832112837E-19
****************************************************************
*** SPECTRUM, run 12 :
*** eigenvalue 12 = .4855525 (converged: .000000).
*** eigenvalue 11 = .4785309 (converged: .000000).
*** eigenvalue 10 = .4605248 (converged: .000000).
*** eigenvalue 9 = .4303958 (converged: .000000).
*** eigenvalue 8 = .0973733 (converged: .000000).
*** eigenvalue 7 = .0943757 (converged: .000000).
*** eigenvalue 6 = .0141633 (converged: .000004).
*** eigenvalue 5 = .0046807 (NOT converged: .004079).
*** eigenvalue 4 = .0020023 (NOT converged: .010100).
*** eigenvalue 3 = .0010310 (NOT converged: .313417).
*** eigenvalue 2 = .0009886 (NOT converged: .933851).
*** eigenvalue 1 = .0006303 (NOT converged: .171971).
****************************************************************
harmonic frequencies [cm**-1]:
129.0591 161.6295 165.0552 230.0241
117
351.6915 611.7668 1579.1898 1604.0732
3372.3938 3488.4362 3555.9794 3581.9733
****************************************************************
11.9.6 Raman
Ref: [22]
Upon the specication of the RAMAN keyword, the polarizabilities of the system are calculated
by evaluating the response to an applied electrical eld. The calculation is done by means of the
Berry phase approach, which is also suited for periodic systems.
11.9.7 Nuclear Magnetic Resonance
Theory
Ref: [23]
A magnetic eld B is applied to the system, which reacts by induced electronic ring currents.
These currents produce an additional magnetic eld by themselves, which is not homogeneous in
space. Therefore, the actual magnetic eld at the ionic positions is dierent for all atoms in the
cell. This eld determines the resonance frequency of the nuclear spin, and this resonance can be
measured with a very high accuracy.
The perturbation Hamiltonian is given by
H
(1)
=
1
2
e
m
p r B. (24)
The dicult part of this Hamiltonian lies in the position operator which is ill dened in a periodic
system. To get around this, the wavefunctions are localized and for each localized orbital, Eq. (24)
is applied individually assuming the orbital being isolated in space. Around each orbital, a virtual
cell is placed such that the wavefunction vanishes at the borders of that virtual cell.
The perturbation and therefore also the response are purely imaginary, so that there is no rst
order response density. This simplies the equations and speeds up convergence.
NMR input
The options which control the specic NMR features are discussed below. None of them requires
an argument, they can all be put in the same line.
RESTART: The run is restarted from a previous stop. The user has to take care that the
required les RESTART.xxx (where xxx are NMR, p x, p y, p z) exist.
CURRENT: Three density les containing current density values are written to disk. Fur-
ther, the nucleus-independent chemical shift elds are written to disk. All in cube format.
NOSMOOTH: At the border of each virtual cell, the position operator is smoothened
through an exp r
2
. This option turns smoothing o. Can be useful if your cell is too small
so that this smoothing would already occur in a region where the orbital density has not yet
vanished.
NOVIRTUAL: If this keyword is specied, no individual virtual cells are used at all. All
orbitals will have the same virtual cell, equal to the standard unit cell.
PSI0: With this option, the Wannier orbitals are plotted as cube les.
RHO0: With this option, the orbital densities are plotted as cube les.
# OVERLAP: Overlapping orbitals (overlap criterion read from next line) are assigned the
same virtual cells. Useful for isolated systems.
118
FULL A full calculation of the j term in the NMR scheme is done. Relatively expensive,
but quite important for accurate results in periodic systems.
NMR output
At the end of the six perturbation runs, the results are printed. This includes the magnetic
susceptibility and the chemical shieldings. For the chemical shieldings, there are two values: the
raw and the net ones. The raw shieldings correspond to a molecule in vacuum, without the
susceptibility correction, whereas the net shieldings contains that correction for a spherical sample.
It consists of an additive constant to all eigenvalues, which is printed out at the end of the net
shieldings.
In more detail, the results are:
The magnetic susceptibility tensor in both SI and cgs units. This quantity is an extensive
quantity, i.e. two molecules in the simulation box will give twice the susceptibility of one.
The raw shielding matrices of all atoms and its eigenvalues. Generally, the shielding tensor
is not symmetric. To obtain unique eigenvalues, it is symmetrized (A
ij
(A
ij
+ A
ji
)/2)
before the diagonalization.
All values are given in ppm, parts per millon. Chemical shieldings are dimensionless quanti-
ties.
The principal values (eigenvalues) of the raw and net shielding tensors. As mentioned above,
they only dier by an additive constant, the susceptibility correction for a spherical sample,
which is printed out at the end of the list. The numbers are the shielding eigenvalues from
most negative to most positive, the isotropic shielding (the average of the eigenvalues), and
the anisotropy (the dierence between the most positive and the average of the other two).
What to look at? If you search for the values which are peaked in a spectrum, you have to
take the isotropic shieldings (the iso column of the output). If the system is a gas, take the
raw shielding, if it is condensed matter, take the net shielding. If your system is a molecule in
vacuo, but the experimentalists measure it in a solvent, add the susceptibility correction to the
raw shieldings by yourself.
Why are my numbers so strange in absolute value? One more point shall be mentioned:
For all nuclei except hydrogen, pseudopotentials screen the core electrons. The chemical shielding,
however, is very sensitive to core and semi-core electrons. This can be corrected through a semi-
empirical additive constant in many cases. This constant still needs to be added to the values given
from the program. It depends on the nucleus, on the pseudopotential, and on the xc-functional.
In other cases, the calculated chemical shieldings are completely meaningless due to this deciency.
Then, you have to use a pseudopotential which leaves out the semicore states such that they are
correctly taken into account. Example: carbon shieldings can be corrected very well through a
constant number, silicon shieldings cannot. For Si, you have to take the n = 3 shell completely
into the valence band, requiring a cuto larger than 300Ry.
How to compare to experiment? Usually, experimentalists measure the dierence between
the resonance frequency of the desired system and that of a reference system, and they call it
(the shift) instead of (the shielding). To make life more complicated, they usually dene the
shift of nucleus A of molecule X with respect to reference molecule ref as
A
ref
(X) =
A
(ref)
A
(X).
Example: To calculate
H
TMS
(CH
4
), where TMS=tetramethylsilane, the standard reference molecule
for H-shifts, one would have to calculate the H-shielding of TMS and of CH
4
and substract them.
Unfortunately, TMS is nontrivial to calculate, because it is a large molecule and the geometry is
complicated (and the shieldings probably must be calculated taking into account vibrational and
rotational averaging). Thus, in most cases it is better to take for instance the CH
4
shielding as a
(computational) reference, and transform the shieldings relative to CH
4
to those relative to TMS
through the experimental shielding of CH
4
with respect to TMS.
While doing so, you should not forget that the shielding is a property which is usually not yet fully
converged when energies and bonding are. Therefore, the reference molecule should be calculated
with the same computational parameters as the desired system (to reproduce the same convergence
119
error). In particular, computational parameters include the type of the pseudopotential and its
projectors, the xc-functional and the cuto.
What accuracy can I expect? This is a dicult question, and there is no overall answer.
First, one has to consider that on the DFT-pseudopotential level of theory, one will never reach
the accuracy of the quantum chemistry community. However, for normal systems, the absolute
accuracy is typically 0.5-1 ppm for hydrogen and about 5-20ppm for Carbon. The spread between
extreme regions of the carbon spectrum is not reached: instead of 200ppm, one only reaches 150ppm
between aliphatic and aromatic atoms, for instance. The anisotropy and the principal values of
the shielding tensor can be expected to be about 10-20% too small. For hydrogen shieldings, these
values are usually better, the error remains in the region of a single ppm.
11.9.8 FUKUI
Compute, within the linear response perturbation theory, the nuclear Fukui function
I
[137]
formally identied as a reactivity index of the density functional theory [138, 139], according to
the postulated criterion for . The quantity is the change in the electronic chemical potential
and is given by
=
_
f(r)V
ext
(r)d
3
r =
I
R
I
(25)
where
I
= (F
I
/N)
V
ext = (/R
I
)
N
, N is the number of electrons, f(r) the electronic
Fukui function [137, 138], V
ext
(r) the external potential at r, R
I
the cartesian coordinate of the
I
th
nucleus and F
I
the force on the I
th
nucleus.
11.9.9 KPERT: kdp k-point calculations
Described in section 9.4, page52. Ref: [24]
11.10 Metadynamics
These are some notes about the use of the metadynamics (MTD) machinery within CPMD. It is
just a rst version of a manual that I hope will be improved by the comment and possibly the
contributions of the users of this method.
The metadynamics can run in a standard NVE/NVT MD run or in a NPE/NPT run (variable
cell). In order to apply the MTD algorithms in CPMD some (not few) lines have to be added in the
input le. These lines are to be in the &ATOMS .. &END section and they provide information
about the kind of MTD to be performed, the choice of collective variables (CV), some parameters
required to determine the time dependent potential and some other options. All the MTD input
must be between an initial and a nal line which are:
METADYNAMICS
END METADYNAMICS
If the initial line contains also the keyword COLLECTIV E V ARIABLES, the standard MTD,
with one single set of CV, is initialized. If, instead, the keyword MULTI is found, more than
one MTD are performed simultaneously on the same system; therefore, the whole set of CV is
constituted by NSUBSY S subsets, which are independent one from each other. The number of
subsystems is given on the same line by writing NS = followed by an integer number (default: 1).
Alternatively, if MULTIPLE WALKERS is present in the same line multiple walker metady-
namics is preformed using the extended Lagrangian metadynamics; number of walkers is read in
the same line immediately after NW = (see 11.10.7). Instead, if CELLFULL is the keyword, the
CV are the 6 cell parameters (3 side lengths and 3 angles), and the MTD is performed without
extended Lagrangian, i.e. the contribution coming from V (t) is directly added into the stress tensor
(see below in MTD Algorithm).
For almost all the input parameters there is a reasonable default value, but, since the range of
applications of MTD is quite wide, it is likely that the default values do not t your problem.
120
Therefore some eort is required to choose the optimal conditions for your run. Of course, it is
important to know something about MTD before using it. There are some references about the
method [26, 27, 120], and about some successfull applications, as e.g. [121, 122, 123, 126, 125, 127,
128]. It can be of great help to read about the choices and results obtained by other users. But
I remark that there are very few general rules that can be held valid for dierent problems and
systems.
The method is based on the denition of a manifold of CV as functions of the degrees of freedom
characterizing your system, S = S
(R, , h), where R are the ionic degrees of freedom, are the
electronic wavefunctions, and h denes the cell box. The CV which are implemented in the code,
have been chosen according to the needs of those who used the method up to now. Of course they
do not exhaust all the problems, and many more CV might be needed in the future. To implement
them, once the analytical formula and its derivatives are available, is not complicated at all. In
principle, the implementation should be easy for anybody who knows a bit the CPMD code.
11.10.1 MTD Algorithm
Once the CV have bee chosen, the MTD method can be applied in two dierent fashions.
Direct MTD: The simplest approach is to dene the time dependent potential as function of S,
V (t, S), and apply it directly onto the involved degrees of freedom. In this case, the equations of
motion of the dynamic variables of the system, R, , h, will include an additional term in the total
forces, due to the contribution of V (t, S). The disadvantage of this simplied version is that there
is scarce control on the dynamics in the space dened by the CV (CV-space), which is a projection
of the space of all the possible congurations. In general, we would like to span thoroughly the
CV-space, and to acquire information about the underlying potential. Often, this means that we
need a slow dynamics in this space, where, for each set of values of the CV, we allow the system
to equilibrate and to choose the conguration with the highest probability. Only in this way we
will be able to construct a reasonable probability distribution in the congurational space that has
been explored and consequently we will be able to reproduce the Free Energy surface.
Lagrangian MTD: This formulation is based on the method of the extended Lagrangian. In
addition to the dynamic variables that characterize your system, a new set of variables s = s
is
introduced. Each s
and velocity
s
to the respective S
(R, , h),
(S
( ) s
)
2
, and the time dependent potential, which
now is a function of s, V (t, s). The coupling constants k
are the
parameters that determine the dynamics of the s
t
i
<t
_
W
i
exp
_
(s s
i
)
2
2(s
)
2
_
exp
_
_
(s
i+1
s
i
) (s s
i
)
_
2
2(s
||
i
)
4
__
, (26)
Here, t indicates the actual simulation time, i counts the metadynamics steps, the rst exponential
gives the hills shape in the direction perpendicular to the trajectory, whereas the second exponen-
tial tunes the shape along the trajectory. In this form, the width of the hill along the trajectory is
determined by the displacement in the CV-space, walked between two consecutive metadynamics
steps, s
||
i
= f
b
_
_
(s
i+1
(s
i
)
2
_
. f
b
is a factor, which is read in input and can be used to
change the size of the hills along the trajectory, by default it is 1. The height W and the width s
are input parameters that can also be tuned during the MTD, in order to better t the hill shape to
the curvature of the underlying energy surface (in the CV-space). As a rule of thumb, s
should
have roughly the size of the uctuations of CV at equilibrium (half the amplitude of the well) and
W should not exceed few percents of the barriers height. These information can be obtained by
some short MD runs at equilibrium (without MTD) and from some insight in the chemical/physical
problem at hand. Since, in general, dierent CV uctuate in wells of dierent size, it is important
to dene one scaling factor scf
, so that s
)/scf
= s
.
Other implemented shapes of V (t) are:
Shift: the tails of the Gaussians are cutoed, by setting to zero the Gaussian at a distance
R
cutoff
s
from its center. In this way the problem of the overlap of the tails in regions far from
the actual trajectory is reduced.
Rational: instead of Gaussian-like hills, some kind of rational functions are used,
V (t, s) =
t
i
<t
_
W
i
1
_
(ss
i
)
2
s
_
n
1
_
(ss
i
)
2
s
_
m
exp
_
_
(s
i+1
s
i
) (s s
i
)
_
2
2(s
||
i
)
4
__
, (27)
where the exponents n and m determine the decay.
Lorentzian: Lorentzian functions are used in place of Gaussians.
In all the cases, a new hill is added at each step of MTD, where t
meta
= t
i+1
t
i
is usually
chosen equal to 10 500 steps of CP-MD (it depends on the relaxation time of the system and the
size of the hills). The center of the new hill at time t
i+1
is positioned along the vector s s
i
.
11.10.3 Metadynamics Keywords
Now lets start with the explanation of the keywords. First, the denition of the CV is required.
The selected CV are read from the input subsection enclosed between the initial and nal lines:
DEFINE V ARIABLES
END DEFINE
Between these two lines the rst input line states how many CV are used, NCOLV AR. In the
following, each variable is described by one or more lines, according to its type. In general, each
line must start with the name of the CV, type name, followed by some indexes or parameters
that are needed to specify its analytical function and the kind of atoms or species that are
involved. At the end, always on the same line of the type name, the scaling factor scf and, if
the extended Lagrangian is used, k and M can be given. If not specied scf, k and M take some
122
default values.
scf: by default, scf = 1 and it is xed during the whole run. Otherwise, you can write SCF
followed by the value, or SCA followed by the value, a lower bound and an upper bound. In the
latter case, the scf is tuned along the MTD run. In practice, the average amplitude of the CV
uctuation is checked every time to time, and, if scf
is far from s
, the scf
is changed
accordingly.
M: it determines how fast the s variable spans the entire well. Given the width of the well
scf s
j=i
1
1 +e
k(d
ij
d
0
)
(28)
where i is the index of the selected atom, j runs over all the other atoms in the system, k is
the parameter which determines the steepness of the decay and d
0
is the reference distance.
After the type-name, in the same line, give i k d
0
.
DIFFER: Dierence between two distances, give the indexes of the 3 atoms dening the 2
vectors, i1 i2 i3, s = d
i1i2
d
i2i3
.
123
COORSP: CN of one selected atom i with respect to only one selected species jsp. The CN
is dened by a Fermi like function as for COORD, but in this case j runs only over the atoms
belonging to the selected species jsp. After the type-name, in the same line, give i jsp k d
0
.
COORGROUP: Sum of the CN of a group of atoms A with respect to individual group of
atoms (B). CN is estimated using the Fermi function. Dierent cuto distances are allowed
for each type of A atoms.
CN =
N
A
i
N
B
(i)
j
1
1 +e
k[d
ij
d
0
(i)]
(29)
After the keyword COORGROUP, N
A
and k should be specied. In the next lines should be:
i, N
B
(i), d
0
(i)
j(1) j(N
B
(i))
This has to be done for all i in list of A type atoms.
COOR RF: CN of one selected atom i with respect to one selected species, jsp, or a list of
atoms, j1 jn
list
. The CN value is calculated as the sum of rational functions
CN
i
=
n
list
j=i
1
_
d
ij
d
0
_
p
1
_
d
ij
d
0
_
p+q
, (30)
where j runs over the indexes of the atoms belonging to jsp or over the indexes given in the
list j1 jn
list
. For the option of the species, you should provide, after the type-name, the
indexes i and jsp, the exponents p and q, and the reference distance d
0
are read. If, instead,
the list option is your choice, write immediately after the type-name the keyword INDAT,
and next the values of i, n
list
, p, q, and d
0
. The indexes of the atoms belonging to the list
are read from the next line.
If the keyword 2SHELL is found, in the same line as COOR RF, the rst real number after
this keyword is a second reference distance d
2sh
. In this case, the functional form of CN is
modied, in order to take into account only the neighbors belonging to one farther shell, and
d
2sh
is the average distance of these atoms from i:
CN
2sh
i
=
n
list
j=i
1
_
(d
ij
d
2s
)
d
0
_
p
1
_
(d
ij
d
2s
)
d
0
_
p+q
. (31)
For the modied CN the exponents must be even.
BNSWT: Reciprocal CN between 2 selected atoms, dened with the same functional form as
the one described for COOR RF. This coordinate states the presence of the bond between
the two atoms i and j. After the type-name, give i, j, p, q, and d
0
.
TOT COOR: Average CN of the atoms belonging to a selected species isp with respect to a
second selected species, jsp, or with respect to a given list of atoms, j1 jn
list
. The same
functional forms and input options are used, as those described for COOR RF, but the index
of one selected species isp is read in place of the index of one atom.
DISPL1: Average displacement of one group of species with respect to a second group of
species, computed along one specied diraction in space (lattice axis in crystals). This CV
is useful to study diusion processes in condensed matter. If the keyword MIL is found,
the 3 Miller indexes, which dene the direction in space, are read immediately after (default:
v = (hkl) = (100)).
COORDIS:
124
PLNANG: Angle between two planes. Each plane is dened by the coordinates of 3 atoms;
after the type-name, give the indexes of the 3 atoms dening the rst plane, i1 i2 i3, and
the indexes of the atoms dening the second plane, j1 j2 j3.
HBONDCH:
DIFCOOR: Dierence between the CN of two dierent atoms, i1 and i2, with respect to the
same species jsp, or the same list of atoms,j1 jn
list
. The same functional forms and input
options are used, as those described for COOR RF, but the index of two selected atoms are
read, i1 and i2, rather than one.
RMSD AB: Given two atomic congurations A and B, the root mean square displacements
(RMSD) of the actual conguration from A, rmsdA, and from B, rmsdB, are calculated
(global translation and rotation are subtracted by the method of quaternions). The RMSD
can be calculated on selected group of species: after the type name give the number of
species (NUMSPEC) and the indexes of the selected species (IS
1
IS
NUMSPEC
). If
NUMSPEC = 0 all the species are included. If in the same line the keyword FILEAB is
found, next the le name is read, where the atomic positions of the congurations A and
B are given. Otherwise the le name is by default STRUCTURE AB. File format: 2
consecutive blocks of 1 + NATOM lines. In each block, the rst line is a title (Character)
and it is followed by the list of atomic coordinates in a.u. (element name xy z).
COOR CHAIN: Conditioned CN. Given three species isp1, isp2, and isp3, the following
average CN is calculated
CN =
1
N
sp1
N
sp1
i1=1
_
_
N
sp2
i2=1
_
_
_
1
_
d
i1i2
d
0
12
_
p
1
_
d
i1i2
d
0
12
_
p+q
N
sp3
i3=1
1
_
d
i2i3
d
0
23
_
p
1
_
d
i2i3
d
0
23
_
p+q
_
_
_
_
_. (32)
After the type-name, the parameters isp1, isp2, isp3, p, q, d
0
12
, and d
0
23
are read.
HYDRONIUM:
DIS HYD:
SPIN: Distance between a selected atom and the center of the spin polarization (
),
where indicate the polarized density. The center is located where the dierence is maximum,
and this kind of variable is useful only when some spin polarization is present. The position
of the center in systems with PBC can be calculated by the denition proposed by Resta
[110, 129]. Obviously, this CV can be used only together with LSD. After the type-name,
give the index of the selected atom.
VOLVAR: Volume of the cell. It can be used only with NPE/NPT MD.
CELLSIDE: Length of one cells side: give the cell-sides index i (i
a
= 1,i
b
= 2,i
c
= 3).It can
be used only with NPE/NPT MD.
CELLANGLE: Cell-angle: give the cell-angles index i (i
= 1,i
= 2,i
= 3)). It can be
used only with NPE/NPT MD.
VCOORS This CV represents the coordination of one point (V) with respect to a selected
species of atoms jspec in the system:
CN
jspec
V
=
N
jspec
ijspec
1
1 +e
k(d
iV
d
0
)
(33)
After the keyword the parameters jspec, k, d
0
are read. In the next line the coordinates of
the point V are read in a.u.
125
DIPOLE The dipole of the atoms i
1
, ..., i
N
with respect to the atom j is dened as:
D
j
=
1
Q
i=i
1
,..,i
N
q
i
(r
i
r
j
); Q =
i=i
1
,..,i
N
q
i
(34)
The three spherical coordinates of
D
j
, that is (
j
,
j
,
j
), can be used independently as CV.
The keywords are DIPOLERHO, DIPOLETHA, DIPOLEPHI. In the same line after
the keywords are read the index of the atom j and the number N of atoms which constitute
the dipole. In the next two lines are read the indexes of the N atoms and the corresponding
charge q
i
.
If CELL FULL is dened in the rst line of the MTD input, none of the CV dened above is
used. The CV are the 6 cell parameters. In the section DEFINE V ARIABLE, the number of
CV is 6 and in the following 6 lines the scaling factors are given: for each line write the index i of
the corresponding CV (i
a
= 1,i
b
= 2,i
c
= 3,i
= 4,i
= 5,i
= 0.1 u.s., W =
0.001 Hartree).
TUNING HHEIGHT: With this keyword the height of the hills is tuned according to the
curvature of the underlying potential. If the symbol = is read in the same line as TUNING
HHEIGHT, the lower and upper bounds of W are read immediately after (defaults: W
min
=
0.0001 Hartree, W
max
= 0.016 Hartree).
HILLVOLUME: With this keyword the volume of the hills, W (s
)
NCOLV AR
, is kept
constant during the MTD run, i.e. when the height changes due to the tuning (see the
previous keyword), the width is changed accordingly. This option is can be used only if the
tuning of the hills height is active.
CVSPACE BOUNDARIES: With this keyword the connement of the CV-space is required,
in the direction of a selected group of CV. The number of dimensions of the CV-space, in
which the connement is applied, is read from the next line, NUMB (default: 0). The fol-
lowing NUMB lines describe the type of connement. For each line the following parameters
are required: index of the CV (as from the list given in the denition of the CV), the strength
of the connement potential V
0
in Hartree, two real numbers, C1 and C2, that determine
from which value of the CV the conning potential is active. Finally, if the keyword EPS
is read in the same line, the real number, which is read immediately after, determines how
smoothly the conning potential is switched on (default = 0.01). The conning potential
can be used with the following CV:
DIST: V
conf
= V
0
_
s
C1
_
4
and it becomes active only if s
> C2.
DIFFER: V
conf
= V
0
_
|s
|
C1
_
4
and it becomes active only if s
> C2 or s
< C2 .
Coordination numbers: if (CN ) < C1, V
conf
= V
0
(
C1
CN
)
10
, if (CN + ) > C2,
V
conf
= V
0
(
CN
C2
)
10
.
RESTRAIN VOLUME: With this keyword a conning potential is applied to the volume
variations. The option can be used only in combination with the NPE/NPT MD. From
the next line, the following parameters are required: f
min
, f
max
, and V
0
. The factors f
min
and f
max
multiplied by the initial volume of the cell, give, respectively, the lower and upper
bounds for the volume, whereas V
0
gives the strength of the conning potential.
MULTI NUM: his keyword should be used when a multiple set of MTD runs are performed
simultaneously on the same system. Here the number of separated sets CV for each subsystem
has to be given in the following line, NCV SY S
1
NCV STS
NSUBSY S
. This means that
the rst NCV SY S
1
CV, in the list of those dened in the DEFINE V ARIABLES section,
will belong to the rst subset, the next NCV SY S
2
to the second, and so on. This option is
implemented only together with the extended Lagrangian formulation.
MONITOR: This keyword requires that an additional monitoring of the values of the CV
is performed along the MD trajectory. This means that the values are written on an output
le every WCV FREQ MD steps, even if no hill is added at that step. The frequency for
updating the le is read from the following line, the le name is cvmdck mtd, and it is not
created if this option is not activated.
RANDWALK: In the case of multiple walker metadynamics, collective variables of all walkers
are initialized with dierent random velocities.
11.10.6 Output les
During a run of MTD, several output le are updated at each MTD step, which are characterized
by the extension mtd. These les contain the history of the MTD, the parameters giving the
additional potential, and other information that can be useful during the analysis of results. The
128
rst column for all these les is the CPMD step number (NFI) that corresponds to this MTD step.
In the case of MULTI MTD some of the les have a further extension s#, which indicates the
related subsystem.
Extended Lagrangian MTD:
istvar mtd: the rst NCOLV AR columns are the S
( ) s
.
colvar mtd: the rst NCOLV AR columns are the s
.
parvar mtd: norm of the total displacement in the CV-space, s
||
, hills width, s
, hills height,
W.
disvar mtd: the rst NCOLV AR columns are the displacements of the s
.
velvar mtd: the velocities of the s
.
forfac mtd: the rst NCOLV AR columns are the forces coming from the coupling potential (sum
of harmonic terms, V
harm
), the next NCOLV AR columns are the forces coming from V (t), the
last NCOLV AR are the forces coming from the conning potential.
enevar mtd: ions temperature, electrons kinetic energy, s CV temperature 2K
s
/(NCOLV ARk
B
),
V
harm
, V (t) at the actual position in CV-space, KS energy E
KS
, E
tot
+K
s
+V
harm
, E
tot
+K
s
+
V
harm
+ V (t). cvmdck mtd: monitoring o the CV along the MD trajectory. This le is updated
every it WCV FREQ MD steps (see previous section MONITOR)
Direct MTD:
colvar mtd: the rst NCOLV AR columns are the s( )
.
sclvar mtd: the rst NCOLV AR columns are the scaled s( )
, hills height,
W.
disvar mtd: the rst NCOLV AR columns are the displacements of the s
.
forfac mtd: the rst NCOLV AR columns are the forces coming from V (t), the last NCOLV AR
are the forces coming from the conning potential.
enevar mtd: ion temperature, electrons kinetic energy, V (t) at the actual position in CV-space,
KS energy E
KS
, E
tot
+V (t).
11.10.7 Using multiple walker metadynamics
Multiple walker metadynamics is activated using the MULTIPLE WALKER keyword in the
initial input line of metadynamics (i. e., after METADY NAMICS keyword). Multiple walker
using the extended Lagrangian metadynamics in combination with the CarParrinello type of
dynamics is only implemented at the moment. From the same line of MULTIPLE WALKER
keyword, the number of walkers (NWALK) is read as NW = NWALK (without any space in
between).
NWALK replicas are created, and for each DFT forces and energy calculations are done indepen-
dently. However, all the replicas ll the same free energy surface encompassed by the set of reaction
coordinates specied [130]. Implementation is done in such a way that each replica belongs to a dif-
ferent processor group,and each processor group is able to perform independent DFT calculations
in parallel; if NPROC number of processors are used, each replica is using NPROC/NWALK
number of processors [131] for computations. See the output le for the details on the division of
processors in to corresponding processor groups. Note that output of all the walkers are currently
dumped in to the (same) standard output le. Trajectory, geometry and energy les of each walk-
ers are separately written out in les having their usual names augmented with IWALK, where
IWALK is the walker ID.
If a multiple walker run has to be started from a single restart le, copy or link it NWALK
times as RESTART 1, RESTART NWALK (similarly the MTD RESTART le, if is also
restarted). In the procedure of creating new walkers, like above from one restart or increasing
129
walker numbers during the run, it is advised to initially run with zero hill height, still keeping
all the biasing potentials accumulated upto then (i. e. restarting from the MTD RESTART le
if any previous metadynamics runs have been done), and use RANDWALK keyword until the
(all) walkers are far apart (at least 1.5 x hill width) from each other. In the following (restart)
run, use the required hill height and remove the RANDWALK keyword. Note that the frequency
of adding hills will be nearly NMTD/NWALK if NMTD is the number of MD steps required
to add a hill using 1 walker. Thus consider decreasing the MINSTEPNUM INTERMETA
appropriately. However, it is highly recommended to use the adaptive metadynamics time step
using MOV EMENT CHECK keyword, and the tolerance is typically 1.5 times the hill width
parameter [128]; better set the CHECK DELAY to 1. Displacement tolerance are also forced to
satisfy between the walkers when MOV EMENT CHECK is used. Note that it is possible to
decrease the number of walkers, in a straight forward manner during a restart run.
11.10.8 Shooting from a Saddle
Once one reactive trajectory has been found, one may want to determine more precisely the
position of the transition state region. A standard way to do this is to select some points along
the trajectory, and, by shooting with random velocities a new MD from this point, measure the
probability to reach the surrounding basins of attraction [132]. The dierent basins of attraction
can be identied by dierent values of a selected set of CV. One can say that the trajectory has
fallen in one of the known basins when all the actual CV values satisfy the values characterizing
that basin, within a certain tolerance. Given a set of coordinates, one can start a CPMD run where
this check is iterated as many times as you like, in order to establish the committor distribution.The
search for the saddle point region is initialized when in the section &ATOMS &END of the input
le, the keyword SADDLE POINT is found. In what follows, a subsection for the description of
the selected CV is required. It has the same format as the one used for the MTD run.
11.10.9 Keywords
The list of keyword regarding the shooting needs to be ended by the line
END SADDLE
Other keywords are:
KNOWN MINIMA The values of the CV, which characterize the known basin of attraction,
are read from the following lines. The rst line after the keyword contains the number of
the known minima NCV MIN. The next NCV MIN lines contain the set of values for each
of these minima. The list of the values must keep the same order used in the denition
of the CV. If on the same line as KNOWN MINIMA, the keyword EXTENDED is
also found, each line contains NCOLV AR more entries, which are the tolerances for the
acceptance of the corresponding minimum conguration (the order of the tolerances must
be the same as the one for the CV values). By using the EXTENDED keyword, each
minimum conguration can be accepted with dierent tolerances.
SADDLE TOLERANCES If the EXTENDED keyword is not used, one single set of toler-
ances (one for each CV) can be given by using this keyword. The tolerances are read from
the next line in the same order used for the CV denition. Otherwise, default values are
assigned at each tolerance.
MAXSEARCH The maximum number of trials, where a new MD trajectory is generated,
is read from the next line. At each trial, the MD starts from the same initial coordinates,
whereas the initial velocities are randomly generated at every new restart. During one trials,
every NSTEP the actual values of the CV are checked and compared to the values given
for the known minima. If all the values of one of these minima are satised within the given
tolerances, the MD is stopped and restarted for the next trial.
STEPCHECK The number of MD steps between two consecutive checks is read from the
next.
130
MAXCHECKS The maximum number of checks for each trial is read from the next line.
11.11 Restricted Open-Shell Calculations
Molecular dynamics simulations in the rst excited state can be performed using Restricted Open-
Shell Kohn-Sham (ROKS) theory [30]. The keyword ROKS in the &CPMD section defaults to
the rst excited singlet state. Solving open-shell equations is not simple unless
1. a high-spin state is computed.
2. the two singly occupied molecular orbitals (SOMOs) have dierent spatial symmetry.
In these two cases the Goedecker-Umrigar-Algorithm (GOEDECKER) may be used which shows
the best convergence properties and is applicable in connection with Car-Parrinello molecular
dynamics. Otherwise it is necessary to use a modied variant of the Goedecker-Umrigar-Algorithm
and to do Born-Oppenheimer molecular dynamics (unless you know what you are doing). In
almost all cases, the default algorithm (DELOCALIZED) is applicable, whereas for example some
dissociation reactions require the localized variant to enable localization of the orbitals on the
fragments.
ROKS LOCALIZED
In order to make sure that the chosen algorithm works for a certain system, the conservation of
energy during a molecular dynamics simulation and the shape of the orbitals should always be
checked. One of the SOMOs should have the same nodal structure as the HOMO obtained by
a ground state calculation. If using the unmodied Goedecker-Umrigar scheme (GOEDECKER),
the energy of the singlet may collapse to approximately the triplet energy if the two SOMOs do
not have dierent symmetries. The triplet energy can be calculated by speciying
ROKS TRIPLET
or also
ROKS TRIPLET GOEDECKER
See the description of the keywords LOW SPIN EXCITATION, LSE PARAMETERS
and MODIFIED GOEDECKER for a description of how to do ROKS calculations using the
older input LOW SPIN EXCITATION ROKS. ROKS GOEDECKER corresponds to LOW SPIN
EXCITATION ROKS whereas ROKS DELOCALIZED corresponds to LOW SPIN EXCITATION
ROKS with MODIFIED GOEDECKER. Do not use LOW SPIN EXCITATION in the &SYSTEM
section and ROKS in the &CPMD section at the same time.
ROKS is not implemented with Vanderbilt pseudopotentials.
A Slater transition-state density between a singlet ground state and the rst excited singlet state
(or any pair of states described with ROKS) can be useful whenever one set of Kohn-Sham states is
required which is equally well suited for each of the states involved in a transition, e.g., to calculate
the couplings between the electronic transition and an external inuence. This method is analogous
to state-averaged multicongurational SCF methods and shares many of their benets with them.
In CPMD, it can be used to calculate non-adiabatic couplings between singlet states [93, 94], see
options COUPLINGS.
11.12 Hints on using FEMD
There are several parameters which crucially aect the speed, accuracy and robustness of the
FEMD method. These are related to: LANCZOS PARAMETERS, STATES and ANDERSON
MIXING. Less crucially, the ELECTRON TEMPERATURE.
131
11.12.1 Lanczos Parameters
Several parameters related to the Lanczos ( Friesner-Pollard) method are given. Generically:
LANCZOS PARAMETER [N=n]
ncycle nkrylov nblock tolerance
drhomax(2) tolerance(n)
.....
.....
drhomax(n) tolerance(n)
Ncycle can always be safely set to 50. Similarly, Nkrylov = 8 is almost always a good choice.
Exceptionally, for certain d-metallic systems, increasing nkrylov = 16 may be more ecient.
Nblock is the dimension of the blocking in the evaluation of H[
1
, ...,
nblock
]. Nblock should be a
divisor of NSTATE and recommended values lie in the range of 20-100. The tolerance species
the accuracy to be achieved in the Lanczos method. States are considered converged if
[H [
2
< tolerance (37)
For ecient calculations, the tolerance should vary according to closeness to self-consistency (
as measured by DRHOMAX). During initial stages of the SC cycle, the tolerance can be loose,
gradually tightening until close to SC it is high. An example of this might be:
LANCZOS PARAMETER N=5
50 8 20 1.D-9
0.05 1.D-11
0.01 1.D-13
0.0025 1.D-16
0.001 1.D-18
For accurate forces, a nal tolerance of at least 1.D-16 is recommended, although accurate energies
can be got using a lower tolerance. It is worth experimenting how best to tighten the tolerance -
it could be system dependent.
11.12.2 Other important FEMD parameters
The keyword STATES denes the dimension of the subspace used in the diagonalization. STATES
must be greater than or equal to N
el
/2, but it is generally good to allow for a number of more
or less empty bands (usually 10% or so). Finally, ANDERSON MIXING determines the rate of
convergence to self-consistency. Properly chosen the convergence can be very fast. Typically for
bulk systems we use values between 0.2-0.5, smaller values being necessary for large systems. For
metallic surfaces, small values are necessary ( typically 0.03-0.05).
If using k-points, then it is usually a good idea ( and this is done by default if using MONKHORST
PACK k-points) to exploit symmetries. In this case, however, beware of including the POINT
GROUP keyword to symmetrise properly the density. Finally, if starting from a high-symmetry
structure, you may nevertheless want to use the full k-point mesh ( apart from time-inversion
symmetry related k-points), and in this case specify the keyword FULL.
11.13 The Davidson analysis and the shared electron number
The calculation of the shared electron number can have the following input section:
&PROPERTIES
PROJECT WAVEFUNCTION
POPULATION ANALYSIS MULLIKEN DAVIDSON 2-CENT 3-CENT
4
1
WAVEFUNCTION LATEST
&END
132
Note, that for the hydrogen it is enough to specify one atomic orbital to project on, for the elements
Li to Ne it is sucient to specify 4 atomic orbitals.
11.14 CPMD/Gromos QM/MM Calculations
11.14.1 General Overview
An additional interface code (MM Interface folder) and an adapted classical force eld code [50]
(Gromos folder) are needed to run CPMD in fully hamiltonian hybrid QM/MM mode[18]. To
use this code a Gromos license is required and therefore it is not included in the standard CPMD
code. The interface code and the adapted classical force eld code can be obtained by directly
contacting the CPMD developers.
To create a makele for compilation of a QM/MM enabled CPMD binary, you have to copy the
two above folders (or create symbolic links to them) in the CPMD source directory and then to
add the -qmmm ag when executing the mkconfig.sh script (see section 6). The resulting binary
can be used for normal CPMD runs as well as for QM/MM simulations.
11.14.2 Input les for QM/MM CPMD
A QM/MM run requires a modied CPMD input le, some additional input les, and creates
the normal CPMD output le and some new ones. The input le consists of a standard CPMD
input with with the QMMM keyword in the &CPMD section, a modied &ATOMS section and a
mandatory &QMMM section. Furthermore three les for the classical code are needed (coordinates,
topology and input le). These can be taken from previous fully classical simulations and have
to be in Gromos format. Topologies and coordinates les created with the Amber[51] package are
also supported. A converter to Gromos format[50] is available.
11.14.3 Starting a QM/MM run
To start a QM/MM simulation, you rst do a simulation of your system with a regular classical
MD-code to get an equilibrated conguration. The tricky part in this is usually the treatment of
(metal-)ion or special molecules, that are not parameterized withing a given force eld but are in
the active center of your molecule (one of the prominent reasons why you want to do a QM/MM
run in the rst place). It is usually easiest to keep that part rigid throughout the equilibration,
until after you have dened the QM-subsystem.
Starting from the classically equilibrated structure, you have to create a topology, a coordinate
and an input le in Gromos format (either by using the Gromos tools or a converter). Now you
need to dene your QM system by assigning pseudopotentials to selected atoms in your CPMD
input le (see 11.14.5).
You can now start to continue the classical equilibration with CPMD using MOLECULAR
DYNAMICS CLASSICAL. Please note, that there are several special constraints available to
ease the transition in case of strong interactions within the QM part or between the QM and
the MM part. Finally, a wavefunction optimization (either directly or via QUENCH BO) and a
normal MOLECULAR DYNAMICS CP or BO can be performed.
11.14.4 Dening internal Gromos array dimensions
One rather new feature of this QM/MM interface code is the ARRAYSIZES ... END AR-
RAYSIZES block in the &QMMM section which allows to change the internal array dimensions
of the Gromos part dynamically. Previously one had to change some include les and recompile
everything to adapt the code for a dierent system.
These settings have to be consistent during a series of calculations, or else you may not be able to
read your restart les correctly.
133
11.14.5 Dening the QM system
For a QM/MM calculation a subset of atoms are selected from the classical restart and then for
this QM part an isolated system (SYMMETRY 0) calculation is performed. The supercell size has
to follow the requirements of the various Poisson solvers, as listed in the hints section (11.4).
If not otherwise specied, the QM system (atoms and wavefunction) is always re-centered in the
given supercell (the current oset of the QM cell is recorded in the le MM CELL TRANS).
The quantum atoms are specied in the &ATOMS section similar to normal CPMD calculations.
Instead of explicite coordinates one has to provide the atom index as given in the Gromos topology
and coordinates les.
11.14.6 List of keywords in the &QMMM section
Mandatory keywords:
COORDINATES
Section: &QMMM
On the next line the name of a Gromos96 format coordinate le has to be given. Note,
that this le must match the corresponding input and topology les. Note, that in
case of hydrogen capping, this le has to be modied to also contain the respective
dummy hydrogen atoms.
INPUT
Section: &QMMM
On the next line the name of a Gromos input le has to be given. A short summary
of the input le syntax and some keywords are in section 11.14.7. Note, that it has
to be a correct input le, even though many options do not apply for QM/MM runs.
TOPOLOGY
Section: &QMMM
On the next line the name of a Gromos topology le has to be given. Regardless of
the force eld, this topology le has to be in Gromos format[50]. Topologies created
with Amber can be converted using the respective conversion tools shipped with the
interface code. A short summary of the topology le syntax and some keywords are
in section 11.14.7.
Other keywords:
ADD HYDROGEN
Section: &QMMM
This keyword is used to add hydrogens to the QM system if a united atom topology is
used (like in Gromos). On the next line the number of atoms to be hydrogenized has
to be given and in the line following that, the corresponding gromos atom numbers. A
number of hydrogens consistent with the hybridization of the hydrogenized carbons
are added.
134
AMBER
Section: &QMMM
An Amber functional form for the classical force eld is used. In this case coordinates
and topology les as obtained by Amber have to be converted in Gromos format just
for input/read consistency. This is done with the tool amber2gromos availabe with
the CPMD/QMMM package.
This keyword is mutually exclusive with the GROMOS keyword (which is used by
default).
ARRAYSIZES ... END ARRAYSIZES
Section: &QMMM
Parameters for the dimensions of various internal arrays can be given in this block.
The syntax is one label and the according dimension per line. The suitable parameters
can be estimated using the script estimate gomos size bundled with the QM/MM-
code distribution. Example:
ARRAYSIZES
MAXATT 20
MAXAA2 17
MXEX14 373
END ARRAYSIZES
BOX TOLERANCE
Section: &QMMM
The value for the box tolerance is read from the next line. In a QM/MM calculation
the size of the QM-box is xed and the QM-atoms must not come to close to the
walls of this box. On top of always recentering the QM-box around the center of the
distribution of the atoms, CPMD prints a warning message to the output when the
distribution extends too much to t into the QM-box properly anymore. This value
may need to be adjusted to the requirements of the Poisson solver used (see section
11.4).
Default value is 8 a.u.
BOX WALLS
Section: &QMMM
The thickness parameter for soft, reecting QM-box walls is read from the next line.
In contrast to the normal procedure of re-centering the QM-box, a soft, reecting
connement potential is applied if atoms come too close to the border of the QM
box [142]. It is highly recommended to also use SUBTRACT COMVEL in com-
bination with this feature. NOTE: to have your QM-box properly centered, it is
best to run a short MD with this feature turned o and then start from the resulting
restart with the soft walls turned on. Since the reecting walls reverse the sign of the
velocities, p
I
p
I
(I = QM atom index), be aware that this options aects the
momentum conservation in your QM subsystem.
This feature is disabled by default
135
CAPPING
Section: &QMMM
Add (dummy) hydrogen atoms to the QM-system to saturate dangling bonds when
cutting between MM- and QM-system. This needs a special pseudopotential entry in
the &ATOMS section (see section 11.14.9 for more details).
CAP HYDROGEN
Section: &QMMM
same as CAPPING.
ELECTROSTATIC COUPLING [LONG RANGE]
Section: &QMMM
The electrostatic interaction of the quantum system with the classical sys-
tem is explicitly kept into account for all classical atoms at a distance
r RCUT NN from any quantum atom and for all the MM atoms at a dis-
tance of RCUT NN < r RCUT MIX and a charge larger than 0.1e
0
(NN
atoms).
MM-atoms with a charge smaller than 0.1e
0
and a distance of RCUT NN <
r RCUT MIX and all MM-atoms with RCUT MIX < r RCUT ESP are
coupled to the QM system by a ESP coupling Hamiltonian (EC atoms).
If the additional LONG RANGE keyword is specied, the interaction of the QM-system
with the rest of the classical atoms is explicitly kept into account via interacting with
a multipole expansion for the QM-system up to quadrupolar order. A le named
MULTIPOLE is produced.
If LONG RANGE is omitted the quantum system is coupled to the classical atoms not
in the NN-area and in the EC-area list via the force-eld charges.
If the keyword ELECTROSTATIC COUPLING is omitted, all classical atoms are coupled
to the quantum system by the force-eld charges (mechanical coupling).
The les INTERACTING.pdb, TRAJECTORY INTERACTING,
MOVIE INTERACTING, TRAJ INT.dcd, and ESP (or some of them) are
created. The list of NN and EC atoms is updated every 100 MD steps. This can be
changed using the keyword UPDATE LIST.
The default values for the cut-os are RCUT NN=RCUT MIX=RCUT ESP=10 a.u..
These values can be changed by the keywords RCUT NN, RCUT MIX, and
RCUT ESP with r
nn
r
mix
r
esp
.
ESPWEIGHT
Section: &QMMM
136
The ESP-charg t weighting parameter is read from the next line.
Default value is 0.1e
0
.
EXCLUSION {GROMOS,LIST}
Section: &QMMM
Specify charge interactions that should be excluded from the QM/MM hamiltonian.
With the additional ag GROMOS, the exclusions from the Gromos topology are
used. With the additional ag LIST an explicite list is read from following lines. The
format of that list has the number of exclusions in the rst line and then the exclusions
listed in pairs of the QM-atom number and the MM-atom in Gromos ordering.
FLEXIBLE WATER [ALL,BONDTYPE]
Section: &QMMM
Convert some solven water molecules into solute molecules and thus using a exible
potential.
With the BONDTYPE ag, the three bond potentials (OH1, OH2, and H1H2) can
be given as index in the BONDTYPE section of the Gromos topology le. Note
that the non-bonded parameters are taken from the SOLVENATOM section of the
TOPOLOGY le. Default is to use the values: 35, 35, 41.
With the additional ag ALL this applies to all solvent water molecules, otherwise on
the next line the number of exible water molecules has to be given with the Gromos
index numbers of their respective Oxygen atoms on the following line(s).
On successful conversion a new, adapted topology le, MM TOPOLOGY, is written
that has to be used with the TOPOLOGY keyword for subsequent restarts. Also
the INPUT le has to be adapted: in the SYSTEM section the number of solvent
molecules has to be reduced by the number of converted molecules, and in the SUB-
MOLECULES section the new solute atoms have to be added accordingly.
Example:
FLEXIBLE WATER BONDTYPE
4 4 5
26
32 101 188 284 308 359 407 476 506 680
764 779 926 1082 1175 1247 1337 1355 1607 1943
1958 1985 2066 2111 2153 2273
FORCEMATCH ... END FORCEMATCH
Section: &QMMM
137
Input block for the QM/MM forcematching. A general description is given in section
11.14.11.
READ REF FORCES [FILE,COVALENT]
Flag to read the QM/MM reference forces directly from the le FM REF FORCES,
i.e. no QM/MM SPs are computed. Default: false. An alternative le name can
be specied on the next line with the option FILE. With the option COVALENT
covalent forces are read from the le FM REF COVFORCES.
READ REF TRAJ [FILE]
Read reference trajectory from le TRAJECTORY REF (or set the FILE option to
read a non-default le name from the next line) with a given stride and compute
single points on the respective frames.
RESTART SP
If in a previous force matching run not all of the SPs could be computed (e.g. limited
wall time) this ag indicates cpmd to restart the SP calculations. The FM REF*
les from the previous run have to be present and they will be appended. With this
option make sure that the frames contained in the already existing FM REF* les
are consistent. Default: false.
READ REF STRIDE
Stride to apply when reading the TRAJECTORY REF le is read from the next line.
Default=1, i.e. every frame is used for the SP calculations.
TOPOL OUT
Filename for the nal topology le. Default: FMATCH.top.
INITWF [OFF]
Generate an initial guess for the wfkt for the SP calculations based on AOs (default).
With the OFF option the wfkt of the previous frame is used as an intial guess.
CHARGES [ONLY,NO],[FIX]
Charge tting is on by default and can be switched o with the NO option. In this
case the charges from the initial topology will not be modied. ONLY will let the
program stop after the charge tting and the other parameters are not updated.
With the FIX option target values for the restraints in the charge tting on specic
atoms can be specied by the user. Usually the charges are restraint to the respective
Hirschfeld values. On the next line the number of charges to be xed has to be given
and then the corresponding number of lines with: gromos index charge.
MV
Weight on the potential in the charge tting. Default=0.1.
WF
Weight on the eld in the charge tting. Default=0.0.
WQ INDIVIDUAL
Weights on the charge restraints can be given individually here. From the next line
the total number of individual weights is read. Then the lines with: gromos index
weight.
WQ GENERAL
The weight for all the charge restraints that were not specied by individual weights
can be given on the next line. Default=0.1.
WTOT
Weight of the total charge contribution in the charge tting. Default=1.0E7.
138
EQUIV
Specify equivalent atoms. Syntax:
EQUIV
n equiv
atom1 atom4
atom1 atom3
...
atom5 atom7
There are n equiv equivalencies specied (n equiv lines are read from the input).
For each pair of equivalencies the gromos indexes have to be specied on one separate
line. The lower index has to be given rst!
If an atom is equivalent to more then one other atom. E.g. atom1,atom3 and atom4
are equivalent. Then this has to be encoded by:
atom1 atom3
atom1 atom4
and not by:
atom1 atom4
atom3 atom4
where atom1 has a lower gromos index then atom3 and atom3 has a lower one then
atom4. Per default no equivalencies are assumed.
OPT FC ONLY
Serves as a ag to remove the equilibrium values of the bonded interactions from
the list of tted parameters. I. e. only force constants are tted for the bonded
interactions.
NO BONDS
Do not t bonds. Default=false.
NO ANGLES
Do not t angles. Default=false.
NO DIHEDRALS
Do not t dihedrals. Default=false.
NO IMPROPERS
Do not t improper dihedrals. Default=false.
MAXITER
Give on the next line the maximal number of iterations for the non-linear tting
procedure of the bonded interactions. Default=500.
COMPUTE RMS [NO]
Per default the RMS on the forces is computed after the tting has been completed.
Switch it o with the NO option. Example:
FORCEMATCH
READ REF TRAJ FILE
TRAJECTORY_REF
READ REF STRIDE
10
WV
1.0
WOT
1000000.0
WQ GENERAL
139
0.1
END FORCEMATCH
GROMOS
Section: &QMMM
A Gromos functional form for the classical force eld is used (this is the default).
This keyword is mutually exclusive with the AMBER keyword.
HIRSHFELD [ON,OFF]
Section: &QMMM
With this option, restraints to Hirshfeld charges [83] can be turned on or o
Default value is ON.
MAXNN
Section: &QMMM
Then maximum number of NN atoms, i.e. the number of atoms coupled to the QM
system via ELECTROSTATIC COUPLING is read from the next line. (Note:
This keyword was renamed from MAXNAT in older versions of the QM/MM interface
code to avoid confusion with the MAXNAT keyword in the ARRAYSIZES ... END
ARRAYSIZES block.)
Default value is 5000.
NOSPLIT
Section: &QMMM
If the program is run on more than one node, the MM forces calculation is performed
on all nodes. Since the MM part is not parallelized, this is mostly useful for systems
with a small MM-part and for runs using only very few nodes. Usually the QM part
of the calculation needs the bulk of the cpu-time in the QM/MM.
This setting is the default. See also under SPLIT.
RCUT NN
Section: &QMMM
The cuto distance for atoms in the nearest neighbor region from the QM-system
(r r
nn
) is read from the next line. (see ELECTROSTATIC COUPLING for
more details).
Default value is 10 a.u.
140
RCUT MIX
Section: &QMMM
The cuto distance for atoms in the intermediate region (r
nn
< r r
mix
) is read
from the next line. (see ELECTROSTATIC COUPLING for more details).
Default value is 10 a.u.
RCUT ESP
Section: &QMMM
The cuto distance for atoms in the ESP-area (r
mix
< r r
esp
) is read from the next
line. (see ELECTROSTATIC COUPLING for more details).
Default value is 10 a.u.
RESTART TRAJECTORY [FRAME {num},FILE {fname},REVERSE]
Section: &QMMM
Restart the MD with coordinates and velocities from a previous run. With the addi-
tional ag FRAME followed by the frame number the trajectory frame can be selected.
With the ag FILE followed by the name of the trajectory le, the lename can be set
(Default is TRAJECTORY). Finally the ag REVERSE will reverse the sign of the
velocities, so the system will move backwards from the selected point in the trajecory.
SAMPLE INTERACTING [OFF,DCD]
Section: &QMMM
The sampling rate for writing a trajectory of the interacting subsystem is read from the
next line. With the additional keyword OFF or a sampling rate of 0, those trajectories
are not written. The coordinates of the atoms atoms contained in the le INTERACT-
ING.pdb are written, in the same order, on the le TRAJECTORY INTERACTING
every. If the MOVIE output is turned on, a le MOVIE INTERACTING is written
as well. With the additional keyword DCD the le TRAJ INT.dcd is also written to.
if the sampling rate is negative, then only the TRAJ INT.dcd is written.
Default value is 5 for MD calculations and OFF for others.
SPLIT
Section: &QMMM
If the program is run on more than one node, the MM forces calculation is performed
on a separate node. This is mostly useful for systems with a large MM-part and runs
with many nodes where the accumulated time used for the classical part has a larger
impact on the performace than losing one node for the (in total) much more time
consuming QM-part.
Default is NOSPLIT.
141
TIMINGS
Section: &QMMM
Display timing information about the various parts of the QM/MM interface code in
the output le. Also a le TIMINGS with even more details is written. This option is
o by default.
UPDATE LIST
Section: &QMMM
On the next line the number of MD steps between updates of the various lists of
atoms for ELECTROSTATIC COUPLING is given. At every list update a le
INTERACTING NEW.pdb is created (and overwritten).
Default value is 100.
VERBOSE
Section: &QMMM
The progress of the QM/MM simulation is reported more verbosely in the output.
This option is o by default.
WRITE LOCALTEMP [STEP {n lt}]
Section: &QMMM
The Temperatures of the QM subsystem, the MM solute (without the QM atoms) and
the solvent (if present) are calculated separately and writen to the standard output
and a le QM TEMP. The le has 5 columns containing the QM temperature, the MM
temperature, the solvent temperature (or 0.0 if the solvent is part of the solute), and
the total temperature in that order. With the optional parameters STEP followed by
an integer, this is done only every nfi lt timesteps.
11.14.7 Keywords in the Gromos Input and Topology les
For a detailed description of the Gromos le formats please have a look at the Gromos
documentation[50]. Note, that not all keyword are actually active in QM/MM simulations, but
the les still have to be syntactically correct. Both, the input and the topology le are structured
in sections starting with a keyword in the rst column and ending with the keyword END. Lines
starting with a pound sign # may contain comments and are ignored. Both les are required to
have a TITLE section as the rst section. The rest can be in almost any order. Here is a short list
of some important ags and their meaning.
Gromos Input File:
TITLE
Text that identies this input le. Will be copied into the CPMD output.
SYSTEM
This section contains two integer numbers. The rst is the number of (identical) solute
molecules (NPM) and the second the number of (identical) solvent molecules (NSM).
142
BOUNDARY
This section denes the classical simulation cell. It contains 6 numbers. The rst
(NTB) denes the type of boundary conditions ( NTB < 0 means truncated octahedron
boundary conditions, NTB=0 vacuum, and NTB > 0 rectangular boundary conditions).
The next three numbers (BOX(1..3)) dene the size of the classical cell. The fth number
(BETA) is the angle between the x- and z-axes and the last number usually determines
whether the cell dimensions are taken from the input le (NRDBOX=0) or from the
BOX section of the COORDINATES le (NRDBOX=1), but is ignored for QM/MM
simulations.
Note: that even for vacuum simulations valid simulation cell sizes must be provided.
PRINT
This section determines how often some properties are monitored. Here only the rst
number (NTPR) matters, as it determines the number of MD steps between printing
the various energies to the CPMD output.
Note many old Gromos input les created by the amber2gromos program default to
NTPR=1, which makes the CPMD output huge.
SUBMOLECULES
Denes number of submolecules in the solute. The rst number is the number of sub-
molecules followed by the index number of the last atom of each submolecule. The last
number must be identical to the number of atoms in the solute.
FORCE
Contains two groups of numbers, that controls the various force component and the
partitioning of the resulting energies. The rst group of 1/0 ags turn the various force
components on or o. The second group denes energy groups (the rst number is the
number of groups followed by the index number of the last atom in each group). The
last number must be identical to the number of all atoms.
Gromos Topology File:
TITLE
Text that identies this topology le. Will be copied into the CPMD output.
ATOMTYPENAME
This section contains the number of classical atom types (NRATT) followed by the re-
spective labels, one per line. Note that the ARRAYSIZES ... END ARRAYSIZES
MAXATT must be large enough to accomodate all dened atom types.
RESNAME
This section contains the number of residues in the solute (NRAA2) followed by the
respective residue names.
SOLUTEATOM
This section denes the number (NRP) and sequence of atoms in the solute, their
names, residue numbers, non-nonded interaction codes, masses, charges, charge groups
and their full + scaled 1-4 exclusions.
BONDTYPE
This section contains the list of parameters for bonded interactions. You have to pick
the two matching entries from this list for the O-H and H-H potential, when using the
the FLEXIBLE WATER keyword to convert solvent water back into solute (e.g. to
included them into the QM part).
SOLVENTATOM
This section denes the number of atoms (NRAM) in the solvent and their respective
names, non-bonded interactions types, masses, and charges.
143
SOLVENCONTSTR
This section denes the number (NCONS) and parameters for the distance constraints,
that are used to keep the solvent rigid.
11.14.8 Files generated by the interface code
QMMM ORDER
The rst line species the total number of atoms (NAT) and the number of quantum atoms
(NATQ). The subsequent NAT lines contain, for every atom, the gromos atom number, the
internal CPMD atom number, the CP species number isp and the number in the list of atoms
for this species NA(isp). The quantum atoms are specied in the rst NATQ lines.
CRD INI.grm
Contains the positions of all atoms in the rst frame of the simulation in Gromos extended
format.
CRD FIN.grm
Contains the positions of all atoms in the last frame of the simulation in Gromos extended
format.
INTERACTING.pdb
Contains (in pdb format) all the QM atoms and all the MM atoms in the electrostatic
coupling NN list. The 5-th column in this le species the gromos atom number as dened
in the topology le and in the coordinates le. The 10-th column species the CPMD atom
number as in the TRAJECTORY le. The quantum atoms are labelled by the residue name
QUA.
INTERACTING NEW.pdb
The same as INTERACTING.pdb, but it is created if the le INTERACTING.pdb is detected
in the current working directory of the CPMD run.
TRAJECTORY INTERACTING
Contains the coordinates and the velocities (in TRAJECTORY format) of the atoms listed
in INTERACTING.pdb. The format is the same as in the les TRAJECTORY and MOVIE,
hence frames belonging to dierent runs are separated by the line NEW DATA .
The atoms in this le do not necessarely coincide with the NN atoms, that are written at
every update of the pair list in the le INTERACTING NEW.pdb.
MOVIE INTERACTING
The MOVIE-like le corresponding to TRAJECTORY INTERACTING.
ESP
Containes the ESP charges of the QM atoms in CPMD order (the corresponding Gromos
numbers can be found in QMMM ORDER). The rst column is the frame number.
EL ENERGY
Contains the electrostatic interaction energy. First column: frame number. Second column:
total electrostatic interaction energy. Other columns: interaction energy of the NN atoms
with the QM system; interaction energy with the ESP coupled atoms; multipolar interaction
energy; electrostatic interacion energy evaluated using the classical force eld charges for the
QM atoms.
MULTIPOLE
Contains, for every frame (specied in the rst column), the three components of the dipol
D(ix) and the ve independent components of the quadrupole Q(ix,jx) of the quantum system
in a.u. The order is: D(1),D(2),D(3),Q(1,1),Q(2,2),Q(1,2),Q(1,3),Q(2,3).
144
MM CELL TRANS
Contains, the Trajectory of the re-centering oset for the QM-box. The rst column ist the
frame number (NFI) followed by the x-, y-, and z-component of the cell-shift vector.
11.14.9 Hydrogen Capping vs. Link Atoms
Whenever the QM/MM-boundary cuts through an existing bond, special care has to be taken
to make sure that the electronic structure of the QM-subsystem is a good representation of an
all-QM calculation and also the structure in the boundary region is preserved. So far, two methods
methods are available to do this: using special link-atom pseudopotentials and hydrogen capping.
Link Atom
The simplest way is to use a link-atom pseudopotential. In the simplest case, this would be a
scaled down pseudopotential with the required valence change (e.g. ZV=1 when cutting through a
single carbon-carbon bond). However in this case it is required to constrain the distance between
the link atom and the (full-QM) neighbor atom to the (full-QM) equilibrium distance, to preserve
the electronic structure in the center of the QM subsystem. You should be aware of the fact, that
this is a rather crude approximation and that the contraint will create a small imbalance in the
forces between the QM and MM subsystems, that can result in a drift in the total energy, if the
length of the contraint is badly chosen.
A more rigorous approach would be to use an optimized pseudopotential constructed with the
method described in ref. [55], that should take care of the need for the constraint.
Hydrogen Capping
An alternative way would be to use the CAPPING ag in order to introduce additional (dummy)
hydrogen atoms to saturate the dangling bonds. These capping hydrogen atoms have to be hidden
from the MM hamiltonian so the Gromos INPUT and TOPOLOGY les have to be modied
for subsequent runs, in addition to adding an explicit EXCLUSION LIST to the cpmd input.
The whole procedure is a bit complicated so here is a short protocol of the required steps.
1a Set up a normal QM/MM run as for using link atoms with the additional keyword CAP-
PING and instead of the link-atom potential use a hydrogen potential with the additional
ag ADD H. Note that you have to provide the correct number of hydrogens, but no atom
index number.
1b Run a short MD (a couple of steps) and use the resulting CRD FIN.grm le (under a dierent
name) in the COORDINATES section.
2a Modify the Gromos input le to match the new coordinate le.
Increase the number of atoms per solute molecule in the SUBMOLECULES section.
increase the total number of atoms in the FORCE section.
2b Modify the Gromos topology le to match the new coordinate le.
Add a DUM atom type at the end of the ATOMTYPENAME section if not already
present (and increase NRATT accordingly).
if you have added a new atom type, you have to add the corresponding entries in the
LJPARAMETERS section as well. Since the capping hydrogen atoms should be invisible
from the MM hamiltonian all Lennard-Jones parameters are set to 0.0 for those new
entries. This section is a triangular matrix, so you have to add NRATT lines (and
increase NRATT2 accordingly).
Add new residues named DUM (one for each capping hydrogen) to the RESNAME
section (and increase NRAA2).
In the SOLUTEATOM section you have to increase NRP and add the
dummy hydrogens at the end of the solute. The structure of the entry is:
<atom nr> <residue nr> <atom type name> <vdw type index> <mass> <charge> 1 0
and a single 0 on the next line. Use a mass of 1.008 and a charge of 0.000.
145
2c Modify the CPMD input le.
Make sure that the TOPOLOGY, INPUT, and COORDINATES keywords in the
&QMMM section match the newly created or modied les.
Add the capping hydrogens to the &ATOMS section as normal QM atoms, but add the
DUMMY ag to the pseudopotential line.
Build an EXCLUSION LIST entry that lists for each capping atom the respective
QM/MM atoms pairs that should be excluded from the electrostatic coupling (all other
MM interactions are set to zero already in the topology le). For consistency only full
charge groups should be excluded. In the supplementary material should be a script
genexcl.tcl which can help you in building that list (it needs the modied Gromos
coordinate and topology le as well as the QMMM ORDER le as input).
Update the ARRAYSIZES ... END ARRAYSIZES entry to match the new topol-
ogy.
With the three modied les you should be able to run a regular QM/MM run. Note, that you
may have to update the exclusion list occasionally, depending on your system and that you should
pick the bond(s) to cut very carefully.
11.14.10 What type of QM/MM calculations are available?
The QM/MM interface only supports a subset of the functionality of CPMD. Please note, that
although there are some tests and warnings included into the source code, not every job that runs
without a warning will be automatically correct. So far, the interface code requires the use of
norm-conserving pseudopotentials. Tested and supported job types are: MOLECULAR DY-
NAMICS (CLASSICAL, CP and BO), OPTIMIZE WAVEFUNCTION, KOHN-SHAM
ENERGIES, and ELECTRONIC SPECTRA. Supported are closed shell systems as well as
LSD and LOW SPIN EXCITATION calculations.
OPTIMIZE GEOMETRY is experimental and currently supports optimization of the QM atom
positions only. Use of the linear scaling geometry optimizer (LBFGS) is highly recommended and
the currently also the default.
PROPERTIES calculations with QM/MM are experimental. Most properties (WF projection,
population analysis, localization) that only need the plain QM wavefunction work.
LINEAR RESPONSE calculations are currently at an twofold experimental status. Both, the
isolated system setup (SYMMETRY 0) and the QM/MM coupling of the response calculations
itself are not yet fully tested.
Options that are known to be incompatible with QMMM are VIBRATIONAL ANALYSIS,
PATH INTEGRAL, and all calculations that require a wavefunction optimization via a diago-
nalization method at some point.
11.14.11 QM/MM Force Matching
This tool allows the automated (re)parametrization of classical force elds from QM/MM reference
calculations via a force matching protocol as published in [152]. Thereby only MM parameters
among the atoms comprised in the QM subsystem are reparametrized. In this rst release VdW
parameters are excluded from the optimization and kept constant. Fitting of these parameters will
be a feature of a future release.
The jobs requires a QM/MM reference TRAJECTORY le and the corresponding gromos topology,
input and coordinate les and the cpmd input that were used to generate the reference TRAJEC-
TORY le. The initial topology can be a reasonable guess and will be rened during the actual
force matching procedure. Currently the QM/MM reference trajectory has to be generated prior
to the force matching job.
The actual forcematching job is envoked by the FORCEMATCH in &CPMD and the FORCE-
MATCH ... END FORCEMATCH block in &QMMM. Besides, the &CPMD and &QMMM
sections should contain sensible keywords and parameters for high quality reference forces (e.g.
146
convergence orbitals 1.0d-7).
The parametrization protocol consists of a three-step process: First, the reference trajectory is read
with a given stride. On each of the selected frames QM/MM reference forces (BO) are calculated.
The forces on the atoms of the QM subsystem are stored (FM REF FORCES) along with the
Hirschfeld charges (FM REF CHJ) as well as the electrostatic potential and eld on the nearby
MM atoms (FM REF PIP). Second, a set of atomic point charges that reproduce the electrostatic
potential and forces that the QM system exerts on the surrounding classical atoms is derived.
Third, the nonbonded contributions, computed with the charges obtained in the second step and
given Lennard-Jones parameters, are subtracted from the total reference forces on the QM atoms.
The remaining forces are assumed to be derived from bonded interactions. The parameters for
bonded interactions (torsions, bending and bonds) are thus adjusted in order to reproduce the
remaining forces. See reference [152] for details. An updated topology le FMATCH.top is written
at the end of the run. To check the quality of the tting procedure a section with the absolute and
relative force RMS per atom is printed at the end to standard output.
Files generated by the force matching code (Some of the following default lenames can be changed
via the respective keywords in the FORCEMATCH block):
FMATCH.top
Updated topology le at the end of the job.
FM REF CHJ
Hirschfeld charges on the QM atoms from the reference force calculations. Format: Two lines
per frame. First line contains frame index from the original reference trajectory le. Second
line gives the Hirschfeld charges on the QM atoms in cpmd ordering.
FM REF PIP
Electrostatic potential and eld on the NN atoms from the reference force calculations.
FM REF FORCES
For each frame extracted from the reference TRAJECTORY le and for which QM/MM
forces were calculated, the QM/MM forces on the QM atoms are dumped into this le. One
line per frame with the original frame index and the number of QM atoms. Then for each
QM atom in cpmd ordering:
atom index,x,y,z,fx,fy,fz
All force matching related information written to standard output are labeled with fm . After
the initialization the reference trajectory le is parsed and the line fm extracting total number
of frames for SPs is printed. For each frame you should nd the following lines: frame number,
computing reference forces and Total nr. of iterations:. The beginning of the second part of
the force matching protocol is marked with the line Reading values for charge tting from le.
At the end the RMS deviation of the charges, electrostatic potential and eld are printed. The
third part starts with Will now loop over reference frames again to compute the non-bonded
interactions. After Done with classical loop the covalent parameters are tted and you can
monitor the change of the absolute and relative RMS deviation from the reference covalent forces
during the optimization. Optimization successful indicates the end of the tting of the covalent
parameters, FMATCH.top is written and, nally, the total (non-bonded plus covalent) forces are
calculated with the updated topology to get the RMS deviation of the total force. The force
matching related output ends with a block containing computing RMS per atom.
11.15 Gromacs/CPMD QM/MM Calculations
As of version 3.3 the Gromacs[116] classical MD code contains a generic API for QM/MM calcula-
tions. So far this API has been used to QM/MM interfaces for GAMESS, Gaussian, and . . . CPMD.
Unlike in the Gromos/CPMD QM/MM interface code (see above) the main MD driver is in the
classical code. The Gromacs/CPMD interface code is based on the EGO/CPMD interface and was
developed by Pradip Kumar Biswas in the group of Valentin Gogonea at Cleveland State University.
147
For additional information and downloads see http://comppsi.csuohio.edu/groups/qmmm.html,
and the respective publication [32].
11.15.1 Technical Introduction
The whole interface code is divided into two parts: one part is embedded in the Gromacs code and
the other in CPMD. Both, the modied Gromacs and the CPMD codes are compiled independently
and communicate via les in the current working directory.
Since the Gromacs code acts as the driver, you rst have to set up a regular Gromacs classical MD
simulation in the usual way by building/providing a .pdf/.gro le and a .top le. Before running
grompp, you also need to create an index le (usually named index.ndx) that lists the atoms of
the QM subsystem and provide further parameters for the CPMD calculation like the size of QM-
simulation box, plane-wave cuto for CPMD, Coulomb cuto, if any, etc (for details, see the rgmx
script in the QM/MM examples).
During mdrun, the interface is controlled by two function calls:
a) init cpmd() prepares the ground for the QM/MM interface. It sets the ags for the QM and
MM atoms nds LINK atoms from the topology and prepares temporary structures to process
the QM/MM data etc.
b) call cpmd() rst creates the CPMD input le CPMD inp.run using a template
CPMD inp.tmpl and then kickstarts the CPMD code via a fork/exec or system call.
The interface is set to use fork. If system call is preferred, you need to set the dened variable
NOFORK to 1. call cpmd() gets forces and energy from CPMD and appends them to Gromacs
structures. Gromacs then moves the atoms and while evaluating the forces, calls CPMD again
(this is the QM/MM loop). Thus this interface essentially performs a QM/MM Born-Oppenheimer
MD simulation.
11.15.2 Compilation of Gromacs
In its present state, you need to use CFLAGS = -DGMX QMMM CPMD in congure to include
the CPMD interface code into Gromacs. In the adapted Gromacs package, a script build is
provided in the gromacs folder that takes care of the QM/MM conguration and compilation.
Please adapt as needed.
11.15.3 Execution of QM/MM runs
It is like running Gromacs with the additional needs are given by:
a) having an index.ndx le specifying the QM atoms (see example index.ndx le). You can create
a usual Gromacs index.ndx le and then append to it the QM group.
b) specifying other QM informations like planewave cuto, qmbox size etc in the grompp setup
(for the mdp le).
c) having a CPMD input le template CPMD inp.tmpl where essential keywords for CPMD run
need to be mentioned. INTERFACE GMX is essential for QMMM; it ensures a single-point
calculation inside CPMD each time it is invoked. Inside the interface, all the QM & MM atoms are
translated in such a way that the QM system be at the center of the QM box. Thus the keyword
MOLECULE CENTER OFF is required to avoid any further movements of the QM atoms.
Right now the ODIIS minimizer and PCG minimizer (including PCG MINIMIZE) are allowed
to be used inside CPMD. There also is a hybrid scheme where for the MD rst step it will use the
PCG MINIMIZE but for all subsequent steps it will use the faster ODIIS minimizer.). Other
sections of CPMD input structures need to be kept as usual though the nal values for the CELL
size and CUTOFF will be those provided by you in the mdp le.
11.15.4 QM/MM Examples
Example inputs for a H
2
O-dimer and an ethane molecule are bundled with the modied gromacs
distribution from.
148
http://comppsi.csuohio.edu/groups/qmmm.html,
11.16 CPMD on parallel computers
There are three dierent parallel strategies implemented in CPMD. The actual strategy has to be
chosen at compile time.
Shared memory parallelization
This strategy uses the OpenMP library. The code is compiled without the PARALLEL
preprocessor ag and compilation and linking need the corresponding OpenMP ags (depen-
dent on compiler).
Depending on the overhead of the OpenMP system implementation good speedups can be
achieved for small numbers of processors (typically 4 to 8). The advantages of this version
of the code are small additional memory usage and it can be used in non-dedicated CPU
environments.
Distributed memory parallelization
This is the standard parallelization scheme used in CPMD based on MPI message passing
library.
The single processor version of this code typically shows an overhead of ca. 10% with respect
to the optimal serial code. This overhead is due to additional copy and sort operations during
the FFTs.
All the basic system data and many matrices of the size of the number of electrons are repli-
cated on all processors. This leads to considerable additional memory usage (calculated as
the sum over the memory of all processors compared to the memory needed on a single pro-
cessor). For large systems distributed over many processors the replicated data can dominate
the memory usage.
The eciency of the parallelization depends on the calculated system (e.g. cuto and number
of electrons) and the hardware platform, mostly latency and bandwidth of the communication
system. The most important bottleneck in the distributed memory parallelization of CPMD
is the load-balancing problem in the FFT. The real space grids are distributed over the rst
dimension alone (see line REAL SPACE MESH: in the output. As the mesh sizes only vary
between 20 (very small systems, low cutos) and 300 (large systems, high cuto) we have a
rather coarse grain parallelisation. To avoid load inbalance the number of processors should
be a divisor of the mesh size. It is therefore clear that even for large systems no speedup
can be achieved beyond 300 processors. A partial solution to this problem is provided with
the keyword TASKGROUPS. This technique, together with optimal mapping, allow to
scale to thousands of processors on modern supercomputers such as IBM BG/L. To learn
more about the distributed memory parallelization of CPMD consult D. Marx and J. Hutter,
Modern Methods and Algorithms of Quantum Chemistry, Forschungszentrum J ulich, NIC
Series, Vol. 1 (2000), 301-449. For recent developments and for a perspective see [33].
When selecting NSTBLK for BLOCKSIZE STATES it is important to take into account
the granularity of the problem at hand. For example, in cases where the number of STATES
is smaller than the total number of the available processors, one must choose a value for
NSTBLK such that only a subgroup of the processors participate in the distributed linear
algbera calculations. The same argument is also relevant when the number of STATES is
only moderately larger than the number of processors.
Mixed shared/distributed memory parallelization
The two parallelization schemes described above are implemented in such a way that they
dont interfere. Therefore it is easy to combine them if this is supported by hardware
(shared/distributed memory architecture) and software (libraries). Since the MPI paral-
lization is very ecient for a small to medium number of nodes and all modern MPI li-
braries are able to take advantage from shared memory communication, using the mixed
149
shared/distributed memory parallelization is of most use if you run a job on a large number
of SMP nodes, when the distributed memory parallelization has reached its scalability limit
(see above). To learn more about the mixed parallelization scheme of CPMD consult [34].
As with all general statements, these are only guidelines. The only way to get reliable information
is to run benchmarks with the system you want to calculate.
150
12 Questions and Answers
The following section is a slightly edited collection of questions and answers from the cpmd mailing
list, [email protected].
12.1 How to Report Problems
Up front a few remarks on how to report problems (and how to respond), so that the chances to
solve the problem (permanently) are as high as possible.
If you have compilation problems, please always state what version of CPMD you are trying to
compile and what kind of machine you are using, i.e. what operating system, what compiler
(particularly important on linux machines), which compilation ags, and what libraries you are
using. Best you include the rst part of your makele (up to End of Personal Conguration,
please dont post the whole makele) as this contains most of the required information. Also
include the relevant part of the make output (again, the full output usually is very long and
rarely needed).
If you have problems with a specic calculation, please include your input and the output of the
run, so that others can try to reproduce the error. Again, please state the version of CPMD you
are using and the platform you are running on.
A good general guide on how to report bugs can be found at:
http://freshmeat.net/articles/view/149/,
the corresponding guide for people responding can be found at:
http://freshmeat.net/articles/view/1082/.
Another useful article about how to ask questions the smart way is at:
http://www.catb.org/esr/faqs/smart-questions.html
12.2 Explanation of Warnings and Error Messages
Q: Could anybody tell me the follwing error in the cpmd output during CP Molecular Dynamics
runs with the ag WANNIER WFNOUT LIST DENSITY?
WANNIER CODE WARNING: GRADIENT FOR RESTA FUNCTIONAL IS GMAX=0.118E-02
Does it mean any serious error in the calculation?
A: The default spreadfunctional used in CPMD is the Vanderbilt type. At the end of the calculation
the convergence with respect to the Resta type functional is also checked. For large cells both should
be converged at the same time. However, for typical application this is not the case and you get
the warning. This is not serious and you can ignore it.
Q: A warning message appeared in the output le:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
?WARNING! XC FUNCTIONALS INCONSISTENT FOR h.pp
?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Does it mean that my pseudopotential le is wrong? I used fhi98PP to create this pp le, and just
recast it. So if it is wrong, what more should I do to the output le of fhi98PP?
A: It means that the XC functional used to generate the pseudo potential and the functional
which you want to use in CPMD are not the same; it could be more or less serious: Some of the
XC functionals in CPMD are just minor variations of each others, e.g. the LDA part is evaluated
using Perdew-Wang92, Perdew-Zunger7? or the Pade-interpolation formula. If this is the case,
the resulting error is usually small, however if your pseudos were generated e.g. with PBE and you
try to use BLYP, the error might become serious. I suggest you to see what are the two functionals
(pp & CPMD-input), and look if the dierence is signicant or not.
151
Q: When I am running a GEOMETRY OPTIMIZATION using the keywords LSD and MULTI-
PLICITY, I get the following output:
================================================================
= GEOMETRY OPTIMIZATION =
================================================================
NFI GEMAX CNORM ETOT DETOT TCPU
EWALD SUM IN REAL SPACE OVER 1* 1* 1 CELLS
STOPGM! STACK OF MAIN CALLS:
STOPGM! CALL FORCEDR
STOPGM! CALL FORCES
STOPGM! CALL VOFRHOB
STOPGM! CALL GCLSD
PROGRAM STOPS IN SUBROUTINE LSD_GGAX| NOT PROGRAMMED
I would like to know how to solve this problem?
A: This simply means that the LSD version of this specic functional has not been implemented
(yet). Feel free to implement it yourself and submit a patch.
Possible solutions are:
1. you implement it into CPMD (see le lsd func.F)
2. you switch to the PBE functional, which is the modern variant of this functional and is
implemented both for spin-restricted and unrestricted cases.
Q: I am trying to optimize a crystal structure (both ion positions and cell volume) using CPMD
and get the warning message:
Warning! Spline region smaller than maximum G-value.
The optimization seems to converge nicely but what does this warning mean/imply?
A: This in fact touches several points. The following applies also to other variable cell calculations
with CPMD (e.g. constant pressure simulations).
Pseudopotential functions in CPMD are calculated on a radial grid in G-space and then
used in spline interpolations. This speeds up variable cell calculations considerably. The
maximum grid point is given by the cuto. With the keyword
SPLINE RANGE
x.xx
you can enlarge the grid to x.xx times the cuto. Also, you should make sure, that the
number of spline points is large enough. Older version of CPMD defaulted to as little as 501.
This is at the lower limit for accuracy with a xed cell. Especially if you have high cutos it
is better to increase this value, e.g.
SPLINE POINTS
2500
or larger. The current default (5000) should be large enough.
In a variable cell calculation, CPMD uses a constant number of plane waves. Therefore if
your cell contracts the cuto increases, if the cell gets larger the cuto decreases. So if you
have the rst case the spline interpolation needs points above the original cuto and you
get a warning. Depending on the amount of change in the cell you expect a value for the
SPLINE RANGE of 25 is needed.
152
Coming back to the constant number of plane waves. If your cell gets larger the eective
cuto decreases. This may have very undesirable eects and it is better to dene the plane
waves on a box larger than any box you anticipate the simulation will reach. In order to not
have to start with an unreasonable cell you can dene the plane waves not with the actual
box but with a reference cell, use the keyword
REFERENCE CELL
a b c xa xb xc
However, you really want to do a constant cuto calculation, not a constant number of plane
waves. For technical reasons this is not possible and in principle you should do the calculation
at a high enough cuto in order that the calculation is converged all along the simulation
path (with the slight changes in cuto).
To avoid these very high cutos the group in Trieste came up with a method that allows to
perform pseudo constant cuto calculations. This method is implemented in CPMD (keyword
CONSTANT CUTOFF) and explained in the paper [107]
Q: I was optimizing wavefunctions for my system. After a successful run I modied CELL
VECTORS. This latter calculation crashed with the following error either when I restarted (only
wavefunctions) or if I started from scratch.
GORDER| PROGRAMING ERROR. INFORM THE PROGRAMER
PROGRAM STOPS IN SUBROUTINE GORDER| ERROR IN G-VEC ORDERING (NHG) [PROC= 0]
Is there something wrong with the code?
A: This is a known problem in CPMD. The message comes from a test, which probes whether
the G vectors are in a safe order, namely such that after a restart with a dierent number of
processes or on a dierent machine the results agree. Usually this error only occurs in large systems
with a high cut-o energy and/or large unit cells, i. e. where one gets lots of close-lying G vectors.
There are two possible workarounds:
1. Slightly change your computational box in one dimension e. g. from 10.000000 to 10.000001.
This helps some times.
2. The check is not 100 % accurate. This means by just ignoring the message you will most
likely get correct results. The error would only appear in restarts where you could see a small
inconsistency in energy in the rst step. Final results should not be aected (except for MD
if you do restarts).
To avoid the stop, comment out the two lines at the end of le lodapa.F of the form
CALL STOPGM(GORDER,ERROR IN G-VEC ORDERING (NHG))
However, be sure to check that the results are reasonable.
12.3 Pseudopotentials
Q: Im confused about how to select a pseudopotential type (Troullier-Martins, Goedecker, etc.).
What makes one choose say a Goedecker potential instead of a Vanderbilt potential?
A: The choice of a pseudopotential in CPMD calculations depends on needs, available resources
and taste.
Troullier-Martins norm-conserving pseudopotentials are probably the most-commonly used type
of pseudopotentials in CPMD calculations. They work very well for non-problematic elements and
they are quite easy to create (note, that it is also easy to create a bad pseudopotential). When
153
using the Kleinman-Bylander separation, one also has to be careful to avoid so called ghost states
(e.g. many transition metals need LOC=l with l being an angular momentum smaller than default
value which is highest).
Goedecker pseudopotentials are stored in an analytical form, that ensures the separability, but
they usually need a higher (sometimes much higher) plane wave cuto than the corresponding
Troullier-Martins counterparts. Also the creation procedure is more complicated, but there is a
very large library of tested pseudopotentials (mostly LDA but also some GGA pseudopotentials).
Vanderbilt pseudopotentials have the advantage of needing a much reduced plane wave cuto. The
drawback is, that only a limited subset of the functionality in CPMD is actually implemented with
uspps (MD, wavefunction/geometry optimization and related stu and only at the gamma point
and you have to make sure, that your real space grid is tight enough). Also due to sacricing norm-
conservation for softer pseudopotentials, your wavefunction has very limited meaning, so that not
all features available for norm-conserving pseudopotentials can actually be easily implemented or
implemented at all.
For some elements it can be rather dicult to generate good (i.e. transferable) pseudopotentials,
so you should always check out the available literature.
Q: How do I choose the correct value of LMAX?
A: If you use a Vanderbilt or Goedecker type potential only the format of the LMAX-line has to
be valid. The actual value is read from the pseudopotential le and the value in the input le will
be ignored. It is highly recommended to still use values that make sense, in case you want to do a
quick test with a numerical (Troullier-Martins) pseudopotential.
Generally, the highest possible value of LMAX depends on the highest angular momentum for
which a channel was created in the pseudopotential. In the pseudopotential le you can see this
from the number of coloumns in the &POTENTIAL section. The rst is the radius, the next ones
are the orbital angular momenta (s, p, d, f,. . . ). As an example you can determine a potential for
carbon using f-electrons and set LMAX=F. Since the f-state is not occupied in this case there is
very little advantage but it costs calculation time. In short, you can use values as high as there
is data in the pseudopotential le, but you dont have to if it is not needed by the physics of the
problem.
A fact that causes confusion is that Hamanns code for pseudopotential generation always produces
output for the d-channel, even if you only request channels s and p. You should be cautious if r
c
and the energy eigenvalue of the p- and d-channels are equal. In most of these cases LMAX=P
should be used.
12.4 File Formats and Interpretation of Data
Q: Why is my total energy so much dierent from a Gaussian calculation?
A: With CPMD you are using pseudopotentials to describe the atoms. Since the total energy
describes only the interactions between the pseudocores and the valence electrons (and some core
electrons in the case of so-called semi-core pseudopotentials), you are missing the contribution of the
core electrons and the full core charges of a regular all-electron calculation. Energy dierences
between two congurations, on the other hand, should be comparable, provided you use the same
number of atoms, the same plane wave cuto, the same pseudopotentials, and the same supercell
geometry in the CPMD calculation.
Q: In a molecular dynamics simulation, CPMD prints out a list of energies for each integration
step. Does anyone know the meaning of the individual values.
A: Some explanations to the energy terms:
EKINC ctitious kinetic energy of the electrons in a.u. this quantity should oscillate but not
increase during a simulation.
TEMPP Temperature of the ions, calculated from the kinetic energy of the ions (EKIONS).
154
EKS Kohn-Sham energy (the equivalent of the potential energy in classical MD).
ECLASSIC = EKS + EKIONS
EHAM = ECLASSIC + EKINC. Hamiltonian energy, this is the conserved quantity, depending
on the time step and the electron mass, this might oscillate but should not drift.
DIS mean square displacement of the ions with respect to the initial positions. Gives some
information on the diusion.
You can modify the list of individual energies to be displayed with the PRINT ENERGY
keyword.
Q: What do GNMAX, GNORM and CNSTR in a geometry optimization mean?
A:
GNMAX max
I,a
([F
Ia
[) = largest absolute component (a = x, y, z) of the force on any atom I.
GNORM
F
2
I
_
I
= average force on the atoms I
CNSTR max
I,a
F
constr
Ia
= largest absolute component (a = x, y, z) of force due to constraints on
any atom I.
Q: I found all the IR intensities in VIB.log le are zero when I try to calculate the IR of NH
+
4
ion
by CPMD.
Harmonic frequencies (cm**-1), IR intensities (KM/Mole),
Raman scattering activities (A**4/AMU), Raman depolarization ratios,
reduced masses (AMU), force constants (mDyne/A) and normal coordinates:
1 2 3
?A ?A ?A
Frequencies -- 142.9800 188.9340 237.2614
Red. masses -- 0.0000 0.0000 0.0000
Frc consts -- 0.0000 0.0000 0.0000
IR Inten -- 0.0000 0.0000 0.0000
Raman Activ -- 0.0000 0.0000 0.0000
Depolar -- 0.0000 0.0000 0.0000
Atom AN X Y Z X Y Z X Y Z
1 7 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
2 1 0.00 -0.35 -0.50 -0.35 0.00 0.00 -0.50 0.00 0.00
3 1 0.00 -0.35 0.50 -0.35 0.00 0.00 0.50 0.00 0.00
4 1 0.00 0.35 0.00 0.35 0.00 0.50 0.00 -0.50 0.00
5 1 0.00 0.35 0.00 0.35 0.00 -0.50 0.00 0.50 0.00
4 5 6
A: Thats not a problem of your calculation. The keyword VIBRATIONAL ANALYSIS does
not calculate intensities. The calculation of intensities is currently not possible in CPMD. The
intensities in the VIBx.log les are arbitrarily set to zero. The entries have to be there so that
visualisation programs, that are able to read output of the Gaussian program, can be also used to
visualize the CPMD results.
Q: I am trying to simulate a bulk liquid in CPMD and supposing that periodic boundary conditions
are built into the program. But after several thousand MD steps, I found some particles are far
away from the central simulation box.
Why it is so if periodic boundary conditions (PBC) on particle coordinates are imposed in all three
directions?
A: If you are not using the
155
SYMMETRY
0
options your calculations are actually using periodic boundary conditions (PBC). PBC are imposed
within CPMD for all calculations. However, the particle positions are not folded back to the original
computational box. The reason for this is that most people prefer to have smooth trajectories
without jumps of particles. This allows for easier tracking of special particles and nicer graphics.
In addition it is easy (with a little script) to apply PBC afterwards yourself, if needed.
Q: I am trying to simulate a bulk sodium and I found electron energy is increasing continuously
and it is in the range of 0.07 a.u. at the end of 20000 steps.
A: Sodium is a metal, and therefore missing an important feature that allows for stable CP
dynamics: the band gap. Using Nose thermostats (on electrons and ions) it might still be possible
to perform meaningful CP simulations [133].
The choice of parameters for the thermostats, however, will be nontrivial, highly system depen-
dent and require extensive testing. Without thermostats you will have strong coupling between
electronic degrees of freedom and ionic degrees of freedom. Adiabaticity is not maintained and a
steady increase of the ctitious kinetic energy will occur.
Q: I have computed RAMAN by LINEAR RESPONSE, and get three les: APT, POLARIZA-
TION and POLARIZABILITY with lots of data in these les. I want to know the meaning of the
data, please give me some answer in detail.
A: The POLARIZABILITY le simply contains the polarizability tensor of the whole system in
atomic units. The POLARIZATION le contains the total dipole moment (electronic + ionic) of
the whole system in atomic units. As for the le APT, it contains the atomic polar tensors for
each atom in the system. The atomic polar tensor is the derivative of the forces on the atoms
with respect to an applied external electric eld. Equivalently it is, from a Maxwell relation,
the derivative of the total dipole of the system with respect to the nuclei positions. It is thus
an important ingredient of the calculation of infrared spectra intensities, for example used in an
harmonic approximation. The trace of this tensor is the so-called Born charge of the considered
atom. The data is arranged in the following order (still in a.u.): the APT tensor is
dF
I,i
dE
j
where
F
I,i
is the force on atom I along i = x, y, z and E
j
is the electric eld along j = x, y, z. (I, i) are
the indices of the 3N atoms lines in the APT le, one atom after the other, and j is the column
index in the APT le.
Q: I was wondering what columns 2 to 7 in the DIPOLE le correspond to? When I run CPMD
v.3.5.1, columns 2 to 4 come out identical to columns 5 to 7 respectively. When I run with CPMD
v.3.4.1, the columns come out dierent. Is there an explanation for this?
A: Columns 2 to 4 in the DIPOLE le are the electronic contribution to the dipole moment,
columns 5 to 7 are the total (electronic + ionic) dipole moment. All dipole moments are divided
by the volume of the box.
In CPMD version 3.5.1 we have changed the reference point of the calculation. Now the reference
point is chosen such that the ionic contribution is zero and the electronic contribution minimal
(=total dipole). This avoids a problem that occasionally was seen in older versions. The electronic
dipole is calculated modulo(2/L). Now if the electronic dipole became too large, because the ionic
contribution was large (bad choice of reference point) the total dipole made jumps of 2.
Q: As you know, the cpmd RESTART le is saved as binary. But I want to change it to ASCII
and vice versa, because I use several machines of dierent architecture, for example COMPAQ,
IBM, and LINUX machine. Please help me with any comments.
A: The code to read and write the RESTART le is in the les rv30.F and wv30.F. Feel free to
implement an ASCII version of the restart, but be aware that the le will be huge.
But you may not need to do that. Lets say you decide to use big-endian binary encoding (this is
what e.g. IBM, Sun and SGI machines do natively).
156
With Compaq machines there is a compiler ag, -convert, which you could set to big endian (we
only have here linuxalpha, but the compaq compiler should be essentially the same).
On a Linux PC you can use the use the -Mbyteswapio or the -byteswapio ag, if you have the PGI
compiler.
For the Intel compiler (ifc/ifort/efc) you simply set the environment variable F UFMTENDIAN
to big (i.e.
export F UFMTENDIAN=big
if you are in a bourne/korn shell and
setenv F UFMTENDIAN big
if you are in a (t)csh).
Now even your cpmd executables will read and write big-endian restart les.
Check your compiler documentation for more details (search for endian).
12.5 Input Parameter Values
Q: If I set the keyword RESTART WAVEFUNCTION COORDINATES, would I have to write
the &SYSTEM and &ATOM section again?
A: Yes, you have to include the &SYSTEM and &ATOM sections even if you are restarting. If
you write RESTART COORDINATES, the coordinates in the RESTART le override the ones in
the input. RESTART WAVEFUNCTION alone does not select the coordinates in the RESTART
le, but does use those in the &ATOMS section.
Q: Could anybody tell me how to choose the energy cuto in &SYSTEM section?
A: The best way to choose the cuto for CPMD calculations is by running rst a series of tests.
Select a test system and a representative quantity (bond length, reaction energy, etc.), perform a
series of calculations with increasing cuto, pick the lowest cuto with satisfactory results.
Its always a good idea to make checks at some critical points of the calculations by increasing the
cuto. See also section 11.1.
Q: I have a problem with visualising unoccupied orbitals. When I use RHOOUT BANDS or
CUBEFILE ORBITALS after the wavefunction optimization I get only occupied orbitals. If I
add one empty state when optimizing wavefunction the program never reaches convergence.
A: The most ecient way to calculate unoccupied orbitals is to rst optimize the occupied orbitals
and then restart the calculation using the run option
KOHN-SHAM ENERGIES
n
where n ist the number of unoccupied orbitals. This will diagonalize the Kohn-Sham Potential
(dened by the occupied orbitals alone).
To test if everything goes ne, you can check the total energy printed at the beginning of this job,
it should be exactly the one at the end of the optimization. In addition, if you dont change the
default convergence criteria, the number of converged Kohn-Sham states should be equal to the
number of occupied states in the rst step.
Q: Is there any way to force CPMD to dump DENSITY les every N steps of molecular dynamics
run instead (or except) of the end of the job?
A: Short of modifying the source code, you could set the parameter RESTFILE to a large number
and than have CPMD write a restart le every N steps via the STORE keyword. Now you rename
each restart in turn from RESTART.# to RESTART and do a single step calculation using the
RESTART keyword without the LATEST modier which will write the DENSITY le (or run a
PROPERTIES job using CUBEFILE DENSITY to get the cube le directly).
Q: How do I calculate a Band structure with CPMD? To calculate a band structure with CPMD,
You rst calculate the correct density for your system with a Monkhorst-Pack Mesh.
157
A: Then you use: OPTIMIZE WAVEFUNCTIONS with MAXSTEP 1 (no self-consistency) and
RESTART DENSITY.
In the section KPOINTS, you should use for instance a bcc:
KPOINTS BANDS
51 0 0 0 0 0 1 Gamma to H
51 0 0 1 0 .5 .5 H to N
51 0 .5 .5 .5 .5 .5 N to P
51 .5 .5 .5 0 0 0 P to Gamma
51 0 0 0 .5 .5 0 Gamma to N
51 0 0 1 .5 .5 .5 H to P
0 0 0 0 0 0 0
You say that you want 51 points from (0,0,0) and (0,0,1) and so on. The last line with many zeros
is to stop.
If the memory of your computer is not enough, you can add in the line KPOINTS the option
BLOCK=50 that means you want to have only 50 kpoints in memory. This options worked some
time ago.
Q: Ive been recently trying to use the VELOCITIES keyword in a molecular dynamics run. I
want to collide fast atoms against surfaces. Despite the code seems to read the input velocities
properly, when the run starts the initial velocities are always the same (apparently coming from a
thermal distribution), no matter what is the velocity you specify for the incoming atom. Im not
using QUENCH IONS, so I dont understand why the input initial velocities are not considered in
the calculation.
A: There is no straightforward way in CPMD to achieve what you want. I suggest to follow this
procedure:
1) Run a single step of MD with the following set up
MOLECULAR DYNAMICS
MAXSTEP
1
RESTART WAVEFUNCTION COORDINATES
TEMPERATURE
300 <- or whatever your surface should be
This generates RESTART and GEOMETRY les. Now edit the GEOMETRY le to change the
velocities of the particles according to your experiment. Now restart the MD with the options
MOLECULAR DYNAMICS
MAXSTEP
1000
RESTART WAVEFUNCTION COORDINATES VELOCITIES GEOFILE
QUENCH ELECTRONS
The eect of this is: IONIC coordinates and velocities are read from GEOMETRY, ELECTRON
wavefunctions and velocities are read from RESTART, ELECTRON velocities are set to zero.
Q: I want to to run CPMD with basis sets equivalent to Gaussian 6-31+G(d) and 6-311+G(2d,p).
How do I set up the &BASIS section?
A: You should be able to construct inputs from the description in this manual (see section 9.5.3).
Please note, that the basis set generated from the &BASIS section is used in CPMD for two
purposes:
1. Analyzing orbitals:
We usually use the atomic pseudo-wavefunctions to analyze the orbitals from CPMD. The
158
6-31G type Gaussian basis sets are for all electron calculations. Dont expect very good
results when analyzing wavefunctions from a pseudopotential calculation.
2. Generating orbitals for an initial guess:
By default we use a Slater minimal basis. In most cases the eort to produce a better initial
guess using better wavefunctions does not pay o.
Q: How do I add support for a new functional?
A: Have a look at the le dftin.F, where you can see how CPMD reads the &DFT section and then
follow the ow of the dened variables through the les, e.g. functionals.F, gcener.F, lsd func.F,
and so on.
159
References
[1] P.J. Mohr, B.N. Taylor, and D.B. Newell, The 2006 CODATA Recommended Values of the
Fundamental Physical Constants, Web Version 5.1, 2007.
[2] M.P. Allen and D.J. Tildesley, Computer Simulations of Liquids, Clarendon Press, Oxford,
1987.
[3] R. Car and M. Parrinello, Phys. Rev. Lett. 55, 2471 (1985).
[4] D. Vanderbilt, Phys. Rev. B 41, 7892 (1990).
[5] S. Nose, J. Chem. Phys. 81, 511 (1984), Mol. Phys. 52, 255 (1984).
[6] W. G. Hoover, Phys. Rev. A 31, 1695 (1985).
[7] W. Kohn and L. J. Sham, Phys. Rev. 140, A1133, (1965).
[8] D. Marx and M. Parrinello, Z. Phys. B (Rapid Note) 95, 143 (1994).
[9] D. Marx and M. Parrinello, J. Chem. Phys. 104, 4077 (1996).
[10] M. Parrinello and A. Rahman, J. Appl. Phys. 52, 7182 (1981).
[11] M. Parrinello and A. Rahman, Phys. Rev. Lett. 45, 1196 (1980).
[12] S. Goedecker, M. Teter, and J. Hutter, Phys. Rev. B 54, 1703 (1996).
C. Hartwigsen, S. Goedecker, and J. Hutter, Phys. Rev. B 58, 3641 (1998).
[13] A. Alavi, J. Kohano, M. Parrinello, and D. Frenkel, Phys. Rev. Lett. 73, 2599 (1994).
[14] M. E. Tuckerman, D. Marx, M. L. Klein, and M. Parrinello, J. Chem. Phys. 104, 5579 (1996).
[15] M. Eichinger, P. Tavan, J. Hutter, and M. Parrinello, J. Chem. Phys. 110, 10452 (1999).
[16] H. B. Callen and R. F. Greene, Phys. Rev. 86, 702 (1952).
R. Kubo, J. Phys. Soc. Japan 12, 570 (1957).
[17] N. Marzari and D. Vanderbilt, Phys. Rev. B 56, 12847 (1997).
[18] A. Laio, J. VandeVondele, and U. Rothlisberger J. Chem. Phys. 116, 6941 (2002).
[19] A. Laio, J. VandeVondele, and U. Rothlisberger J. Phys. Chem. B 106, 7300 (2002).
[20] M. Boero, Reactive Simulations for Biochemical Processes in Atomic-Scale Modeling of
Nanosystems and Nanostructured materials p.