Merge branch 'master' into zeeman-rework

This commit is contained in:
Axel Kohlmeyer
2019-11-19 15:29:21 -05:00
171 changed files with 881 additions and 5667 deletions

3
doc/src/Developer/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/developer.aux
/developer.log
/developer.toc

View File

@ -0,0 +1,198 @@
#FIG 3.2 Produced by xfig version 3.2.5a
Portrait
Center
Inches
Letter
100.00
Single
-2
1200 2
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2232 1170 3540 1170 3540 1505 2232 1505 2232 1170
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2220 1830 3015 1830 3015 2219 2220 2219 2220 1830
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2226 3285 3300 3285 3300 3665 2226 3665 2226 3285
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2223 5190 3225 5190 3225 5525 2223 5525 2223 5190
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2232 7125 3090 7125 3090 7478 2232 7478 2232 7125
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2226 10230 3300 10230 3300 10565 2226 10565 2226 10230
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4026 10305 4980 10305 4980 10592 4026 10592 4026 10305
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4029 9900 5205 9900 5205 10250 4029 10250 4029 9900
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4038 9315 5370 9315 5370 9659 4038 9659 4038 9315
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4023 8955 4530 8955 4530 9278 4023 9278 4023 8955
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4029 8475 5190 8475 5190 8762 4029 8762 4029 8475
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4008 8115 5430 8115 5430 8408 4008 8408 4008 8115
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4026 7425 4995 7425 4995 7712 4026 7712 4026 7425
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4035 6720 4650 6720 4650 7025 4035 7025 4035 6720
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4044 7080 4830 7080 4830 7358 4044 7358 4044 7080
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4032 6105 5205 6105 5205 6419 4032 6419 4032 6105
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4026 5715 5115 5715 5115 6062 4026 6062 4026 5715
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4023 3585 4605 3585 4605 3872 4023 3872 4023 3585
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
3954 1680 5175 1680 5175 1997 3954 1997 3954 1680
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
1620 5235 2100 615
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
1605 5445 2070 10695
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3120 1935 3855 1800
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3150 2115 3765 2250
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3135 7230 3945 6840
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3150 7335 3945 8610
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
5265 8610 6195 8400
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
5280 8655 6180 8820
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3345 10290 3930 10020
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3360 10395 3930 10425
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3360 10455 3930 10755
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2193 360 3435 360 3435 647 2193 647 2193 360
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3398 3472 3923 3307
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3413 3601 3923 3721
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3285 2806 3870 2802
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3315 5372 3900 5368
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6354 2280 7470 2280 7470 2585 6354 2585 6354 2280
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6348 1875 7320 1875 7320 2222 6348 2222 6348 1875
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
3954 2070 5505 2070 5505 2372 3954 2372 3954 2070
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
5634 2137 6230 2045
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
5670 2310 6265 2418
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
3900 2640 5400 2640 5400 2975 3900 2975 3900 2640
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4038 3165 5385 3165 5385 3497 4038 3497 4038 3165
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4245 4110 5730 4110 5730 4499 4245 4499 4245 4110
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4233 4545 6390 4545 6390 4862 4233 4862 4233 4545
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4026 5190 5385 5190 5385 5525 4026 5525 4026 5190
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4038 7755 5310 7755 5310 8075 4038 8075 4038 7755
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6270 8250 7365 8250 7365 8610 6270 8610 6270 8250
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6273 8655 7380 8655 7380 8978 6273 8978 6273 8655
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4041 10620 5985 10620 5985 10943 4041 10943 4041 10620
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2217 10830 3135 10830 3135 11156 2217 11156 2217 10830
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2229 9780 3240 9780 3240 10118 2229 10118 2229 9780
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2214 9015 3285 9015 3285 9362 2214 9362 2214 9015
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2208 5850 3420 5850 3420 6209 2208 6209 2208 5850
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2217 4275 3615 4275 3615 4634 2217 4634 2217 4275
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2235 2655 3150 2655 3150 3000 2235 3000 2235 2655
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
60 5115 1500 5115 1500 5610 60 5610 60 5115
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3486 6018 4011 5853
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3486 6129 3996 6249
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3361 9291 3991 9531
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3345 9129 4005 9099
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3691 4412 4216 4277
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3695 4561 4175 4711
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2220 735 3129 735 3129 1043 2220 1043 2220 735
4 0 1 50 -1 18 18 0.0000 4 225 1275 2265 1455 Universe\001
4 0 1 50 -1 18 18 0.0000 4 285 735 2265 2175 Input\001
4 0 1 50 -1 18 18 0.0000 4 225 780 2265 2925 Atom\001
4 0 1 50 -1 18 18 0.0000 4 285 1020 2265 3600 Update\001
4 0 1 50 -1 18 18 0.0000 4 285 1320 2265 4575 Neighbor\001
4 0 1 50 -1 18 18 0.0000 4 225 945 2265 5475 Comm\001
4 0 1 50 -1 18 18 0.0000 4 225 1110 2265 6150 Domain\001
4 0 1 50 -1 18 18 0.0000 4 225 810 2265 7425 Force\001
4 0 1 50 -1 18 18 0.0000 4 285 975 2265 9300 Modify\001
4 0 1 50 -1 18 18 0.0000 4 285 900 2265 10050 Group\001
4 0 1 50 -1 18 18 0.0000 4 285 990 2265 10500 Output\001
4 0 1 50 -1 18 18 0.0000 4 225 825 2265 11100 Timer\001
4 0 0 50 -1 18 18 0.0000 4 225 1170 3990 1950 Variable\001
4 0 4 50 -1 18 18 0.0000 4 225 1470 3990 2325 Command\001
4 0 4 50 -1 18 18 0.0000 4 285 1275 4065 3450 Integrate\001
4 0 4 50 -1 18 18 0.0000 4 225 525 4065 3825 Min\001
4 0 0 50 -1 18 18 0.0000 4 285 1230 4065 5475 Irregular\001
4 0 4 50 -1 18 18 0.0000 4 285 1020 4065 6000 Region\001
4 0 0 50 -1 18 18 0.0000 4 225 975 4065 6375 Lattice\001
4 0 4 50 -1 18 18 0.0000 4 225 435 4065 9225 Fix\001
4 0 4 50 -1 18 18 0.0000 4 285 1305 4065 9600 Compute\001
4 0 4 50 -1 18 18 0.0000 4 225 570 4065 6975 Pair\001
4 0 4 50 -1 18 18 0.0000 4 285 840 4065 7665 Angle\001
4 0 4 50 -1 18 18 0.0000 4 225 1215 4065 8010 Dihedral\001
4 0 4 50 -1 18 18 0.0000 4 285 1305 4065 8355 Improper\001
4 0 4 50 -1 18 18 0.0000 4 285 1095 4065 8700 KSpace\001
4 0 4 50 -1 18 18 0.0000 4 285 855 4065 10545 Dump\001
4 0 0 50 -1 18 18 0.0000 4 225 1815 4065 10890 WriteRestart\001
4 0 0 50 -1 18 18 0.0000 4 225 930 6315 8550 FFT3D\001
4 0 0 50 -1 18 18 0.0000 4 285 1005 6315 8925 Remap\001
4 0 0 50 -1 18 18 0.0000 4 225 885 6390 2175 Finish\001
4 0 0 50 -1 18 18 0.0000 4 285 1050 6390 2550 Special\001
4 0 4 50 -1 18 18 0.0000 4 225 1305 3990 2925 AtomVec\001
4 0 4 50 -1 18 18 0.0000 4 225 765 4065 7320 Bond\001
4 0 0 50 -1 18 18 0.0000 4 225 1095 4065 10200 Thermo\001
4 0 0 50 -1 18 18 0.0000 4 285 1380 4305 4425 NeighList\001
4 0 0 50 -1 18 18 0.0000 4 285 2025 4305 4800 NeighRequest\001
4 0 1 50 -1 18 18 0.0000 4 285 1155 2250 600 Memory\001
4 0 0 50 -1 18 18 0.0000 4 225 1305 120 5475 LAMMPS\001
4 0 1 50 -1 18 18 0.0000 4 225 735 2265 1005 Error\001

Binary file not shown.

View File

@ -0,0 +1,699 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\centerline{\Large \bf LAMMPS Developer Guide}
\centerline{\bf 23 Aug 2011}
\vspace{0.5in}
This document is a developer guide to the LAMMPS molecular dynamics
package, whose WWW site is at lammps.sandia.gov. It describes the
internal structure and algorithms of the code. Sections will be added
as we have time, and in response to requests from developers and
users.
\tableofcontents
\pagebreak
\section{LAMMPS source files}
LAMMPS source files are in two directories of the distribution
tarball. The src directory has the majority of them, all of which are
C++ files (*.cpp and *.h). Many of these files are in the src
directory itself. There are also dozens of ``packages'', which can be
included or excluded when LAMMPS is built. See the
doc/Section\_build.html section of the manual for more information
about packages, or type ``make'' from within the src directory, which
lists package-related commands, such as ``make package-status''. The
source files for each package are in an all-uppercase sub-directory of
src, like src/MOLECULE or src/USER-CUDA. If the package is currently
installed, copies of the package source files will also exist in the
src directory itself. The src/STUBS sub-directory is not a package
but contains a dummy version of the MPI library, used when building a
serial version of the code.
The lib directory also contains source code for external libraries,
used by a few of the packages. Each sub-directory, like meam or gpu,
contains the source files, some of which are in different languages
such as Fortran. The files are compiled into libraries from within
each sub-directory, e.g. performing a ``make'' in the lib/meam directory
creates a libmeam.a file. These libraries are linked to during a
LAMMPS build, if the corresponding package is installed.
LAMMPS C++ source files almost always come in pairs, such as run.cpp
and run.h. The pair of files defines a C++ class, the Run class in
this case, which contains the code invoked by the ``run'' command in a
LAMMPS input script. As this example illustrates, source file and
class names often have a one-to-one correspondence with a command used
in a LAMMPS input script. Some source files and classes do not have a
corresponding input script command, e.g. ``force.cpp'' and the Force
class. They are discussed in the next section.
\pagebreak
\section{Class hierarchy of LAMMPS}
Though LAMMPS has a lot of source files and classes, its class
hierarchy is quite simple, as outlined in Fig \ref{fig:classes}. Each
boxed name refers to a class and has a pair of associated source files
in lammps/src, e.g. ``memory.cpp'' and ``memory.h''. More details on the
class and its methods and data structures can be found by examining
its *.h file.
LAMMPS (lammps.cpp/h) is the top-level class for the entire code. It
holds an ``instance'' of LAMMPS and can be instantiated one or more
times by a calling code. For example, the file src/main.cpp simply
instantiates one instance of LAMMPS and passes it the input script.
The file src/library.cpp contains a C-style library interface to the
LAMMPS class. See the lammps/couple and lammps/python directories for
examples of simple programs that use LAMMPS through its library
interface. A driver program can instantiate the LAMMPS class multiple
times, e.g. to embed several atomistic simulation regions within a
mesoscale or continuum simulation domain.
There are a dozen or so top-level classes within the LAMMPS class that
are visible everywhere in the code. They are shaded blue in Fig
\ref{fig:classes}. Thus any class can refer to the y-coordinate of
local atom $I$ as atom$\rightarrow$x[i][1]. This visibility is
enabled by a bit of cleverness in the Pointers class (see
src/pointers.h) which every class inherits from.
There are a handful of virtual parent classes in LAMMPS that define
what LAMMPS calls ``styles''. They are shaded red in Fig
\ref{fig:classes}. Each of these are parents of a number of child
classes that implement the interface defined by the parent class. For
example, the fix style has around 100 child classes. They are the
possible fixes that can be specified by the fix command in an input
script, e.g. fix nve, fix shake, fix ave/time, etc. The corresponding
classes are Fix (for the parent class), FixNVE, FixShake, FixAveTime,
etc. The source files for these classes are easy to identify in the
src directory, since they begin with the word ``fix'', e,g,
fix\_nve.cpp, fix\_shake,cpp, fix\_ave\_time.cpp, etc.
The one exception is child class files for the ``command'' style. These
implement specific commands in the input script that can be invoked
before/after/between runs or which launch a simulation. Examples are
the create\_box, minimize, run, and velocity commands which encode the
CreateBox, Minimize, Run, and Velocity classes. The corresponding
files are create\_box,cpp, minimize.cpp, run.cpp, and velocity.cpp.
The list of command style files can be found by typing ``grep
COMMAND\_CLASS *.h'' from within the src directory, since that word in
the header file identifies the class as an input script command.
Similar words can be grepped to list files for the other LAMMPS
styles. E.g. ATOM\_CLASS, PAIR\_CLASS, BOND\_CLASS, REGION\_CLASS,
FIX\_CLASS, COMPUTE\_CLASS, DUMP\_CLASS, etc.
\begin{figure}[htb]
\begin{center}
\includegraphics[height=4in]{classes.pdf}
\end{center}
\caption{Class hierarchy within LAMMPS source code.}
\label{fig:classes}
\end{figure}
More details on individual classes in Fig \ref{fig:classes} are as
follows:
\begin{itemize}
\item The Memory class handles allocation of all large vectors and
arrays.
\item The Error class prints all error and warning messages.
\item The Universe class sets up partitions of processors so that
multiple simulations can be run, each on a subset of the processors
allocated for a run, e.g. by the mpirun command.
\item The Input class reads an input script, stores variables, and
invokes stand-alone commands that are child classes of the Command
class.
\item As discussed above, the Command class is a parent class for
certain input script commands that perform a one-time operation
before/after/between simulations or which invoke a simulation. They
are instantiated from within the Input class, invoked, then
immediately destructed.
\item The Finish class is instantiated to print statistics to the
screen after a simulation is performed, by commands like run and
minimize.
\item The Special class walks the bond topology of a molecular system
to find 1st, 2nd, 3rd neighbors of each atom. It is invoked by
several commands, like read\_data, read\_restart, and replicate.
\item The Atom class stores all per-atom arrays. More precisely, they
are allocated and stored by the AtomVec class, and the Atom class
simply stores a pointer to them. The AtomVec class is a parent
class for atom styles, defined by the atom\_style command.
\item The Update class holds an integrator and a minimizer. The
Integrate class is a parent style for the Verlet and rRESPA time
integrators, as defined by the run\_style input command. The Min
class is a parent style for various energy minimizers.
\item The Neighbor class builds and stores neighbor lists. The
NeighList class stores a single list (for all atoms). The
NeighRequest class is called by pair, fix, or compute styles when
they need a particular kind of neighbor list.
\item The Comm class performs interprocessor communication, typically
of ghost atom information. This usually involves MPI message
exchanges with 6 neighboring processors in the 3d logical grid of
processors mapped to the simulation box. Sometimes the Irregular
class is used, when atoms may migrate to arbitrary processors.
\item The Domain class stores the simulation box geometry, as well as
geometric Regions and any user definition of a Lattice. The latter
are defined by region and lattice commands in an input script.
\item The Force class computes various forces between atoms. The Pair
parent class is for non-bonded or pair-wise forces, which in LAMMPS
lingo includes many-body forces such as the Tersoff 3-body
potential. The Bond, Angle, Dihedral, Improper parent classes are
styles for bonded interactions within a static molecular topology.
The KSpace parent class is for computing long-range Coulombic
interactions. One of its child classes, PPPM, uses the FFT3D and
Remap classes to communicate grid-based information with neighboring
processors.
\item The Modify class stores lists of Fix and Compute classes, both
of which are parent styles.
\item The Group class manipulates groups that atoms are assigned to
via the group command. It also computes various attributes of
groups of atoms.
\item The Output class is used to generate 3 kinds of output from a
LAMMPS simulation: thermodynamic information printed to the screen
and log file, dump file snapshots, and restart files. These
correspond to the Thermo, Dump, and WriteRestart classes
respectively. The Dump class is a parent style.
\item The Timer class logs MPI timing information, output at the end
of a run.
\end{itemize}
%%\pagebreak
%%\section{Spatial decomposition and parallel operations}
%%distributed memory
%%Ref to JCP paper
%%diagram of 3d grid of procs and spatial decomp
%%6-way comm
%%ghost atoms, PBC added when comm (in atom class)
%%\pagebreak
%%\section{Fixes, computes, variables}
%%fixes intercolate in timestep, store per-atom info
%%computes based on current snapshot
%%equal- and atom-style variables
%%output they produce - see write-up in HowTo
\pagebreak
\section{How a timestep works}
The first and most fundamental operation within LAMMPS to understand
is how a timestep is structured. Timestepping is performed by the
Integrate class within the Update class. Since Integrate is a parent
class, corresponding to the run\_style input script command, it has
child classes. In this section, the timestep implemented by the
Verlet child class is described. A similar timestep is implemented by
the Respa child class, for the rRESPA hierarchical timestepping
method. The Min parent class performs energy minimization, so does
not perform a literal timestep. But it has logic similar to what is
described here, to compute forces and invoke fixes at each iteration
of a minimization. Differences between time integration and
minimization are highlighted at the end of this section.
The Verlet class is encoded in the src/verlet.cpp and verlet.h files.
It implements the velocity-Verlet timestepping algorithm. The
workhorse method is Verlet::run(), but first we highlight several
other methods in the class.
\begin{itemize}
\item The init() method is called at the beginning of each dynamics
run. It simply sets some internal flags, based on user settings in
other parts of the code.
\item The setup() or setup\_minimal() methods are also called before
each run. The velocity-Verlet method requires current forces be
calculated before the first timestep, so these routines compute
forces due to all atomic interactions, using the same logic that
appears in the timestepping described next. A few fixes are also
invoked, using the mechanism described in the next section. Various
counters are also initialized before the run begins. The
setup\_minimal() method is a variant that has a flag for performing
less setup. This is used when runs are continued and information
from the previous run is still valid. For example, if repeated
short LAMMPS runs are being invoked, interleaved by other commands,
via the ``pre no'' and ``every'' options of the run command, the
setup\_minimal() method is used.
\item The force\_clear() method initializes force and other arrays to
zero before each timestep, so that forces (torques, etc) can be
accumulated.
\end{itemize}
Now for the Verlet::run() method. Its structure in hi-level pseudo
code is shown in Fig \ref{fig:verlet}. In the actual code in
src/verlet.cpp some of these operations are conditionally invoked.
\begin{figure}[htb]
\begin{center}
\begin{verbatim}
loop over N timesteps:
ev_set()
fix->initial_integrate()
fix->post_integrate()
nflag = neighbor->decide()
if nflag:
fix->pre_exchange()
domain->pbc()
domain->reset_box()
comm->setup()
neighbor->setup_bins()
comm->exchange()
comm->borders()
fix->pre_neighbor()
neighbor->build()
else
comm->forward_comm()
force_clear()
fix->pre_force()
pair->compute()
bond->compute()
angle->compute()
dihedral->compute()
improper->compute()
kspace->compute()
comm->reverse_comm()
fix->post_force()
fix->final_integrate()
fix->end_of_step()
if any output on this step: output->write()
\end{verbatim}
\end{center}
\caption{Pseudo-code for the Verlet::run() method.}
\label{fig:verlet}
\end{figure}
The ev\_set() method (in the parent Integrate class), sets two flags
({\em eflag} and {\em vflag}) for energy and virial computation. Each
flag encodes whether global and/or per-atom energy and virial should
be calculated on this timestep, because some fix or variable or output
will need it. These flags are passed to the various methods that
compute particle interactions, so that they can skip the extra
calculations if the energy and virial are not needed. See the
comments with the Integrate::ev\_set() method which document the flag
values.
At various points of the timestep, fixes are invoked,
e.g. fix$\rightarrow$initial\_integrate(). In the code, this is
actually done via the Modify class which stores all the Fix objects
and lists of which should be invoked at what point in the timestep.
Fixes are the LAMMPS mechanism for tailoring the operations of a
timestep for a particular simulation. As described elsewhere
(unwritten section), each fix has one or more methods, each of which
is invoked at a specific stage of the timestep, as in Fig
\ref{fig:verlet}. All the fixes defined in an input script with an
initial\_integrate() method are invoked at the beginning of each
timestep. Fix nve, nvt, npt are examples, since they perform the
start-of-timestep velocity-Verlet integration to update velocities by
a half-step, and coordinates by a full step. The post\_integrate()
method is next. Only a few fixes use this, e.g. to reflect particles
off box boundaries in the FixWallReflect class.
The decide() method in the Neighbor class determines whether neighbor
lists need to be rebuilt on the current timestep. If not, coordinates
of ghost atoms are acquired by each processor via the forward\_comm()
method of the Comm class. If neighbor lists need to be built, several
operations within the inner if clause of Fig \ref{fig:verlet} are
first invoked. The pre\_exchange() method of any defined fixes is
invoked first. Typically this inserts or deletes particles from the
system.
Periodic boundary conditions are then applied by the Domain class via
its pbc() method to remap particles that have moved outside the
simulation box back into the box. Note that this is not done every
timestep. but only when neighbor lists are rebuilt. This is so that
each processor's sub-domain will have consistent (nearby) atom
coordinates for its owned and ghost atoms. It is also why dumped atom
coordinates can be slightly outside the simulation box.
The box boundaries are then reset (if needed) via the reset\_box()
method of the Domain class, e.g. if box boundaries are shrink-wrapped
to current particle coordinates. A change in the box size or shape
requires internal information for communicating ghost atoms (Comm
class) and neighbor list bins (Neighbor class) be updated. The
setup() method of the Comm class and setup\_bins() method of the
Neighbor class perform the update.
The code is now ready to migrate atoms that have left a processor's
geometric sub-domain to new processors. The exchange() method of the
Comm class performs this operation. The borders() method of the Comm
class then identifies ghost atoms surrounding each processor's
sub-domain and communicates ghost atom information to neighboring
processors. It does this by looping over all the atoms owned by a
processor to make lists of those to send to each neighbor processor.
On subsequent timesteps, the lists are used by the
Comm::forward\_comm() method.
Fixes with a pre\_neighbor() method are then called. These typically
re-build some data structure stored by the fix that depends on the
current atoms owned by each processor.
Now that each processor has a current list of its owned and ghost
atoms, LAMMPS is ready to rebuild neighbor lists via the build()
method of the Neighbor class. This is typically done by binning all
owned and ghost atoms, and scanning a stencil of bins around each
owned atom's bin to make a Verlet list of neighboring atoms within the
force cutoff plus neighbor skin distance.
In the next portion of the timestep, all interaction forces between
particles are computed, after zeroing the per-atom force vector via
the force\_clear() method. If the newton flag is set to ``on'' by the
newton command, forces on both owned and ghost atoms are calculated.
Pairwise forces are calculated first, which enables the global virial
(if requested) to be calculated cheaply (at the end of the
Pair::compute() method), by a dot product of atom coordinates and
forces. By including owned and ghost atoms in the dot product, the
effect of periodic boundary conditions is correctly accounted for.
Molecular topology interactions (bonds, angles, dihedrals, impropers)
are calculated next. The final contribution is from long-range
Coulombic interactions, invoked by the KSpace class.
If the newton flag is on, forces on ghost atoms are communicated and
summed back to their corresponding owned atoms. The reverse\_comm()
method of the Comm class performs this operation, which is essentially
the inverse operation of sending copies of owned atom coordinates to
other processor's ghost atoms.
At this point in the timestep, the total force on each atom is known.
Additional force constraints (external forces, SHAKE, etc) are applied
by Fixes that have a post\_force() method. The second half of the
velocity-Verlet integration is then performed (another half-step
update of the velocities) via fixes like nve, nvt, npt.
At the end of the timestep, fixes that define an end\_of\_step()
method are invoked. These typically perform a diagnostic calculation,
e.g. the ave/time and ave/spatial fixes. The final operation of the
timestep is to perform any requested output, via the write() method of
the Output class. There are 3 kinds of LAMMPS output: thermodynamic
output to the screen and log file, snapshots of atom data to a dump
file, and restart files. See the thermo\_style, dump, and restart
commands for more details.
The iteration performed by an energy minimization is similar to the
dynamics timestep of Fig \ref{fig:verlet}. Forces are computed,
neighbor lists are built as needed, atoms migrate to new processors,
and atom coordinates and forces are communicated to neighboring
processors. The only difference is what Fix class operations are
invoked when. Only a subset of LAMMPS fixes are useful during energy
minimization, as explained in their individual doc pages. The
relevant Fix class methods are min\_pre\_exchange(),
min\_pre\_force(), and min\_post\_force(). Each is invoked at the
appropriate place within the minimization iteration. For example, the
min\_post\_force() method is analogous to the post\_force() method for
dynamics; it is used to alter or constrain forces on each atom, which
affects the minimization procedure.
\pagebreak
\section{Extending LAMMPS}
The Section\_modify.html file in the doc directory of
the LAMMPS distribution gives an overview of how LAMMPS can
be extended by writing new classes that derive from existing
parent classes in LAMMPS. Here, some specific coding
details are provided for writing a new fix.
\subsection{New fixes}
(this section provided by Kirill Lykov)
\vspace{0.25cm}
Writing fixes is a flexible way of extending LAMMPS. Users can
implement many things using fixes:
\begin{itemize}
\item changing particles attributes (positions, velocities, forces, etc.).
Example: FixFreeze.
\item reading/writing data. Example: FixRestart.
\item implementing boundary conditions. Example: FixWall.
\item saving information about particles for future use (previous positions,
for instance). Example: FixStoreState.
\end{itemize}
All fixes are derived from class Fix and must have constructor with the
signature: FixMine(class LAMMPS *, int, char **).
Every fix must be registered in LAMMPS by writing the following lines
of code in the header before include guards:
\begin{center}
\begin{verbatim}
#ifdef FIX_CLASS
FixStyle(your/fix/name,FixMine)
#else
\end{verbatim}
\end{center}
Where ``your/fix/name'' is a name of your fix in the script and FixMine
is the name of the class. This code allows LAMMPS to find your fix
when it parses input script. In addition, your fix header must be
included in the file ``style\_fix.h''. In case if you use LAMMPS make,
this file is generated automatically - all files starting with prefix
fix\_ are included, so call your header the same way. Otherwise, don't
forget to add your include into ``style\_fix.h''.
Let's write a simple fix which will print average velocity at the end
of each timestep. First of all, implement a constructor:
\begin{center}
\begin{verbatim}
FixPrintVel::FixPrintVel(LAMMPS *lmp, int narg, char **arg)
: Fix(lmp, narg, arg)
{
if (narg < 4)
error->all(FLERR,"Illegal fix print command");
nevery = atoi(arg[3]);
if (nevery <= 0)
error->all(FLERR,"Illegal fix print command");
}
\end{verbatim}
\end{center}
In the constructor you should parse your fix arguments which are
specified in the script. All fixes have pretty the same syntax: fix
[fix\_identifier] [group\_name] [fix\_name] [fix\_arguments]. The
first 3 parameters are parsed by Fix class constructor, while
[fix\_arguments] should be parsed by you. In our case, we need to
specify how often we want to print an average velocity. For instance,
once in 50 timesteps: fix 1 print/vel 50. There is a special variable
in Fix class called nevery which specifies how often method
end\_of\_step() is called. Thus all we need to do is just set it up.
The next method we need to implement is setmask():
\begin{center}
\begin{verbatim}
int FixPrintVel::setmask()
{
int mask = 0;
mask |= FixConst::END_OF_STEP;
return mask;
}
\end{verbatim}
\end{center}
Here user specifies which methods of your fix should be called during
the execution. For instance, END\_OF\_STEP corresponds to the
end\_of\_step() method. Overall, there are 8 most important methods,
methods are called in predefined order during the execution of the
verlet algorithm as was mentioned in the Section 3:
\begin{itemize}
\item initial\_integrate()
\item post\_integrate()
\item pre\_exchange()
\item pre\_neighbor()
\item pre\_force()
\item post\_force()
\item final\_integrate()
\item end\_of\_step()
\end{itemize}
Fix developer must understand when he wants to execute his code. In
case if we want to write FixPrintVel, we need only end\_of\_step():
\begin{center}
\begin{verbatim}
void FixPrintVel::end_of_step()
{
// for add3, scale3
using namespace MathExtra;
double** v = atom->v;
int nlocal = atom->nlocal;
double localAvgVel[4]; // 4th element for particles count
memset(localAvgVel, 0, 4 * sizeof(double));
for (int particleInd = 0; particleInd < nlocal; ++particleInd) {
add3(localAvgVel, v[particleInd], localAvgVel);
}
localAvgVel[3] = nlocal;
double globalAvgVel[4];
memset(globalAvgVel, 0, 4 * sizeof(double));
MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MPI_SUM, world);
scale3(1.0 / globalAvgVel[3], globalAvgVel);
if (comm->me == 0) {
printf("\%e, \%e, \%e\n",
globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]);
}
}
\end{verbatim}
\end{center}
In the code above, we use MathExtra routines defined in
``math\_extra.h''. There are bunch of math functions to work with
arrays of doubles as with math vectors.
In this code we use an instance of Atom class. This object is stored
in the Pointers class (see ``pointers.h''). This object contains all
global information about the simulation system. Data from Pointers
class available to all classes inherited from it using protected
inheritance. Hence when you write you own class, which is going to use
LAMMPS data, don't forget to inherit from Pointers. When writing
fixes we inherit from class Fix which is inherited from Pointers so
there is no need to inherit from it directly.
The code above computes average velocity for all particles in the
simulation. Yet you have one unused parameter in fix call from the
script - [group\_name]. This parameter specifies the group of atoms
used in the fix. So we should compute average for all particles in the
simulation if group\_name == all, but it can be any group. The group
information is specified by groupbit which is defined in class Fix:
\begin{center}
\begin{verbatim}
for (int particleInd = 0; particleInd < nlocal; ++particleInd) {
if (atom->mask[particleInd] & groupbit) {
//Do all job here
}
}
\end{verbatim}
\end{center}
Class Atom encapsulates atoms positions, velocities, forces, etc. User
can access them using particle index. Note, that particle indexes are
usually changed every timestep because of sorting.
Lets consider another Fix example. We want to have a fix which stores
atoms position from previous time step in your fix. The local atoms
indexes will not be valid on the next iteration. In order to handle
this situation there are several methods which should be implemented:
\begin{itemize}
\item \verb|double memory_usage| - return how much memory fix uses
\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays
in your fix
\item \verb|void copy_arrays(int i, int j, int delflag)| - copy i-th per-particle
information to j-th. Used when atoms sorting is performed. if delflag is set
and atom j owns a body, move the body information to atom i.
\item \verb|void set_arrays(int i)| - sets i-th particle related information to zero
\end{itemize}
Note, that if your class implements these methods, it must call add calls of
add\_callback and delete\_callback to constructor and destructor:
\begin{center}
\begin{verbatim}
FixSavePos::FixSavePos(LAMMPS *lmp, int narg, char **arg) {
//...
atom->add_callback(0);
}
FixSavePos::~FixSavePos() {
atom->delete_callback(id, 0);
}
\end{verbatim}
\end{center}
Since we want to store positions of atoms from previous timestep, we
need to add double** x to the header file. Than add allocation code to
constructor:
\verb|memory->create(this->x, atom->nmax, 3, "FixSavePos:x");|. Free memory
at destructor: \verb|memory->destroy(x);|
Finally, implement mentioned methods:
\begin{center}
\begin{verbatim}
double FixSavePos::memory_usage()
{
int nmax = atom->nmax;
double bytes = 0.0;
bytes += nmax * 3 * sizeof(double);
return bytes;
}
void FixSavePos::grow_arrays(int nmax)
{
memory->grow(this->x, nmax, 3, "FixSavePos:x");
}
void FixSavePos::copy_arrays(int i, int j, int delflag)
{
memcpy(this->x[j], this->x[i], sizeof(double) * 3);
}
void FixSavePos::set_arrays(int i)
{
memset(this->x[i], 0, sizeof(double) * 3);
}
int FixSavePos::pack_exchange(int i, double *buf)
{
int m = 0;
buf[m++] = x[i][0];
buf[m++] = x[i][1];
buf[m++] = x[i][2];
return m;
}
int FixSavePos::unpack_exchange(int nlocal, double *buf)
{
int m = 0;
x[nlocal][0] = buf[m++];
x[nlocal][1] = buf[m++];
x[nlocal][2] = buf[m++];
return m;
}
\end{verbatim}
\end{center}
Now, a little bit about memory allocation. We used Memory class which
is just a bunch of template functions for allocating 1D and 2D
arrays. So you need to add include ``memory.h'' to have access to them.
Finally, if you need to write/read some global information used in
your fix to the restart file, you might do it by setting flag
restart\_global = 1 in the constructor and implementing methods void
write\_restart(FILE *fp) and void restart(char *buf).
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K (\theta - \theta_0)^2 + K_{UB} (r - r_{UB})^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,12 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray*}
E & = & E_a + E_{bb} + E_{ba} \\
E_a & = & K_2 (\theta - \theta_0)^2 + K_3 (\theta - \theta_0)^3 + K_4 (\theta - \theta_0)^4 \\
E_{bb} & = & M (r_{ij} - r_1) (r_{jk} - r_2) \\
E_{ba} & = & N_1 (r_{ij} - r_1) (\theta - \theta_0) + N_2 (r_{jk} - r_2) (\theta - \theta_0)
\end{eqnarray*}
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K [1 + \cos(\theta)]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,15 +0,0 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = K \left[ 1 + \cos(n\theta - \theta_0)\right]
$$
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K [1 - \cos(\theta - \theta_0)]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,9 +0,0 @@
\documentstyle[12pt]{article}
\begin{document}
$$
E=C\left[ 1-B(-1)^ncos\left( n\theta\right) \right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,9 +0,0 @@
\documentstyle[12pt]{article}
\begin{document}
$$
E=-\frac{Umin}{2} \left[ 1+Cos(\theta-\theta_0) \right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -1,13 +0,0 @@
\documentstyle[12pt]{article}
\begin{document}
$$
E=-U_{min}
\frac{e^{-a U(\theta,\theta_0)}-1}{e^a-1}
\quad\mbox{with}\quad
U(\theta,\theta_0)
=-0.5 \left(1+\cos(\theta-\theta_0) \right)
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K [\cos(\theta) - \cos(\theta_0)]^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
\thispagestyle{empty}
$$
E = K_{SS} \left(r_{12}-r_{12,0}\right)\left(r_{32}-r_{32,0}\right) + K_{BS0}\left(r_{12}-r_{12,0}\right)\left(\theta-\theta_0\right) + K_{BS1}\left(r_{32}-r_{32,0}\right)\left(\theta-\theta_0\right)
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,10 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray*}
-\vec{T_j} & = & \vec{r_{ij}} \times \vec{F_i}\\
\vec{F_j} & = & -\vec{F_i} \\
\end{eqnarray*}
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
\cos\gamma = \frac{\vec{\mu_j}\bullet\vec{r_{ij}}}{\mu_j\,r_{ij}}
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K (\cos\gamma - \cos\gamma_0)^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
\vec{T_j} = \frac{2K(\cos\gamma - \cos\gamma_0)}{\mu_j\,r_{ij}}\,
\vec{r_{ij}} \times \vec{\mu_j}
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K [C_0 + C_1 \cos ( \theta) + C_2 \cos( 2 \theta) ]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K [ 1.0 + c \cos ( n \theta) ]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K (\theta - \theta_0)^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
\thispagestyle{empty}
$$
E = K (\theta - \theta_0)^2 \left[ 1 - 0.014(\theta - \theta_0) + 5.6(10)^{-5} (\theta - \theta_0)^2 - 7.0(10)^{-7} (\theta - \theta_0)^3 + 9(10)^{-10} (\theta - \theta_0)^4 \right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K_2 (\theta - \theta_0)^2 + K_3 (\theta - \theta_0)^3 + K_4 (\theta - \theta_0)^4
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K_2 (r - r_0)^2 + K_3 (r - r_0)^3 + K_4 (r - r_0)^4
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -1,11 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = -0.5 K R_0^2 \ln \left[ 1 - \left(\frac{r}{R_0}\right)^2\right] +
4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
\left(\frac{\sigma}{r}\right)^6 \right] + \epsilon
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,13 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = -0.5 K R_0^2
\ln \left[1 -\left( \frac{\left(r - \Delta\right)}{R_0}\right)^2 \right] +
4 \epsilon \left[ \left(\frac{\sigma}{\left(r -
\Delta\right)}\right)^{12} - \left(\frac{\sigma}{\left(r -
\Delta\right)}\right)^6 \right] + \epsilon
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,10 +0,0 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = K (r^2 - r_0^2)^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K (r - r_0)^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = \frac{Umin}{(r_0-r_c)^2} \left[ (r-r_0)^2-(r_c-r_0)^2 \right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = \frac{Umin}{(r_0-r_c)^2} \left[ (r-r_0)^2-(r_c-r_0)^2 \right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
\thispagestyle{empty}
$$
E = K (r - r_0)^2 \left[ 1 - 2.55(r-r_0) + (7/12) 2.55^2(r-r_0)^2 \right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,10 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
% E = D \left[ 1 - \exp \left( -\alpha (r - r_0) \right) \right]^2
E = D \left[ 1 - e^{-\alpha (r - r_0)} \right]^2
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,9 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = \frac{\epsilon (r - r_0)^2}{ [ \lambda^2 - (r - r_0)^2 ]}
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,10 +0,0 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = - \frac{\epsilon}{2} \ln \left[ 1 - \left(\frac{r-r0}{\Delta}\right)^2\right]
$$
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -1,11 +0,0 @@
\documentclass[12pt]{article}
\begin{document}
$$
E = K (r - R_c)^ 2 (r - R_c - B_1) (r - R_c - B_2) + U_0 +
4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
\left(\frac{\sigma}{r}\right)^6 \right] + \epsilon
$$
\end{document}

View File

@ -32,12 +32,10 @@ install the `openkim-models` package
If you have problems with the installation you can post issues to
`this link <conda_forge_lammps_>`_.
.. _conda_forge_lammps: https://github.com/conda-forge/lammps-feedstock/issues
Thanks to Jan Janssen (Max-Planck-Institut für Eisenforschung) for setting
Thanks to Jan Janssen (Max-Planck-Institut fuer Eisenforschung) for setting
up the Conda capability.
.. _conda_forge_lammps: https://github.com/conda-forge/lammps-feedstock/issues
.. _openkim: https://openkim.org
@ -45,9 +43,6 @@ up the Conda capability.
.. _mini_conda_install: https://docs.conda.io/en/latest/miniconda.html
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,22 +1,22 @@
.. index:: angle\_style charmm
.. index:: angle_style charmm
angle\_style charmm command
===========================
angle_style charmm command
==========================
angle\_style charmm/intel command
=================================
angle_style charmm/intel command
================================
angle\_style charmm/kk command
angle_style charmm/kk command
=============================
angle_style charmm/omp command
==============================
angle\_style charmm/omp command
===============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style charmm
@ -24,7 +24,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style charmm
angle_coeff 1 300.0 107.0 50.0 3.0
@ -34,12 +34,15 @@ Description
The *charmm* angle style uses the potential
.. image:: Eqs/angle_charmm.jpg
:align: center
.. math::
with an additional Urey\_Bradley term based on the distance *r* between
the 1st and 3rd atoms in the angle. K, theta0, Kub, and Rub are
coefficients defined for each angle type.
E = K (\theta - \theta_0)^2 + K_{ub} (r - r_{ub})^2
with an additional Urey\_Bradley term based on the distance :math:`r` between
the 1st and 3rd atoms in the angle. :math:`K`, :math:`\theta_0`,
:math:`K_{ub}`, and :math:`R_{ub}` are coefficients defined for each angle
type.
See :ref:`(MacKerell) <angle-MacKerell>` for a description of the CHARMM force
field.
@ -49,13 +52,13 @@ The following coefficients must be defined for each angle type via the
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/radian\^2)
* theta0 (degrees)
* K\_ub (energy/distance\^2)
* r\_ub (distance)
* :math:`K` (energy/radian\^2)
* :math:`\theta_0` (degrees)
* :math:`K_{ub}` (energy/distance\^2)
* :math:`r_{ub}` (distance)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
----------
@ -108,8 +111,3 @@ Related commands
**(MacKerell)** MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field,
Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,22 +1,22 @@
.. index:: angle\_style class2
.. index:: angle_style class2
angle\_style class2 command
===========================
angle_style class2 command
==========================
angle\_style class2/kk command
angle_style class2/kk command
=============================
angle_style class2/omp command
==============================
angle\_style class2/omp command
===============================
angle\_style class2/p6 command
==============================
angle_style class2/p6 command
=============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style class2
@ -24,44 +24,49 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style class2
angle_coeff \* 75.0
angle_coeff * 75.0
angle_coeff 1 bb 10.5872 1.0119 1.5228
angle_coeff \* ba 3.6551 24.895 1.0119 1.5228
angle_coeff * ba 3.6551 24.895 1.0119 1.5228
Description
"""""""""""
The *class2* angle style uses the potential
.. image:: Eqs/angle_class2.jpg
:align: center
.. math::
where Ea is the angle term, Ebb is a bond-bond term, and Eba is a
bond-angle term. Theta0 is the equilibrium angle and r1 and r2 are
E & = E_a + E_{bb} + E_{ba} \\
E_a & = K_2 (\theta - \theta_0)^2 + K_3 (\theta - \theta_0)^3 + K_4(\theta - \theta_0)^4 \\
E_{bb} & = M (r_{ij} - r_1) (r_{jk} - r_2) \\
E_{ba} & = N_1 (r_{ij} - r_1) (\theta - \theta_0) + N_2(r_{jk} - r_2)(\theta - \theta_0)
where :math:`E_a` is the angle term, :math:`E_{bb}` is a bond-bond term, and :math:`E_{ba}` is a
bond-angle term. :math:`\theta_0` is the equilibrium angle and :math:`r_1` and :math:`r_2` are
the equilibrium bond lengths.
See :ref:`(Sun) <angle-Sun>` for a description of the COMPASS class2 force field.
Coefficients for the Ea, Ebb, and Eba formulas must be defined for
Coefficients for the :math:`E_a`, :math:`E_{bb}`, and :math:`E_{ba}` formulas must be defined for
each angle type via the :doc:`angle\_coeff <angle_coeff>` command as in
the example above, or in the data file or restart files read by the
:doc:`read\_data <read_data>` or :doc:`read\_restart <read_restart>`
commands.
These are the 4 coefficients for the Ea formula:
These are the 4 coefficients for the :math:`E_a` formula:
* theta0 (degrees)
* K2 (energy/radian\^2)
* K3 (energy/radian\^3)
* K4 (energy/radian\^4)
* :math:`\theta_0` (degrees)
* :math:`K_2` (energy/radian\^2)
* :math:`K_3` (energy/radian\^3)
* :math:`K_4` (energy/radian\^4)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of the various K are in per-radian.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of the various :math:`K` are in per-radian.
For the Ebb formula, each line in a :doc:`angle\_coeff <angle_coeff>`
For the :math:`E_{bb}` formula, each line in a :doc:`angle\_coeff <angle_coeff>`
command in the input script lists 4 coefficients, the first of which
is "bb" to indicate they are BondBond coefficients. In a data file,
these coefficients should be listed under a "BondBond Coeffs" heading
@ -69,11 +74,11 @@ and you must leave out the "bb", i.e. only list 3 coefficients after
the angle type.
* bb
* M (energy/distance\^2)
* r1 (distance)
* r2 (distance)
* :math:`M` (energy/distance\^2)
* :math:`r_1` (distance)
* :math:`r_2` (distance)
For the Eba formula, each line in a :doc:`angle\_coeff <angle_coeff>`
For the :math:`E_{ba}` formula, each line in a :doc:`angle\_coeff <angle_coeff>`
command in the input script lists 5 coefficients, the first of which
is "ba" to indicate they are BondAngle coefficients. In a data file,
these coefficients should be listed under a "BondAngle Coeffs" heading
@ -81,13 +86,13 @@ and you must leave out the "ba", i.e. only list 4 coefficients after
the angle type.
* ba
* N1 (energy/distance\^2)
* N2 (energy/distance\^2)
* r1 (distance)
* r2 (distance)
* :math:`N_1` (energy/distance\^2)
* :math:`N_2` (energy/distance\^2)
* :math:`r_1` (distance)
* :math:`r_2` (distance)
The theta0 value in the Eba formula is not specified, since it is the
same value from the Ea formula.
The :math:`\theta_0` value in the :math:`E_{ba}` formula is not specified,
since it is the same value from the :math:`E_a` formula.
----------
@ -117,17 +122,19 @@ instructions on how to use the accelerated styles effectively.
The *class2/p6* angle style uses the *class2* potential expanded to sixth order:
.. image:: Eqs/angle_class2_p6.jpg
:align: center
.. math::
In this expanded term 6 coefficients for the Ea formula need to be set:
E_{a} = K_2\left(\theta - \theta_0\right)^2 + K_3\left(\theta - \theta_0\right)^3 + K_4\left(\theta - \theta_0\right)^4 + K_5\left(\theta - \theta_0\right)^5 + K_6\left(\theta - \theta_0\right)^6
* theta0 (degrees)
* K2 (energy/radian\^2)
* K3 (energy/radian\^3)
* K4 (energy/radian\^4)
* K5 (energy/radian\^5)
* K6 (energy/radian\^6)
In this expanded term 6 coefficients for the :math:`E_a` formula need to be set:
* :math:`\theta_0` (degrees)
* :math:`K_2` (energy/radian\^2)
* :math:`K_3` (energy/radian\^3)
* :math:`K_4` (energy/radian\^4)
* :math:`K_5` (energy/radian\^5)
* :math:`K_6` (energy/radian\^6)
The bond-bond and bond-angle terms remain unchanged.
@ -160,8 +167,3 @@ Related commands
**(Sun)** Sun, J Phys Chem B 102, 7338-7364 (1998).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_coeff
.. index:: angle_coeff
angle\_coeff command
====================
angle_coeff command
===================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_coeff N args
@ -18,11 +18,11 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_coeff 1 300.0 107.0
angle_coeff \* 5.0
angle_coeff 2\*10 5.0
angle_coeff * 5.0
angle_coeff 2*10 5.0
Description
"""""""""""
@ -30,7 +30,7 @@ Description
Specify the angle force field coefficients for one or more angle types.
The number and meaning of the coefficients depends on the angle style.
Angle coefficients can also be set in the data file read by the
:doc:`read\_data <read_data>` command or in a restart file.
:doc:`read_data <read_data>` command or in a restart file.
N can be specified in one of two ways. An explicit numeric value can
be used, as in the 1st example above. Or a wild-card asterisk can be
@ -41,18 +41,18 @@ leading asterisk means all types from 1 to n (inclusive). A trailing
asterisk means all types from n to N (inclusive). A middle asterisk
means all types from m to n (inclusive).
Note that using an angle\_coeff command can override a previous setting
Note that using an :doc:`angle_coeff <angle_coeff>` command can override a previous setting
for the same angle type. For example, these commands set the coeffs
for all angle types, then overwrite the coeffs for just angle type 2:
.. parsed-literal::
.. code-block:: LAMMPS
angle_coeff \* 200.0 107.0 1.2
angle_coeff * 200.0 107.0 1.2
angle_coeff 2 50.0 107.0
A line in a data file that specifies angle coefficients uses the exact
same format as the arguments of the angle\_coeff command in an input
same format as the arguments of the :doc:`angle_coeff <angle_coeff>` command in an input
script, except that wild-card asterisks should not be used since
coefficients for all N types must be listed in the file. For example,
under the "Angle Coeffs" section of a data file, the line that
@ -63,7 +63,7 @@ corresponds to the 1st example above would be listed as
1 300.0 107.0
The :doc:`angle\_style class2 <angle_class2>` is an exception to this
The :doc:`angle_style class2 <angle_class2>` is an exception to this
rule, in that an additional argument is used in the input script to
allow specification of the cross-term coefficients. See its
doc page for details.
@ -73,13 +73,13 @@ doc page for details.
The list of all angle styles defined in LAMMPS is given on the
:doc:`angle\_style <angle_style>` doc page. They are also listed in more
:doc:`angle_style <angle_style>` doc page. They are also listed in more
compact form on the :ref:`Commands angle <angle>` doc
page.
On either of those pages, click on the style to display the formula it
computes and its coefficients as specified by the associated
angle\_coeff command.
:doc:`angle_coeff <angle_coeff>` command.
----------
@ -90,8 +90,8 @@ Restrictions
This command must come after the simulation box is defined by a
:doc:`read\_data <read_data>`, :doc:`read\_restart <read_restart>`, or
:doc:`create\_box <create_box>` command.
:doc:`read_data <read_data>`, :doc:`read_restart <read_restart>`, or
:doc:`create_box <create_box>` command.
An angle style must be defined before any angle coefficients are
set, either in the input script or in a data file.
@ -99,11 +99,6 @@ set, either in the input script or in a data file.
Related commands
""""""""""""""""
:doc:`angle\_style <angle_style>`
:doc:`angle_style <angle_style>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,19 +1,19 @@
.. index:: angle\_style cosine
.. index:: angle_style cosine
angle\_style cosine command
===========================
angle_style cosine command
==========================
angle\_style cosine/omp command
===============================
angle\_style cosine/kk command
angle_style cosine/omp command
==============================
angle_style cosine/kk command
=============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine
@ -21,27 +21,29 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine
angle_coeff \* 75.0
angle_coeff * 75.0
Description
"""""""""""
The *cosine* angle style uses the potential
.. image:: Eqs/angle_cosine.jpg
:align: center
.. math::
where K is defined for each angle type.
E = K [1 + \cos(\theta)]
where :math:`K` is defined for each angle type.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy)
* :math:`K` (energy)
----------
@ -83,8 +85,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style cosine/buck6d
.. index:: angle_style cosine/buck6d
angle\_style cosine/buck6d command
==================================
angle_style cosine/buck6d command
=================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/buck6d
@ -15,7 +15,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/buck6d
angle_coeff 1 cosine/buck6d 1.978350 4 180.000000
@ -25,22 +25,23 @@ Description
The *cosine/buck6d* angle style uses the potential
.. image:: Eqs/angle_cosine_buck6d.jpg
:align: center
.. math::
where K is the energy constant, n is the periodic multiplicity and
Theta0 is the equilibrium angle.
E = K \left[ 1 + \cos(n\theta - \theta_0)\right]
where :math:`K` is the energy constant, :math:`n` is the periodic multiplicity and
:math:`\theta_0` is the equilibrium angle.
The coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands in the following order:
* K (energy)
* n
* Theta0 (degrees)
* :math:`K` (energy)
* :math:`n`
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally.
Additional to the cosine term the *cosine/buck6d* angle style computes
@ -73,8 +74,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style cosine/delta
.. index:: angle_style cosine/delta
angle\_style cosine/delta command
=================================
angle_style cosine/delta command
================================
angle\_style cosine/delta/omp command
=====================================
angle_style cosine/delta/omp command
====================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/delta
@ -18,31 +18,33 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/delta
angle_coeff 2\*4 75.0 100.0
angle_coeff 2*4 75.0 100.0
Description
"""""""""""
The *cosine/delta* angle style uses the potential
.. image:: Eqs/angle_cosine_delta.jpg
:align: center
.. math::
where theta0 is the equilibrium value of the angle, and K is a
prefactor. Note that the usual 1/2 factor is included in K.
E = K [1 - \cos(\theta - \theta_0)]
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K` is a
prefactor. Note that the usual 1/2 factor is included in :math:`K`.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy)
* theta0 (degrees)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally.
@ -85,8 +87,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`, :doc:`angle\_style cosine/squared <angle_cosine_squared>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style cosine/periodic
.. index:: angle_style cosine/periodic
angle\_style cosine/periodic command
====================================
angle_style cosine/periodic command
===================================
angle\_style cosine/periodic/omp command
========================================
angle_style cosine/periodic/omp command
=======================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/periodic
@ -18,24 +18,26 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/periodic
angle_coeff \* 75.0 1 6
angle_coeff * 75.0 1 6
Description
"""""""""""
The *cosine/periodic* angle style uses the following potential, which
is commonly used in the :doc:`DREIDING <Howto_bioFF>` force field,
particularly for organometallic systems where *n* = 4 might be used
for an octahedral complex and *n* = 3 might be used for a trigonal
particularly for organometallic systems where :math:`n` = 4 might be used
for an octahedral complex and :math:`n` = 3 might be used for a trigonal
center:
.. image:: Eqs/angle_cosine_periodic.jpg
:align: center
.. math::
where C, B and n are coefficients defined for each angle type.
E = C \left[ 1 - B(-1)^n\cos\left( n\theta\right) \right]
where :math:`C`, :math:`B` and :math:`n` are coefficients defined for each angle type.
See :ref:`(Mayo) <cosine-Mayo>` for a description of the DREIDING force field
@ -44,13 +46,13 @@ The following coefficients must be defined for each angle type via the
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* C (energy)
* B = 1 or -1
* n = 1, 2, 3, 4, 5 or 6 for periodicity
* :math:`C` (energy)
* :math:`B` = 1 or -1
* :math:`n` = 1, 2, 3, 4, 5 or 6 for periodicity
Note that the prefactor C is specified and not the overall force
constant K = C / n\^2. When B = 1, it leads to a minimum for the
linear geometry. When B = -1, it leads to a maximum for the linear
Note that the prefactor :math:`C` is specified and not the overall force
constant :math:`K = \frac{C}{n^2}`. When :math:`B = 1`, it leads to a minimum for the
linear geometry. When :math:`B = -1`, it leads to a maximum for the linear
geometry.
@ -104,8 +106,3 @@ Related commands
**(Mayo)** Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
(1990).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style cosine/shift
.. index:: angle_style cosine/shift
angle\_style cosine/shift command
angle_style cosine/shift command
=================================
angle\_style cosine/shift/omp command
=====================================
angle_style cosine/shift/omp command
====================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/shift
@ -18,30 +18,33 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/shift
angle_coeff \* 10.0 45.0
angle_coeff * 10.0 45.0
Description
"""""""""""
The *cosine/shift* angle style uses the potential
.. image:: Eqs/angle_cosine_shift.jpg
:align: center
.. math::
where theta0 is the equilibrium angle. The potential is bounded
between -Umin and zero. In the neighborhood of the minimum E=- Umin +
Umin/4(theta-theta0)\^2 hence the spring constant is umin/2.
E = -\frac{U_{\text{min}}}{2} \left[ 1 + \cos(\theta-\theta_0) \right]
where :math:`\theta_0` is the equilibrium angle. The potential is bounded
between :math:`-U_{\text{min}}` and zero. In the neighborhood of the minimum
:math:`E = - U_{\text{min}} + U_{\text{min}}/4(\theta - \theta_0)^2` hence
the spring constant is :math:`\frac{U_{\text{min}}}{2}`.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* umin (energy)
* theta (angle)
* :math:`U_{\text{min}}` (energy)
* :math:`\theta` (angle)
----------
@ -83,8 +86,3 @@ Related commands
:doc:`angle\_cosine\_shift\_exp <angle_cosine_shift_exp>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style cosine/shift/exp
.. index:: angle_style cosine/shift/exp
angle\_style cosine/shift/exp command
=====================================
angle_style cosine/shift/exp command
====================================
angle\_style cosine/shift/exp/omp command
=========================================
angle_style cosine/shift/exp/omp command
========================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/shift/exp
@ -18,32 +18,33 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/shift/exp
angle_coeff \* 10.0 45.0 2.0
angle_coeff * 10.0 45.0 2.0
Description
"""""""""""
The *cosine/shift/exp* angle style uses the potential
.. image:: Eqs/angle_cosine_shift_exp.jpg
:align: center
.. math::
where Umin, theta, and a are defined for each angle type.
E = -U_{\text{min}} \frac{e^{-a U(\theta,\theta_0)}-1}{e^a-1} \quad \text{with} \quad U(\theta,\theta_0) = -0.5 \left(1+\cos(\theta-\theta_0) \right)
The potential is bounded between [-Umin:0] and the minimum is
located at the angle theta0. The a parameter can be both positive or
where :math:`U_{\text{min}}`, :math:`\theta`, and :math:`a` are defined for each angle type.
The potential is bounded between :math:`[-U_{\text{min}}, 0]` and the minimum is
located at the angle :math:`\theta_0`. The a parameter can be both positive or
negative and is used to control the spring constant at the
equilibrium.
The spring constant is given by k = A exp(A) Umin / [2 (Exp(a)-1)].
For a > 3, k/Umin = a/2 to better than 5% relative error. For negative
values of the a parameter, the spring constant is essentially zero,
The spring constant is given by :math:`k = A \exp(A) U_{\text{min}} / [2 (\exp(a)-1)]`.
For :math:`a > 3`, :math:`\frac{k}{U_{\text{min}}} = \frac{a}{2}` to better than 5% relative error. For negative
values of the :math:`a` parameter, the spring constant is essentially zero,
and anharmonic terms takes over. The potential is furthermore well
behaved in the limit a -> 0, where it has been implemented to linear
order in a for a < 0.001. In this limit the potential reduces to the
behaved in the limit :math:`a \rightarrow 0`, where it has been implemented to linear
order in :math:`a` for :math:`a < 0.001`. In this limit the potential reduces to the
cosineshifted potential.
The following coefficients must be defined for each angle type via the
@ -51,9 +52,9 @@ The following coefficients must be defined for each angle type via the
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* umin (energy)
* theta (angle)
* A (real number)
* :math:`U_min` (energy)
* :math:`\theta` (angle)
* :math:`A` (real number)
----------
@ -97,8 +98,3 @@ Related commands
:doc:`dihedral\_cosine\_shift\_exp <dihedral_cosine_shift_exp>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style cosine/squared
.. index:: angle_style cosine/squared
angle\_style cosine/squared command
===================================
angle_style cosine/squared command
==================================
angle\_style cosine/squared/omp command
=======================================
angle_style cosine/squared/omp command
======================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/squared
@ -18,31 +18,33 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cosine/squared
angle_coeff 2\*4 75.0 100.0
angle_coeff 2*4 75.0 100.0
Description
"""""""""""
The *cosine/squared* angle style uses the potential
.. image:: Eqs/angle_cosine_squared.jpg
:align: center
.. math::
where theta0 is the equilibrium value of the angle, and K is a
prefactor. Note that the usual 1/2 factor is included in K.
E = K [\cos(\theta) - \cos(\theta_0)]^2
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K` is a
prefactor. Note that the usual 1/2 factor is included in :math:`K`.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy)
* theta0 (degrees)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally.
@ -85,8 +87,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style cross
.. index:: angle_style cross
angle\_style cross command
angle_style cross command
==========================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cross
@ -15,7 +15,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style cross
angle_coeff 1 200.0 100.0 100.0 1.25 1.25 107.0
@ -26,13 +26,14 @@ Description
The *cross* angle style uses a potential that couples the bond stretches of
a bend with the angle stretch of that bend:
.. image:: Eqs/angle_cross.jpg
:align: center
.. math::
where r12,0 is the rest value of the bond length between atom 1 and 2,
r32,0 is the rest value of the bond length between atom 2 and 2,
and theta0 is the rest value of the angle. KSS is the force constant of
the bond stretch-bond stretch term and KBS0 and KBS1 are the force constants
E = K_{SS} \left(r_{12}-r_{12,0}\right)\left(r_{32}-r_{32,0}\right) + K_{BS0}\left(r_{12}-r_{12,0}\right)\left(\theta-\theta_0\right) + K_{BS1}\left(r_{32}-r_{32,0}\right)\left(\theta-\theta_0\right)
where :math:`r_{12,0}` is the rest value of the bond length between atom 1 and 2,
:math:`r_{32,0}` is the rest value of the bond length between atom 3 and 2,
and :math:`\theta_0` is the rest value of the angle. :math:`K_{SS}` is the force constant of
the bond stretch-bond stretch term and :math:`K_{BS0}` and :math:`K_{BS1}` are the force constants
of the bond stretch-angle stretch terms.
The following coefficients must be defined for each angle type via the
@ -40,15 +41,15 @@ The following coefficients must be defined for each angle type via the
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* KSS (energy/distance\^2)
* KBS0 (energy/distance/rad)
* KBS1 (energy/distance/rad)
* r12,0 (distance)
* r32,0 (distance)
* theta0 (degrees)
* :math:`K_{SS}` (energy/distance\^2)
* :math:`K_{BS0}` (energy/distance/rad)
* :math:`K_{BS1}` (energy/distance/rad)
* :math:`r_{12,0}` (distance)
* :math:`r_{32,0}` (distance)
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of KBS0 and KBS1 are in energy/distance/radian.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K_{BS0}` and :math:`K_{BS1}` are in energy/distance/radian.
Restrictions
""""""""""""
@ -64,12 +65,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
----------
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style dipole
.. index:: angle_style dipole
angle\_style dipole command
===========================
angle_style dipole command
==========================
angle\_style dipole/omp command
===============================
angle_style dipole/omp command
==============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style dipole
@ -18,7 +18,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style dipole
angle_coeff 6 2.1 180.0
@ -28,53 +28,63 @@ Description
The *dipole* angle style is used to control the orientation of a dipolar
atom within a molecule :ref:`(Orsi) <Orsi>`. Specifically, the *dipole* angle
style restrains the orientation of a point dipole mu\_j (embedded in atom
'j') with respect to a reference (bond) vector r\_ij = r\_i - r\_j, where 'i'
is another atom of the same molecule (typically, 'i' and 'j' are also
covalently bonded).
style restrains the orientation of a point dipole :math:`\mu_j` (embedded in atom
:math:`j`) with respect to a reference (bond) vector
:math:`\vec{r_{ij}} = \vec{r_i} - \vec{r_j}`, where :math:`i` is another atom of
the same molecule (typically, :math:`i` and :math:`j` are also covalently bonded).
It is convenient to define an angle gamma between the 'free' vector mu\_j
and the reference (bond) vector r\_ij:
It is convenient to define an angle gamma between the 'free' vector :math:`\vec{\mu_j}`
and the reference (bond) vector :math:`\vec{r_{ij}}`:
.. math::
\cos\gamma = \frac{\vec{\mu_j}\cdot\vec{r_{ij}}}{\mu_j\,r_{ij}}
.. image:: Eqs/angle_dipole_gamma.jpg
:align: center
The *dipole* angle style uses the potential:
.. image:: Eqs/angle_dipole_potential.jpg
:align: center
.. math::
where K is a rigidity constant and gamma0 is an equilibrium (reference)
E = K (\cos\gamma - \cos\gamma_0)^2
where :math:`K` is a rigidity constant and gamma0 is an equilibrium (reference)
angle.
The torque on the dipole can be obtained by differentiating the
potential using the 'chain rule' as in appendix C.3 of
:ref:`(Allen) <Allen1>`:
.. image:: Eqs/angle_dipole_torque.jpg
:align: center
.. math::
Example: if gamma0 is set to 0 degrees, the torque generated by
\vec{T_j} = \frac{2K(\cos\gamma - \cos\gamma_0)}{\mu_j\,r_{ij}}\, \vec{r_{ij}} \times \vec{\mu_j}
Example: if :math:`\gamma_0` is set to 0 degrees, the torque generated by
the potential will tend to align the dipole along the reference
direction defined by the (bond) vector r\_ij (in other words, mu\_j is
restrained to point towards atom 'i').
direction defined by the (bond) vector :math:`\vec{r_{ij}}` (in other words, :math:`\vec{\mu_j}` is
restrained to point towards atom :math:`i`).
The dipolar torque T\_j must be counterbalanced in order to conserve
The dipolar torque :math:`\vec{T_j}` must be counterbalanced in order to conserve
the local angular momentum. This is achieved via an additional force
couple generating a torque equivalent to the opposite of T\_j:
couple generating a torque equivalent to the opposite of :math:`\vec{T_j}`:
.. image:: Eqs/angle_dipole_couple.jpg
:align: center
.. math::
where F\_i and F\_j are applied on atoms i and j, respectively.
-\vec{T_j} & = \vec{r_{ij}} \times \vec{F_i} \\
\vec{F_j} & = -\vec{F_i}
where :math:`\vec{F_i}` and :math:`\vec{F_j}` are applied on atoms :math:`i`
and :math:`j`, respectively.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy)
* gamma0 (degrees)
* :math:`K` (energy)
* :math:`\gamma_0` (degrees)
----------
@ -108,17 +118,17 @@ page for more info.
.. note::
In the "Angles" section of the data file, the atom ID 'j'
In the "Angles" section of the data file, the atom ID :math:`j`
defining the direction of the dipole vector to restrain must come
before the atom ID of the reference atom 'i'. A third atom ID 'k' must
before the atom ID of the reference atom :math:`i`. A third atom ID :math:`k` must
also be provided to comply with the requirement of a valid angle
definition. This atom ID k should be chosen to be that of an atom
bonded to atom 'i' to avoid errors with "lost angle atoms" when running
definition. This atom ID :math:`k` should be chosen to be that of an atom
bonded to atom :math:`i` to avoid errors with "lost angle atoms" when running
in parallel. Since the LAMMPS code checks for valid angle definitions,
cannot use the same atom ID of either 'i' or 'j' (this was allowed
cannot use the same atom ID of either :math:`i` or :math:`j` (this was allowed
and recommended with older LAMMPS versions).
The "newton" command for intramolecular interactions must be "on"
The :doc:`newton <newton>` command for intramolecular interactions must be "on"
(which is the default except when using some accelerator packages).
This angle style should not be used with SHAKE.
@ -147,8 +157,3 @@ lipid membranes, PloS ONE 6(12): e28637, 2011.
**(Allen)** Allen & Tildesley, Computer Simulation of Liquids,
Clarendon Press, Oxford, 1987.
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,42 +1,46 @@
.. index:: angle\_style fourier
.. index:: angle_style fourier
angle\_style fourier command
============================
angle_style fourier command
===========================
angle\_style fourier/omp command
================================
angle_style fourier/omp command
===============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style fourier
Examples
""""""""
angle\_style fourier
angle\_coeff 75.0 1.0 1.0 1.0
.. code-block:: LAMMPS
angle_style fourier
angle_coeff 75.0 1.0 1.0 1.0
Description
"""""""""""
The *fourier* angle style uses the potential
.. image:: Eqs/angle_fourier.jpg
:align: center
.. math::
E = K [C_0 + C_1 \cos ( \theta) + C_2 \cos( 2 \theta) ]
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy)
* C0 (real)
* C1 (real)
* C2 (real)
* :math:`K` (energy)
* :math:`C_0` (real)
* :math:`C_1` (real)
* :math:`C_2` (real)
----------
@ -78,8 +82,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,41 +1,45 @@
.. index:: angle\_style fourier/simple
.. index:: angle_style fourier/simple
angle\_style fourier/simple command
===================================
angle_style fourier/simple command
==================================
angle\_style fourier/simple/omp command
=======================================
angle_style fourier/simple/omp command
======================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style fourier/simple
Examples
""""""""
angle\_style fourier/simple
angle\_coeff 100.0 -1.0 1.0
.. code-block:: LAMMPS
angle_style fourier/simple
angle_coeff 100.0 -1.0 1.0
Description
"""""""""""
The *fourier/simple* angle style uses the potential
.. image:: Eqs/angle_fourier_simple.jpg
:align: center
.. math::
E = K [ 1.0 + c \cos ( n \theta) ]
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy)
* c (real)
* n (real)
* :math:`K` (energy)
* :math:`c` (real)
* :math:`n` (real)
----------
@ -77,8 +81,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,22 +1,22 @@
.. index:: angle\_style harmonic
.. index:: angle_style harmonic
angle\_style harmonic command
=============================
angle_style harmonic command
============================
angle\_style harmonic/intel command
===================================
angle_style harmonic/intel command
==================================
angle\_style harmonic/kk command
angle_style harmonic/kk command
===============================
angle_style harmonic/omp command
================================
angle\_style harmonic/omp command
=================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style harmonic
@ -24,7 +24,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style harmonic
angle_coeff 1 300.0 107.0
@ -34,22 +34,24 @@ Description
The *harmonic* angle style uses the potential
.. image:: Eqs/angle_harmonic.jpg
:align: center
.. math::
where theta0 is the equilibrium value of the angle, and K is a
prefactor. Note that the usual 1/2 factor is included in K.
E = K (\theta - \theta_0)^2
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K` is a
prefactor. Note that the usual 1/2 factor is included in :math:`K`.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/radian\^2)
* theta0 (degrees)
* :math:`K` (energy/radian\^2)
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
----------
@ -91,8 +93,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style hybrid
.. index:: angle_style hybrid
angle\_style hybrid command
===========================
angle_style hybrid command
==========================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style hybrid style1 style2 ...
@ -17,11 +17,11 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style hybrid harmonic cosine
angle_coeff 1 harmonic 80.0 30.0
angle_coeff 2\* cosine 50.0
angle_coeff 2* cosine 50.0
Description
"""""""""""
@ -31,19 +31,19 @@ simulation. An angle style is assigned to each angle type. For
example, angles in a polymer flow (of angle type 1) could be computed
with a *harmonic* potential and angles in the wall boundary (of angle
type 2) could be computed with a *cosine* potential. The assignment
of angle type to style is made via the :doc:`angle\_coeff <angle_coeff>`
of angle type to style is made via the :doc:`angle_coeff <angle_coeff>`
command or in the data file.
In the angle\_coeff commands, the name of an angle style must be added
In the :doc:`angle_coeff <angle_coeff>` commands, the name of an angle style must be added
after the angle type, with the remaining coefficients being those
appropriate to that style. In the example above, the 2 angle\_coeff
commands set angles of angle type 1 to be computed with a *harmonic*
potential with coefficients 80.0, 30.0 for K, theta0. All other angle
types (2-N) are computed with a *cosine* potential with coefficient
50.0 for K.
potential with coefficients 80.0, 30.0 for :math:`K`, :math:`\theta_0`. All other angle
types :math:`(2 - N)` are computed with a *cosine* potential with coefficient
50.0 for :math:`K`.
If angle coefficients are specified in the data file read via the
:doc:`read\_data <read_data>` command, then the same rule applies.
:doc:`read_data <read_data>` command, then the same rule applies.
E.g. "harmonic" or "cosine", must be added after the angle type, for each
line in the "Angle Coeffs" section, e.g.
@ -77,7 +77,7 @@ input script, since BondBond (or BondAngle) coefficients need not be
specified at all for angle types that are not *class2*\ .
An angle style of *none* with no additional coefficients can be used
in place of an angle style, either in a input script angle\_coeff
in place of an angle style, either in a input script :doc:`angle_coeff <angle_coeff>`
command or in the data file, if you desire to turn off interactions
for specific angle types.
@ -95,16 +95,11 @@ for more info.
Unlike other angle styles, the hybrid angle style does not store angle
coefficient info for individual sub-styles in a :doc:`binary restart files <restart>`. Thus when restarting a simulation from a restart
file, you need to re-specify angle\_coeff commands.
file, you need to re-specify :doc:`angle_coeff <angle_coeff>` commands.
Related commands
""""""""""""""""
:doc:`angle\_coeff <angle_coeff>`
:doc:`angle_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style mm3
.. index:: angle_style mm3
angle\_style mm3 command
========================
angle_style mm3 command
=======================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style mm3
@ -15,7 +15,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style mm3
angle_coeff 1 100.0 107.0
@ -26,23 +26,25 @@ Description
The *mm3* angle style uses the potential that is anharmonic in the angle
as defined in :ref:`(Allinger) <mm3-allinger1989>`
.. image:: Eqs/angle_mm3.jpg
:align: center
.. math::
where theta0 is the equilibrium value of the angle, and K is a
prefactor. The anharmonic prefactors have units deg\^(-n), for example
-0.014 deg\^(-1), 5.6(10)\^(-5) deg\^(-2), ...
E = K (\theta - \theta_0)^2 \left[ 1 - 0.014(\theta - \theta_0) + 5.6(10)^{-5} (\theta - \theta_0)^2 - 7.0(10)^{-7} (\theta - \theta_0)^3 + 9(10)^{-10} (\theta - \theta_0)^4 \right]
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K` is a
prefactor. The anharmonic prefactors have units :math:`\deg^{-n}`, for example
:math:`-0.014 \deg^{-1}`, :math:`5.6 \cdot 10^{-5} \deg^{-2}`, ...
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/radian\^2)
* theta0 (degrees)
* :math:`K` (energy/radian\^2)
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
Restrictions
""""""""""""
@ -58,12 +60,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
----------
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style none
.. index:: angle_style none
angle\_style none command
=========================
angle_style none command
========================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style none
@ -15,7 +15,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style none
@ -24,23 +24,19 @@ Description
Using an angle style of none means angle forces and energies are not
computed, even if triplets of angle atoms were listed in the data file
read by the :doc:`read\_data <read_data>` command.
read by the :doc:`read_data <read_data>` command.
See the :doc:`angle\_style zero <angle_zero>` command for a way to
See the :doc:`angle_style zero <angle_zero>` command for a way to
calculate angle statistics, but compute no angle interactions.
Restrictions
""""""""""""
none
none
Related commands
""""""""""""""""
:doc:`angle\_style zero <angle_zero>`
:doc:`angle_style zero <angle_zero>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style quartic
.. index:: angle_style quartic
angle\_style quartic command
============================
angle_style quartic command
===========================
angle\_style quartic/omp command
================================
angle_style quartic/omp command
===============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style quartic
@ -18,7 +18,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style quartic
angle_coeff 1 129.1948 56.8726 -25.9442 -14.2221
@ -28,24 +28,26 @@ Description
The *quartic* angle style uses the potential
.. image:: Eqs/angle_quartic.jpg
:align: center
.. math::
where theta0 is the equilibrium value of the angle, and K is a
prefactor. Note that the usual 1/2 factor is included in K.
E = K_2 (\theta - \theta_0)^2 + K_3 (\theta - \theta_0)^3 + K_4 (\theta - \theta_0)^4
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K` is a
prefactor. Note that the usual 1/2 factor is included in :math:`K`.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* theta0 (degrees)
* K2 (energy/radian\^2)
* K3 (energy/radian\^3)
* K4 (energy/radian\^4)
* :math:`\theta_0` (degrees)
* :math:`K_2` (energy/radian\^2)
* :math:`K_3` (energy/radian\^3)
* :math:`K_4` (energy/radian\^4)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
----------
@ -87,8 +89,3 @@ Related commands
:doc:`angle\_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style sdk
.. index:: angle_style sdk
angle\_style sdk command
========================
angle_style sdk command
=======================
angle\_style sdk/omp command
============================
angle_style sdk/omp command
===========================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style sdk
@ -20,7 +20,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style sdk
angle_coeff 1 300.0 107.0
@ -30,25 +30,27 @@ Description
The *sdk* angle style is a combination of the harmonic angle potential,
.. image:: Eqs/angle_harmonic.jpg
:align: center
.. math::
where theta0 is the equilibrium value of the angle and K a prefactor,
E = K (\theta - \theta_0)^2
where :math:`\theta_0` is the equilibrium value of the angle and :math:`K` a prefactor,
with the *repulsive* part of the non-bonded *lj/sdk* pair style
between the atoms 1 and 3. This angle potential is intended for
coarse grained MD simulations with the CMM parameterization using the
:doc:`pair\_style lj/sdk <pair_sdk>`. Relative to the pair\_style
*lj/sdk*\ , however, the energy is shifted by *epsilon*\ , to avoid sudden
jumps. Note that the usual 1/2 factor is included in K.
jumps. Note that the usual 1/2 factor is included in :math:`K`.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above:
* K (energy/radian\^2)
* theta0 (degrees)
* :math:`K` (energy/radian\^2)
* :math:`\theta_0` (degrees)
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
The also required *lj/sdk* parameters will be extracted automatically
from the pair\_style.
@ -93,8 +95,3 @@ Related commands
:doc:`pair\_style lj/sdk/coul/long <pair_sdk>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style
.. index:: angle_style
angle\_style command
====================
angle_style command
===================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style style
@ -17,7 +17,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style harmonic
angle_style charmm
@ -29,19 +29,19 @@ Description
Set the formula(s) LAMMPS uses to compute angle interactions between
triplets of atoms, which remain in force for the duration of the
simulation. The list of angle triplets is read in by a
:doc:`read\_data <read_data>` or :doc:`read\_restart <read_restart>` command
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>` command
from a data or restart file.
Hybrid models where angles are computed using different angle
potentials can be setup using the *hybrid* angle style.
The coefficients associated with a angle style can be specified in a
data or restart file or via the :doc:`angle\_coeff <angle_coeff>` command.
data or restart file or via the :doc:`angle_coeff <angle_coeff>` command.
All angle potentials store their coefficient data in binary restart
files which means angle\_style and :doc:`angle\_coeff <angle_coeff>`
files which means angle_style and :doc:`angle_coeff <angle_coeff>`
commands do not need to be re-specified in an input script that
restarts a simulation. See the :doc:`read\_restart <read_restart>`
restarts a simulation. See the :doc:`read_restart <read_restart>`
command for details on how to do this. The one exception is that
angle\_style *hybrid* only stores the list of sub-styles in the restart
file; angle coefficients need to be re-specified.
@ -49,7 +49,7 @@ file; angle coefficients need to be re-specified.
.. note::
When both an angle and pair style is defined, the
:doc:`special\_bonds <special_bonds>` command often needs to be used to
:doc:`special_bonds <special_bonds>` command often needs to be used to
turn off (or weight) the pairwise interaction that would otherwise
exist between 3 bonded atoms.
@ -62,11 +62,11 @@ between the 3 atoms in the angle.
Here is an alphabetic list of angle styles defined in LAMMPS. Click on
the style to display the formula it computes and coefficients
specified by the associated :doc:`angle\_coeff <angle_coeff>` command.
specified by the associated :doc:`angle_coeff <angle_coeff>` command.
Click on the style to display the formula it computes, any additional
arguments specified in the angle\_style command, and coefficients
specified by the associated :doc:`angle\_coeff <angle_coeff>` command.
specified by the associated :doc:`angle_coeff <angle_coeff>` command.
There are also additional accelerated pair styles included in the
LAMMPS distribution for faster performance on CPUs, GPUs, and KNLs.
@ -115,17 +115,12 @@ individual bond potentials tell if it is part of a package.
Related commands
""""""""""""""""
:doc:`angle\_coeff <angle_coeff>`
:doc:`angle_coeff <angle_coeff>`
Default
"""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: angle\_style table
.. index:: angle_style table
angle\_style table command
==========================
angle_style table command
=========================
angle\_style table/omp command
==============================
angle_style table/omp command
=============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style table style N
@ -21,7 +21,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style table linear 1000
angle_coeff 3 file.table ENTRY1
@ -31,7 +31,7 @@ Description
Style *table* creates interpolation tables of length *N* from angle
potential and derivative values listed in a file(s) as a function of
angle The files are read by the :doc:`angle\_coeff <angle_coeff>`
angle The files are read by the :doc:`angle_coeff <angle_coeff>`
command.
The interpolation tables are created by fitting cubic splines to the
@ -50,7 +50,7 @@ find the appropriate set of coefficients which are used to evaluate a
cubic polynomial which computes the energy or derivative.
The following coefficients must be defined for each angle type via the
:doc:`angle\_coeff <angle_coeff>` command as in the example above.
:doc:`angle_coeff <angle_coeff>` command as in the example above.
* filename
* keyword
@ -85,13 +85,13 @@ A section begins with a non-blank line whose 1st character is not a
between sections. The first line begins with a keyword which
identifies the section. The line can contain additional text, but the
initial text must match the argument specified in the
:doc:`angle\_coeff <angle_coeff>` command. The next line lists (in any
:doc:`angle_coeff <angle_coeff>` command. The next line lists (in any
order) one or more parameters for the table. Each parameter is a
keyword followed by one or more numeric values.
The parameter "N" is required and its value is the number of table
entries that follow. Note that this may be different than the *N*
specified in the :doc:`angle\_style table <angle_style>` command. Let
specified in the :doc:`angle_style table <angle_style>` command. Let
Ntable = *N* in the angle\_style command, and Nfile = "N" in the
tabulated file. What LAMMPS does is a preliminary interpolation by
creating splines using the Nfile tabulated values as nodal points. It
@ -176,11 +176,6 @@ for more info.
Related commands
""""""""""""""""
:doc:`angle\_coeff <angle_coeff>`
:doc:`angle_coeff <angle_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: angle\_style zero
.. index:: angle_style zero
angle\_style zero command
=========================
angle_style zero command
========================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style zero *nocoeff*
@ -15,12 +15,12 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
angle_style zero
angle_style zero nocoeff
angle_coeff \*
angle_coeff \* 120.0
angle_coeff *
angle_coeff * 120.0
Description
"""""""""""
@ -32,14 +32,14 @@ other commands.
As an example, the :doc:`compute angle/local <compute_angle_local>`
command can be used to compute the theta values for the list of
triplets of angle atoms listed in the data file read by the
:doc:`read\_data <read_data>` command. If no angle style is defined,
:doc:`read_data <read_data>` command. If no angle style is defined,
this command cannot be used.
The optional *nocoeff* flag allows to read data files with AngleCoeff
section for any angle style. Similarly, any angle\_coeff commands
section for any angle style. Similarly, any :doc:`angle_coeff <angle_coeff>` commands
will only be checked for the angle type number and the rest ignored.
Note that the :doc:`angle\_coeff <angle_coeff>` command must be used for
Note that the :doc:`angle_coeff <angle_coeff>` command must be used for
all angle types. If specified, there can be only one value, which is
going to be used to assign an equilibrium angle, e.g. for use with
:doc:`fix shake <fix_shake>`.
@ -51,11 +51,6 @@ Restrictions
Related commands
""""""""""""""""
:doc:`angle\_style none <angle_none>`
:doc:`angle_style none <angle_none>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: atom\_modify
.. index:: atom_modify
atom\_modify command
====================
atom_modify command
===================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
atom_modify keyword values ...
@ -29,7 +29,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
atom_modify map yes
atom_modify map hash sort 10000 2.0
@ -188,8 +188,3 @@ defined, sorting will be turned off.
**(Meloni)** Meloni, Rosati and Colombo, J Chem Phys, 126, 121102 (2007).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: atom\_style
.. index:: atom_style
atom\_style command
===================
atom_style command
==================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
atom_style style args
@ -33,7 +33,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
atom_style atomic
atom_style bond
@ -371,8 +371,3 @@ atom\_style atomic
**(Grime)** Grime and Voth, to appear in J Chem Theory & Computation
(2014).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,19 +1,19 @@
.. index:: bond\_style class2
.. index:: bond_style class2
bond\_style class2 command
==========================
bond_style class2 command
=========================
bond\_style class2/omp command
==============================
bond\_style class2/kk command
bond_style class2/omp command
=============================
bond_style class2/kk command
============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style class2
@ -21,7 +21,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style class2
bond_coeff 1 1.0 100.0 80.0 80.0
@ -31,10 +31,12 @@ Description
The *class2* bond style uses the potential
.. image:: Eqs/bond_class2.jpg
:align: center
.. math::
where r0 is the equilibrium bond distance.
E = K_2 (r - r_0)^2 + K_3 (r - r_0)^3 + K_4 (r - r_0)^4
where :math:`r_0` is the equilibrium bond distance.
See :ref:`(Sun) <bond-Sun>` for a description of the COMPASS class2 force field.
@ -43,10 +45,10 @@ The following coefficients must be defined for each bond type via the
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* R0 (distance)
* K2 (energy/distance\^2)
* K3 (energy/distance\^3)
* K4 (energy/distance\^4)
* :math:`r_0` (distance)
* :math:`K_2` (energy/distance\^2)
* :math:`K_3` (energy/distance\^3)
* :math:`K_4` (energy/distance\^4)
----------
@ -98,8 +100,3 @@ Related commands
**(Sun)** Sun, J Phys Chem B 102, 7338-7364 (1998).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,13 +1,13 @@
.. index:: bond\_coeff
.. index:: bond_coeff
bond\_coeff command
===================
bond_coeff command
==================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_coeff N args
@ -18,11 +18,11 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_coeff 5 80.0 1.2
bond_coeff \* 30.0 1.5 1.0 1.0
bond_coeff 1\*4 30.0 1.5 1.0 1.0
bond_coeff * 30.0 1.5 1.0 1.0
bond_coeff 1*4 30.0 1.5 1.0 1.0
bond_coeff 1 harmonic 200.0 1.0
Description
@ -47,9 +47,9 @@ for the same bond type. For example, these commands set the coeffs
for all bond types, then overwrite the coeffs for just bond type 2:
.. parsed-literal::
.. code-block:: LAMMPS
bond_coeff \* 100.0 1.2
bond_coeff * 100.0 1.2
bond_coeff 2 200.0 1.2
A line in a data file that specifies bond coefficients uses the exact
@ -97,8 +97,3 @@ Related commands
:doc:`bond\_style <bond_style>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,22 +1,22 @@
.. index:: bond\_style fene
.. index:: bond_style fene
bond\_style fene command
========================
bond_style fene command
=======================
bond\_style fene/intel command
==============================
bond_style fene/intel command
=============================
bond\_style fene/kk command
bond_style fene/kk command
==========================
bond_style fene/omp command
===========================
bond\_style fene/omp command
============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style fene
@ -24,7 +24,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style fene
bond_coeff 1 30.0 1.5 1.0 1.0
@ -34,24 +34,26 @@ Description
The *fene* bond style uses the potential
.. image:: Eqs/bond_fene.jpg
:align: center
.. math::
E = -0.5 K R_0^2 \ln \left[ 1 - \left(\frac{r}{R_0}\right)^2\right] + 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^6 \right] + \epsilon
to define a finite extensible nonlinear elastic (FENE) potential
:ref:`(Kremer) <fene-Kremer>`, used for bead-spring polymer models. The first
term is attractive, the 2nd Lennard-Jones term is repulsive. The
first term extends to R0, the maximum extent of the bond. The 2nd
term is cutoff at 2\^(1/6) sigma, the minimum of the LJ potential.
first term extends to :math:`R_0`, the maximum extent of the bond. The 2nd
term is cutoff at :math:`2^\frac{1}{6} \sigma`, the minimum of the LJ potential.
The following coefficients must be defined for each bond type via the
:doc:`bond\_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/distance\^2)
* R0 (distance)
* epsilon (energy)
* sigma (distance)
* :math:`K` (energy/distance\^2)
* :math:`R_0` (distance)
* :math:`\epsilon` (energy)
* :math:`\sigma` (distance)
----------
@ -107,8 +109,3 @@ Related commands
**(Kremer)** Kremer, Grest, J Chem Phys, 92, 5057 (1990).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: bond\_style fene/expand
.. index:: bond_style fene/expand
bond\_style fene/expand command
===============================
bond_style fene/expand command
==============================
bond\_style fene/expand/omp command
===================================
bond_style fene/expand/omp command
==================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style fene/expand
@ -18,7 +18,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style fene/expand
bond_coeff 1 30.0 1.5 1.0 1.0 0.5
@ -28,29 +28,30 @@ Description
The *fene/expand* bond style uses the potential
.. image:: Eqs/bond_fene_expand.jpg
:align: center
.. math::
E = -0.5 K R_0^2 \ln \left[1 -\left( \frac{\left(r - \Delta\right)}{R_0}\right)^2 \right] + 4 \epsilon \left[ \left(\frac{\sigma}{\left(r - \Delta\right)}\right)^{12} - \left(\frac{\sigma}{\left(r - \Delta\right)}\right)^6 \right] + \epsilon
to define a finite extensible nonlinear elastic (FENE) potential
:ref:`(Kremer) <feneexpand-Kremer>`, used for bead-spring polymer models. The first
term is attractive, the 2nd Lennard-Jones term is repulsive.
The *fene/expand* bond style is similar to *fene* except that an extra
shift factor of delta (positive or negative) is added to *r* to
shift factor of :math:`\Delta` (positive or negative) is added to :math:`r` to
effectively change the bead size of the bonded atoms. The first term
now extends to R0 + delta and the 2nd term is cutoff at 2\^(1/6) sigma
+ delta.
now extends to :math:`R_0 + \Delta` and the 2nd term is cutoff at :math:`2^\frac{1}{6} \sigma + \Delta`.
The following coefficients must be defined for each bond type via the
:doc:`bond\_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/distance\^2)
* R0 (distance)
* epsilon (energy)
* sigma (distance)
* delta (distance)
* :math:`K` (energy/distance\^2)
* :math:`R_0` (distance)
* :math:`\epsilon` (energy)
* :math:`\sigma` (distance)
* :math:`\Delta` (distance)
----------
@ -106,8 +107,3 @@ Related commands
**(Kremer)** Kremer, Grest, J Chem Phys, 92, 5057 (1990).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: bond\_style gromos
.. index:: bond_style gromos
bond\_style gromos command
==========================
bond_style gromos command
=========================
bond\_style gromos/omp command
==============================
bond_style gromos/omp command
=============================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style gromos
@ -18,7 +18,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style gromos
bond_coeff 5 80.0 1.2
@ -28,19 +28,21 @@ Description
The *gromos* bond style uses the potential
.. image:: Eqs/bond_gromos.jpg
:align: center
.. math::
where r0 is the equilibrium bond distance. Note that the usual 1/4
factor is included in K.
E = K (r^2 - r_0^2)^2
where :math:`r_0` is the equilibrium bond distance. Note that the usual 1/4
factor is included in :math:`K`.
The following coefficients must be defined for each bond type via the
:doc:`bond\_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/distance\^4)
* r0 (distance)
* :math:`K` (energy/distance\^4)
* :math:`r_0` (distance)
----------
@ -82,8 +84,3 @@ Related commands
:doc:`bond\_coeff <bond_coeff>`, :doc:`delete\_bonds <delete_bonds>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,22 +1,22 @@
.. index:: bond\_style harmonic
.. index:: bond_style harmonic
bond\_style harmonic command
============================
bond_style harmonic command
===========================
bond\_style harmonic/intel command
==================================
bond_style harmonic/intel command
=================================
bond\_style harmonic/kk command
bond_style harmonic/kk command
==============================
bond_style harmonic/omp command
===============================
bond\_style harmonic/omp command
================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style harmonic
@ -24,7 +24,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style harmonic
bond_coeff 5 80.0 1.2
@ -34,19 +34,21 @@ Description
The *harmonic* bond style uses the potential
.. image:: Eqs/bond_harmonic.jpg
:align: center
.. math::
where r0 is the equilibrium bond distance. Note that the usual 1/2
factor is included in K.
E = K (r - r_0)^2
where :math:`r_0` is the equilibrium bond distance. Note that the usual 1/2
factor is included in :math:`K`.
The following coefficients must be defined for each bond type via the
:doc:`bond\_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* K (energy/distance\^2)
* r0 (distance)
* :math:`K` (energy/distance\^2)
* :math:`r_0` (distance)
----------
@ -88,8 +90,3 @@ Related commands
:doc:`bond\_coeff <bond_coeff>`, :doc:`delete\_bonds <delete_bonds>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: bond\_style harmonic/shift
.. index:: bond_style harmonic/shift
bond\_style harmonic/shift command
==================================
bond_style harmonic/shift command
=================================
bond\_style harmonic/shift/omp command
======================================
bond_style harmonic/shift/omp command
=====================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style harmonic/shift
@ -18,7 +18,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style harmonic/shift
bond_coeff 5 10.0 0.5 1.0
@ -29,23 +29,25 @@ Description
The *harmonic/shift* bond style is a shifted harmonic bond that uses
the potential
.. image:: Eqs/bond_harmonic_shift.jpg
:align: center
.. math::
where r0 is the equilibrium bond distance, and rc the critical distance.
The potential is -Umin at r0 and zero at rc. The spring constant is
k = Umin / [ 2 (r0-rc)\^2].
E = \frac{U_{\text{min}}}{(r_0-r_c)^2} \left[ (r-r_0)^2-(r_c-r_0)^2 \right]
where :math:`r_0` is the equilibrium bond distance, and :math:`r_c` the critical distance.
The potential is :math:`-U_{\text{min}}` at :math:`r0` and zero at :math:`r_c`. The spring constant is
:math:`k = U_{\text{min}} / [ 2 (r_0-r_c)^2]`.
The following coefficients must be defined for each bond type via the
:doc:`bond\_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* Umin (energy)
* :math:`U_{\text{min}}` (energy)
* r0 (distance)
* :math:`r_0` (distance)
* rc (distance)
* :math:`r_c` (distance)
----------
@ -88,8 +90,3 @@ Related commands
:doc:`bond\_harmonic <bond_harmonic>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -1,16 +1,16 @@
.. index:: bond\_style harmonic/shift/cut
.. index:: bond_style harmonic/shift/cut
bond\_style harmonic/shift/cut command
======================================
bond_style harmonic/shift/cut command
=====================================
bond\_style harmonic/shift/cut/omp command
==========================================
bond_style harmonic/shift/cut/omp command
=========================================
Syntax
""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style harmonic/shift/cut
@ -18,7 +18,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
bond_style harmonic/shift/cut
bond_coeff 5 10.0 0.5 1.0
@ -29,21 +29,23 @@ Description
The *harmonic/shift/cut* bond style is a shifted harmonic bond that
uses the potential
.. image:: Eqs/bond_harmonic_shift_cut.jpg
:align: center
.. math::
where r0 is the equilibrium bond distance, and rc the critical distance.
The bond potential is zero for distances r > rc. The potential is -Umin
at r0 and zero at rc. The spring constant is k = Umin / [ 2 (r0-rc)\^2].
E = \frac{U_{\text{min}}}{(r_0-r_c)^2} \left[ (r-r_0)^2-(r_c-r_0)^2 \right]
where :math:`r_0` is the equilibrium bond distance, and rc the critical distance.
The bond potential is zero for distances :math:`r > r_c`. The potential is :math:`-U_{\text{min}}`
at :math:`r_0` and zero at :math:`r_c`. The spring constant is :math:`k = U_{\text{min}} / [ 2 (r_0-r_c)^2]`.
The following coefficients must be defined for each bond type via the
:doc:`bond\_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read\_data <read_data>`
or :doc:`read\_restart <read_restart>` commands:
* Umin (energy)
* r0 (distance)
* rc (distance)
* :math:`U_{\text{min}}` (energy)
* :math:`r_0` (distance)
* :math:`r_c` (distance)
----------
@ -87,8 +89,3 @@ Related commands
:doc:`bond\_harmonic\_shift <bond_harmonic_shift>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

Some files were not shown because too many files have changed in this diff Show More