1
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3
:link(lws,http://lammps.sandia.gov)
5
:link(lc,Section_commands.html#comm)
9
pair_style snap command :h3
18
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P :pre
22
Style {snap} computes interactions
23
using the spectral neighbor analysis potential (SNAP)
24
"(Thompson)"_#Thompson2014. Like the GAP framework of Bartok et al.
25
"(Bartok2010)"_#Bartok2010, "(Bartok2013)"_#Bartok2013
26
it uses bispectrum components
27
to characterize the local neighborhood of each atom
28
in a very general way. The mathematical definition of the
29
bispectrum calculation used by SNAP is identical
30
to that used of "compute sna/atom"_compute_sna_atom.html.
31
In SNAP, the total energy is decomposed into a sum over
32
atom energies. The energy of atom {i} is
33
expressed as a weighted sum over bispectrum components.
35
:c,image(Eqs/pair_snap.jpg)
37
where {B_k^i} is the {k}-th bispectrum component of atom {i},
38
and {beta_k^alpha_i} is the corresponding linear coefficient
39
that depends on {alpha_i}, the SNAP element of atom {i}. The
40
number of bispectrum components used and their definitions
41
depend on the values of {twojmax} and {diagonalstyle}
42
defined in the SNAP parameter file described below.
43
The bispectrum calculation is described in more detail
44
in "compute sna/atom"_compute_sna_atom.html.
46
Note that unlike for other potentials, cutoffs for SNAP potentials are
47
not set in the pair_style or pair_coeff command; they are specified in
48
the SNAP potential files themselves.
50
Only a single pair_coeff command is used with the {snap} style which
51
specifies two SNAP files and the list SNAP element(s) to be
53
The SNAP elements are mapped to LAMMPS atom types by specifying
54
N additional arguments after the 2nd filename in the pair_coeff
55
command, where N is the number of LAMMPS atom types:
60
N element names = mapping of SNAP elements to atom types :ul
62
As an example, if a LAMMPS indium phosphide simulation has 4 atoms
63
types, with the first two being indium and the 3rd and 4th being
64
phophorous, the pair_coeff command would look like this:
66
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P :pre
68
The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
69
The two filenames are for the element and parameter files, respectively.
70
The 'In' and 'P' arguments (between the file names) are the two elements
71
which will be extracted from the element file. The
72
two trailing 'In' arguments map LAMMPS atom types 1 and 2 to the
73
SNAP 'In' element. The two trailing 'P' arguments map LAMMPS atom types
74
3 and 4 to the SNAP 'P' element.
76
If a SNAP mapping value is
77
specified as NULL, the mapping is not performed.
78
This can be used when a {snap} potential is used as part of the
79
{hybrid} pair style. The NULL values are placeholders for atom types
80
that will be used with other potentials.
82
The name of the SNAP element file usually ends in the
83
".snapcoeff" extension. It may contain coefficients
84
for many SNAP elements.
85
Only those elements listed in the pair_coeff command are extracted.
86
The name of the SNAP parameter file usually ends in the ".snapparam"
87
extension. It contains a small number
88
of parameters that define the overall form of the SNAP potential.
89
See the "pair_coeff"_pair_coeff.html doc page for alternate ways
90
to specify the path for these files.
93
SNAP potentials are combined with one or more other LAMMPS pair styles
94
using the {hybrid/overlay} pair style. As an example, the SNAP
95
tantalum potential provided in the LAMMPS potentials directory
96
combines the {snap} and {zbl} pair styles. It is invoked
97
by the following commands:
99
variable zblcutinner equal 4
100
variable zblcutouter equal 4.8
101
variable zblz equal 73
102
pair_style hybrid/overlay &
103
zbl $\{zblcutinner\} $\{zblcutouter\} snap
104
pair_coeff * * zbl 0.0
105
pair_coeff 1 1 zbl $\{zblz\}
106
pair_coeff * * snap ../potentials/Ta06A.snapcoeff Ta &
107
../potentials/Ta06A.snapparam Ta :pre
109
It is convenient to keep these commands in a separate file that can
110
be inserted in any LAMMPS input script using the "include"_include.html
113
The top of the SNAP element file can contain any number of blank and comment
114
lines (start with #), but follows a strict
115
format after that. The first non-blank non-comment
116
line must contain two integers:
118
nelem = Number of elements
119
ncoeff = Number of coefficients :ul
121
This is followed by one block for each of the {nelem} elements.
122
The first line of each block contains three entries:
124
Element symbol (text string)
125
R = Element radius (distance units)
126
w = Element weight (dimensionless) :ul
128
This line is followed by {ncoeff} coefficients, one per line.
130
The SNAP parameter file can contain blank and comment lines (start
131
with #) anywhere. Each non-blank non-comment line must contain one
132
keyword/value pair. The required keywords are {rcutfac} and
133
{twojmax}. Optional keywords are {rfac0}, {rmin0}, {diagonalstyle},
136
The default values for these keywords are
143
Detailed definitions of these keywords are given on the "compute
144
sna/atom"_compute_sna_atom.html doc page.
148
[Mixing, shift, table, tail correction, restart, rRESPA info]:
150
For atom type pairs I,J and I != J, where types I and J correspond to
151
two different element types, mixing is performed by LAMMPS with
152
user-specifiable parameters as described above. You never need to
153
specify a pair_coeff command with I != J arguments for this style.
155
This pair style does not support the "pair_modify"_pair_modify.html
156
shift, table, and tail options.
158
This pair style does not write its information to "binary restart
159
files"_restart.html, since it is stored in potential files. Thus, you
160
need to re-specify the pair_style and pair_coeff commands in an input
161
script that reads a restart file.
163
This pair style can only be used via the {pair} keyword of the
164
"run_style respa"_run_style.html command. It does not support the
165
{inner}, {middle}, {outer} keywords.
171
This style is part of the SNAP package. It is only enabled if
172
LAMMPS was built with that package. See the "Making
173
LAMMPS"_Section_start.html#start_3 section for more info.
177
"compute sna/atom"_compute_sna_atom.html,
178
"compute snad/atom"_compute_sna_atom.html,
179
"compute snav/atom"_compute_sna_atom.html
186
[(Thompson)] Thompson, Swiler, Trott, Foiles, Tucker, under review, preprint
187
available at "arXiv:1409.3880"_http://arxiv.org/abs/1409.3880
190
[(Bartok2010)] Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
193
[(Bartok2013)] Bartok, Gillan, Manby, Csanyi, Phys Rev B 87, 184115 (2013).