themselves along the MEP so as to be roughly equally spaced.
When both stages are complete, if the NEB calculation was successful,
one of the replicas should be an atomic configuration at the top or
saddle point of the barrier, the potential energies for the set of
replicas should represent the energy profile of the barrier along the
MEP, and the configurations of the replicas should be a sequence of
configurations along the MEP.
----------
A few other settings in your input script are required or advised to
perform a NEB calculation. See the NOTE about the choice of timestep
at the beginning of this doc page.
An atom map must be defined which it is not by default for :doc:`atom_style atomic <atom_style>` problems. The :doc:`atom_modify map <atom_modify>` command can be used to do this.
The "atom_modify sort 0 0.0" command should be used to turn off atom
sorting.
.. note::
This sorting restriction will be removed in a future version of
NEB in LAMMPS.
The minimizers in LAMMPS operate on all atoms in your system, even
non-NEB atoms, as defined above. To prevent non-NEB atoms from moving
during the minimization, you should use the :doc:`fix setforce <fix_setforce>` command to set the force on each of those
atoms to 0.0. This is not required, and may not even be desired in
some cases, but if those atoms move too far (e.g. because the initial
state of your system was not well-minimized), it can cause problems
for the NEB procedure.
The damped dynamics :doc:`minimizers <min_style>`, such as *quickmin*
and *fire*\ ), adjust the position and velocity of the atoms via an
Euler integration step. Thus you must define an appropriate
:doc:`timestep <timestep>` to use with NEB. As mentioned above, NEB
will often converge more quickly if you use a timestep about 10x
larger than you would normally use for dynamics simulations.
----------
Each file read by the neb command containing atomic coordinates used
to initialize one or more replicas must be formatted as follows.
The file can be ASCII text or a gzipped text file (detected by a .gz
suffix). The file can contain initial blank lines or comment lines
starting with "#" which are ignored. The first non-blank, non-comment
line should list N = the number of lines to follow. The N successive
lines contain the following information:
.. parsed-literal::
ID1 x1 y1 z1
ID2 x2 y2 z2
...
IDN xN yN zN
The fields are the the atom ID, followed by the x,y,z coordinates.
The lines can be listed in any order. Additional trailing information
on the line is OK, such as a comment.
Note that for a typical NEB calculation you do not need to specify
initial coordinates for very many atoms to produce differing starting
and final replicas whose intermediate replicas will converge to the
energy barrier. Typically only new coordinates for atoms
geometrically near the barrier need be specified.
Also note there is no requirement that the atoms in the file
correspond to the NEB atoms in the group defined by the :doc:`fix neb <fix_neb>` command. Not every NEB atom need be in the file,
and non-NEB atoms can be listed in the file.
----------
Four kinds of output can be generated during a NEB calculation: energy
barrier statistics, thermodynamic output by each replica, dump files,
and restart files.
When running with multiple partitions (each of which is a replica in
this case), the print-out to the screen and master log.lammps file
contains a line of output, printed once every *Nevery* timesteps. It
contains the timestep, the maximum force per replica, the maximum
force per atom (in any replica), potential gradients in the initial,
final, and climbing replicas,
the forward and backward energy barriers,
the total reaction coordinate (RDT), and
the normalized reaction coordinate and potential energy of each replica.
The "maximum force per replica" is
the two-norm of the 3N-length force vector for the atoms in each
replica, maximized across replicas, which is what the *ftol* setting
is checking against. In this case, N is all the atoms in each
replica. The "maximum force per atom" is the maximum force component
of any atom in any replica. The potential gradients are the two-norm
of the 3N-length force vector solely due to the interaction potential i.e.
without adding in inter-replica forces. Note that inter-replica forces
are zero in the initial and final replicas, and only affect
the direction in the climbing replica. For this reason, the "maximum
force per replica" is often equal to the potential gradient in the
climbing replica. In the first stage of NEB, there is no climbing
replica, and so the potential gradient in the highest energy replica
is reported, since this replica will become the climbing replica
in the second stage of NEB.
The "reaction coordinate" (RD) for each
replica is the two-norm of the 3N-length vector of distances between
its atoms and the preceding replica's atoms, added to the RD of the
preceding replica. The RD of the first replica RD1 = 0.0;
the RD of the final replica RDN = RDT, the total reaction coordinate.
The normalized RDs are divided by RDT,
so that they form a monotonically increasing sequence
from zero to one. When computing RD, N only includes the atoms
being operated on by the fix neb command.
The forward (reverse) energy barrier is the potential energy of the highest
replica minus the energy of the first (last) replica.
When running on multiple partitions, LAMMPS produces additional log
files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a
NEB calculation, these contain the thermodynamic output for each
replica.
If :doc:`dump <dump>` commands in the input script define a filename
that includes a *universe* or *uloop* style :doc:`variable <variable>`,
then one dump file (per dump command) will be created for each
replica. At the end of the NEB calculation, the final snapshot in
each file will contain the sequence of snapshots that transition the
system over the energy barrier. Earlier snapshots will show the
convergence of the replicas to the MEP.
Likewise, :doc:`restart <restart>` filenames can be specified with a
*universe* or *uloop* style :doc:`variable <variable>`, to generate
restart files for each replica. These may be useful if the NEB
calculation fails to converge properly to the MEP, and you wish to
restart the calculation from an intermediate point with altered
parameters.
There are 2 Python scripts provided in the tools/python directory,
neb_combine.py and neb_final.py, which are useful in analyzing output
from a NEB calculation. Assume a NEB simulation with M replicas, and
the NEB atoms labelled with a specific atom type.
The neb_combine.py script extracts atom coords for the NEB atoms from
all M dump files and creates a single dump file where each snapshot
contains the NEB atoms from all the replicas and one copy of non-NEB
atoms from the first replica (presumed to be identical in other
replicas). This can be visualized/animated to see how the NEB atoms
relax as the NEB calculation proceeds.
The neb_final.py script extracts the final snapshot from each of the M
dump files to create a single dump file with M snapshots. This can be
visualized to watch the system make its transition over the energy
barrier.
To illustrate, here are images from the final snapshot produced by the
neb_combine.py script run on the dump files produced by the two
example input scripts in examples/neb. Click on them to see a larger
image.
.. thumbnail:: JPG/hop1.jpg
.. thumbnail:: JPG/hop2.jpg
----------
Restrictions
""""""""""""
This command can only be used if LAMMPS was built with the REPLICA
package. See the :ref:`Making LAMMPS <start_3>` section