git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12422 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-09-05 23:09:28 +00:00
parent 92992e325a
commit 04265d585e
4 changed files with 884 additions and 0 deletions

263
doc/compute_sna_atom.html Normal file
View File

@ -0,0 +1,263 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute sna/atom command
</H3>
<H3>compute snad/atom command
</H3>
<H3>compute snav/atom command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID sna/atom ntypes rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
compute ID group-ID snad/atom ntypes rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
compute ID group-ID snav/atom ntypes rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>sna/atom = style name of this compute command
<LI>rcutfac = scale factor applied to all cutoff radii (positive real)
<LI>rfac0 = parameter in distance to angle conversion (0 < rcutfac < 1)
<LI>twojmax = band limit for bispectrum components (non-negative integer)
<LI>R_1, R_2,... = list of cutoff radii, one for each type (distance units)
<LI>w_1, w_2,... = list of neighbor weights, one for each type
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>diagonal</I> or <I>rmin0</I> or <I>switchflag</I>
<PRE> <I>diagonal</I> value = <I>0</I> or <I>1</I> or <I>2</I> or <I>3</I>
<I>0</I> = all j1, j2, j <= twojmax, j2 <= j1
<I>1</I> = subset satisfying j1 == j2
<I>2</I> = subset satisfying j1 == j2 == j3
<I>3</I> = subset satisfying j2 <= j1 <= j
<I>rmin0</I> value = parameter in distance to angle conversion (distance units)
<I>switchflag</I> value = <I>0</I> or <I>1</I>
<I>0</I> = do not use switching function
<I>1</I> = use switching function
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute b all sna/atom 1.4 0.99363 6 2.0 2.4 0.75 1.0 diagonal 3 rmin0 0.0
compute db all sna/atom 1.4 0.95 6 2.0 1.0
compute vb all sna/atom 1.4 0.95 6 2.0 1.0
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates a set of bispectrum components
for each atom in a group.
</P>
<P>Bispectrum components of an atom are order parameters
characterizing the radial and angular distribution of neighbor
atoms. The detailed mathematical definition is given in
the paper by Thompson et al. <A HREF = "#Thompson2014">(Thompson)</A>
</P>
<P>The position of a neighbor atom <I>i'</I> relative to a central atom <I>i</I>
is a point within the 3D ball of radius <I>R_ii' = rcutfac*(R_i + R_i')</I>
</P>
<P>Bartok et al. <A HREF = "#Bartok2010">(Bartok)</A>, proposed mapping this 3D ball
onto the 3-sphere, the surface of the unit ball in a four-dimensional
space.
The radial distance <I>r</I> within <I>R_ii'</I>
is mapped on to a third polar angle <I>theta0</I> defined by,
</P>
<CENTER><IMG SRC = "Eqs/compute_sna_atom1.jpg">
</CENTER>
<P>In this way, all possible neighbor positions are mapped on to a
subset of the 3-sphere.
Points south of the latitude <I>theta0max=rfac0*Pi</I> are excluded.
</P>
<P>The natural basis for functions on the 3-sphere is formed by
the 4D hyperspherical harmonics <I>U^j_m,m'(theta, phi, theta0).</I>
These functions are better known as <I>D^j_m,m',</I>
the elements of the Wigner <I>D</I>-matrices <A HREF = "#Meremianin2006">(Meremianin</A>,
<A HREF = "#Varshalovich1987">Varshalovich)</A>.
</P>
<P>The density of neighbors on the 3-sphere can be written
as a sum of Dirac-delta functions, one for each neighbor,
weighted by species and
radial distance. Expanding this density function as a
generalized Fourier series in the basis functions, we can
write each Fourier coefficient as
</P>
<CENTER><IMG SRC = "Eqs/compute_sna_atom2.jpg">
</CENTER>
<P>The <I>w_i'</I> neighbor weights are dimensionless
numbers that are chosen to distinguish atoms of different types,
while the central atom is arbitrarily assigned a unit weight.
The function <I>fc(r)</I> ensures that the contribution of each neighbor
atom goes smoothly to zero at <I>R_ii'</I>:
</P>
<CENTER><IMG SRC = "Eqs/compute_sna_atom4.jpg">
</CENTER>
<P>The expansion coefficients <I>u^j_m,m'</I> are complex-valued and they are not directly
useful as descriptors, because they are not invariant under rotation of the
polar coordinate frame. However, the following scalar triple products of
expansion coefficients can be shown to be real-valued and invariant under
rotation <A HREF = "#Bartok2010">(Bartok)</A>.
</P>
<CENTER><IMG SRC = "Eqs/compute_sna_atom3.jpg">
</CENTER>
<P>The constants <I>H^jmm'_j1m1m1'_j2m2m2'</I> are coupling coefficients,
analogous to Clebsch-Gordan
coefficients for rotations on the 2-sphere. These invariants are the
components of the bispectrum and these are the quantities calculated
by the compute <I>sna/atom</I>. They characterize the strength of density
correlations at three points on the 3-sphere. The j2=0 subset
form the power spectrum, which characterizes the correlations of
two points. The lowest-order components
describe the coarsest features of the density function, while higher-order
components reflect finer detail.
Note that the central atom is included in the expansion,
so three point-correlations can be either due to three neighbors, or
two neighbors and the central atom.
</P>
<P>compute <I>snad/atom</I> calculates the derivative of the bispectrum components
summed separately for each atom type:
</P>
<CENTER><IMG SRC = "Eqs/compute_sna_atom5.jpg">
</CENTER>
<P>The sum is over all atoms <I>i'</I> of atom type <I>I</I>.
For each atom <I>i</I>, this compute
evaluates the above expression for each direction,
each atom type, and each bispectrum component.
See section below on output for a detailed explanation.
</P>
<P>compute <I>snav/atom</I> calculates the virial contribution due to the
derivatives:
</P>
<CENTER><IMG SRC = "Eqs/compute_sna_atom6.jpg">
</CENTER>
<P>Again, the sum is over all atoms <I>i'</I> of atom type <I>I</I>.
For each atom <I>i</I>, this compute
evaluates the above expression for each of the six virial
components, each atom type, and each bispectrum component.
See section below on output for a detailed explanation.
</P>
<P>The value of all
bispectrum components will be zero for atoms not in the
group. Neighbor atoms not in the group do not contribute to
the bispectrum of atoms in the group.
</P>
<P>The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
is dumped). Thus it can be inefficient to compute/dump this quantity
too frequently.
</P>
<P>The argument <I>rcutfac</I> is a scale factor that controls the
ratio of atomic radius to radial cutoff distance.
</P>
<P>The argument <I>rfac0</I> and the optional keyword <I>rmin0</I> define the
linear mapping from radial distance to polar angle <I>theta0</I> on the
3-sphere.
</P>
<P>The argument <I>twojmax</I> and the keyword <I>diagonal</I> define which
bispectrum components are generated. See section below on output for
a detailed explanation of the number of bispectrum components and
the ordered in which they are listed
</P>
<P>The keyword <I>switchflag</I> can be used to turn off the switching
function.
</P>
<P>IMPORTANT NOTE: If you have a bonded system, then the settings of
<A HREF = "special_bonds.html">special_bonds</A> command can remove pairwise
interactions between atoms in the same bond, angle, or dihedral. This
is the default setting for the <A HREF = "special_bonds.html">special_bonds</A>
command, and means those pairwise interactions do not appear in the
neighbor list. Because this fix uses the neighbor list, it also means
those pairs will not be included in the calculation. One way
to get around this, is to write a dump file, and use the
<A HREF = "rerun.html">rerun</A> command to compute the bispectrum components
for snapshots in the dump file. The rerun script can use a
<A HREF = "special_bonds.html">special_bonds</A> command that includes all pairs in
the neighbor list.
</P>
<P><B>Output info:</B>
</P>
<P>Compute <I>sna/atom</I> calculates a per-atom array,
each column corresponding to a particular bispectrum component.
The total number of columns
and the identities of the bispectrum component contained in each
column depend on the values of <I>twojmax</I> and <I>diagonal</I>, as
described by the following piece of python code:
</P>
<PRE>for j1 in range(0,twojmax+1):
if(diagonal==2):
print j1/2,j1/2,j1/2
elif(diagonal==1):
for j in range(0,min(twojmax,2*j1)+1,2):
print j1/2,j1/2,j/2
elif(diagonal==0):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
print j1/2,j2/2,j/2
elif(diagonal==3):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
if (j>=j1): print j1/2,j2/2,j/2
</PRE>
<P>Compute <I>snad/atom</I> evaluates a per-atom array. The columns
are arranged into <I>ntypes</I> blocks, listed in order of atom type <I>I</I>.
Each block contains three sub-blocks corresponding to the <I>x</I>, <I>y</I>,
and <I>z</I> components of the atom position. Each of these sub-blocks
contains one column for each bispectrum component, the same as
for compute <I>sna/atom</I>
</P>
<P>Compute <I>snav/atom</I> evaluates a per-atom array. The columns
are arranged into <I>ntypes</I> blocks, listed in order of atom type <I>I</I>.
Each block contains six sub-blocks corresponding to the <I>xx</I>, <I>yy</I>,
<I>zz</I>, <I>yz</I>, <I>xz</I>, and <I>xy</I> components of the virial tensor in Voigt notation.
Each of these sub-blocks contains one column for each bispectrum component,
the same as for compute <I>sna/atom</I>
</P>
<P>These values can be accessed by any command that uses
per-atom values from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
15</A> for an overview of LAMMPS output
options.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "pair_snap.html">pair_style snap</A>
</P>
<P><B>Default:</B>
</P>
<P>The optional keyword defaults are <I>diagonal</I> = 0, <I>rmin0</I> = 0,
<I>switchflag</I> = 1.
</P>
<HR>
<A NAME = "Thompson2014"></A>
<P><B>(Thompson)</B> Thompson, Swiler, Trott, Foiles, Tucker, in preparation
</P>
<A NAME = "Bartok2010"></A>
<P><B>(Bartok)</B> Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
</P>
<A NAME = "Meremianin2006"></A>
<P><B>(Meremianin)</B> Meremianin, J. Phys. A, 39, 3099 (2006).
</P>
<A NAME = "Varshalovich1987"></A>
<P><B>(Varshalovich)</B> Varshalovich, Moskalev, Khersonskii, Quantum Theory
of Angular Momentum, World Scientific, Singapore (1987).
</P>
</HTML>

242
doc/compute_sna_atom.txt Normal file
View File

@ -0,0 +1,242 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute sna/atom command :h3
compute snad/atom command :h3
compute snav/atom command :h3
[Syntax:]
compute ID group-ID sna/atom ntypes rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
compute ID group-ID snad/atom ntypes rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
compute ID group-ID snav/atom ntypes rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
sna/atom = style name of this compute command :l
rcutfac = scale factor applied to all cutoff radii (positive real) :l
rfac0 = parameter in distance to angle conversion (0 < rcutfac < 1) :l
twojmax = band limit for bispectrum components (non-negative integer) :l
R_1, R_2,... = list of cutoff radii, one for each type (distance units) :l
w_1, w_2,... = list of neighbor weights, one for each type :l
zero or more keyword/value pairs may be appended :l
keyword = {diagonal} or {rmin0} or {switchflag} :l
{diagonal} value = {0} or {1} or {2} or {3}
{0} = all j1, j2, j <= twojmax, j2 <= j1
{1} = subset satisfying j1 == j2
{2} = subset satisfying j1 == j2 == j3
{3} = subset satisfying j2 <= j1 <= j
{rmin0} value = parameter in distance to angle conversion (distance units)
{switchflag} value = {0} or {1}
{0} = do not use switching function
{1} = use switching function :pre
:ule
[Examples:]
compute b all sna/atom 1.4 0.99363 6 2.0 2.4 0.75 1.0 diagonal 3 rmin0 0.0
compute db all sna/atom 1.4 0.95 6 2.0 1.0
compute vb all sna/atom 1.4 0.95 6 2.0 1.0 :pre
[Description:]
Define a computation that calculates a set of bispectrum components
for each atom in a group.
Bispectrum components of an atom are order parameters
characterizing the radial and angular distribution of neighbor
atoms. The detailed mathematical definition is given in
the paper by Thompson et al. "(Thompson)"_#Thompson2014
The position of a neighbor atom {i'} relative to a central atom {i}
is a point within the 3D ball of radius {R_ii' = rcutfac*(R_i + R_i')}
Bartok et al. "(Bartok)"_#Bartok2010, proposed mapping this 3D ball
onto the 3-sphere, the surface of the unit ball in a four-dimensional
space.
The radial distance {r} within {R_ii'}
is mapped on to a third polar angle {theta0} defined by,
:c,image(Eqs/compute_sna_atom1.jpg)
In this way, all possible neighbor positions are mapped on to a
subset of the 3-sphere.
Points south of the latitude {theta0max=rfac0*Pi} are excluded.
The natural basis for functions on the 3-sphere is formed by
the 4D hyperspherical harmonics {U^j_m,m'(theta, phi, theta0).}
These functions are better known as {D^j_m,m',}
the elements of the Wigner {D}-matrices "(Meremianin"_#Meremianin2006,
"Varshalovich)"_#Varshalovich1987.
The density of neighbors on the 3-sphere can be written
as a sum of Dirac-delta functions, one for each neighbor,
weighted by species and
radial distance. Expanding this density function as a
generalized Fourier series in the basis functions, we can
write each Fourier coefficient as
:c,image(Eqs/compute_sna_atom2.jpg)
The {w_i'} neighbor weights are dimensionless
numbers that are chosen to distinguish atoms of different types,
while the central atom is arbitrarily assigned a unit weight.
The function {fc(r)} ensures that the contribution of each neighbor
atom goes smoothly to zero at {R_ii'}:
:c,image(Eqs/compute_sna_atom4.jpg)
The expansion coefficients {u^j_m,m'} are complex-valued and they are not directly
useful as descriptors, because they are not invariant under rotation of the
polar coordinate frame. However, the following scalar triple products of
expansion coefficients can be shown to be real-valued and invariant under
rotation "(Bartok)"_#Bartok2010.
:c,image(Eqs/compute_sna_atom3.jpg)
The constants {H^jmm'_j1m1m1'_j2m2m2'} are coupling coefficients,
analogous to Clebsch-Gordan
coefficients for rotations on the 2-sphere. These invariants are the
components of the bispectrum and these are the quantities calculated
by the compute {sna/atom}. They characterize the strength of density
correlations at three points on the 3-sphere. The j2=0 subset
form the power spectrum, which characterizes the correlations of
two points. The lowest-order components
describe the coarsest features of the density function, while higher-order
components reflect finer detail.
Note that the central atom is included in the expansion,
so three point-correlations can be either due to three neighbors, or
two neighbors and the central atom.
compute {snad/atom} calculates the derivative of the bispectrum components
summed separately for each atom type:
:c,image(Eqs/compute_sna_atom5.jpg)
The sum is over all atoms {i'} of atom type {I}.
For each atom {i}, this compute
evaluates the above expression for each direction,
each atom type, and each bispectrum component.
See section below on output for a detailed explanation.
compute {snav/atom} calculates the virial contribution due to the
derivatives:
:c,image(Eqs/compute_sna_atom6.jpg)
Again, the sum is over all atoms {i'} of atom type {I}.
For each atom {i}, this compute
evaluates the above expression for each of the six virial
components, each atom type, and each bispectrum component.
See section below on output for a detailed explanation.
The value of all
bispectrum components will be zero for atoms not in the
group. Neighbor atoms not in the group do not contribute to
the bispectrum of atoms in the group.
The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
is dumped). Thus it can be inefficient to compute/dump this quantity
too frequently.
The argument {rcutfac} is a scale factor that controls the
ratio of atomic radius to radial cutoff distance.
The argument {rfac0} and the optional keyword {rmin0} define the
linear mapping from radial distance to polar angle {theta0} on the
3-sphere.
The argument {twojmax} and the keyword {diagonal} define which
bispectrum components are generated. See section below on output for
a detailed explanation of the number of bispectrum components and
the ordered in which they are listed
The keyword {switchflag} can be used to turn off the switching
function.
IMPORTANT NOTE: If you have a bonded system, then the settings of
"special_bonds"_special_bonds.html command can remove pairwise
interactions between atoms in the same bond, angle, or dihedral. This
is the default setting for the "special_bonds"_special_bonds.html
command, and means those pairwise interactions do not appear in the
neighbor list. Because this fix uses the neighbor list, it also means
those pairs will not be included in the calculation. One way
to get around this, is to write a dump file, and use the
"rerun"_rerun.html command to compute the bispectrum components
for snapshots in the dump file. The rerun script can use a
"special_bonds"_special_bonds.html command that includes all pairs in
the neighbor list.
[Output info:]
Compute {sna/atom} calculates a per-atom array,
each column corresponding to a particular bispectrum component.
The total number of columns
and the identities of the bispectrum component contained in each
column depend on the values of {twojmax} and {diagonal}, as
described by the following piece of python code:
for j1 in range(0,twojmax+1):
if(diagonal==2):
print j1/2,j1/2,j1/2
elif(diagonal==1):
for j in range(0,min(twojmax,2*j1)+1,2):
print j1/2,j1/2,j/2
elif(diagonal==0):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
print j1/2,j2/2,j/2
elif(diagonal==3):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
if (j>=j1): print j1/2,j2/2,j/2 :pre
Compute {snad/atom} evaluates a per-atom array. The columns
are arranged into {ntypes} blocks, listed in order of atom type {I}.
Each block contains three sub-blocks corresponding to the {x}, {y},
and {z} components of the atom position. Each of these sub-blocks
contains one column for each bispectrum component, the same as
for compute {sna/atom}
Compute {snav/atom} evaluates a per-atom array. The columns
are arranged into {ntypes} blocks, listed in order of atom type {I}.
Each block contains six sub-blocks corresponding to the {xx}, {yy},
{zz}, {yz}, {xz}, and {xy} components of the virial tensor in Voigt notation.
Each of these sub-blocks contains one column for each bispectrum component,
the same as for compute {sna/atom}
These values can be accessed by any command that uses
per-atom values from a compute as input. See "Section_howto
15"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
[Restrictions:] none
[Related commands:]
"pair_style snap"_pair_snap.html
[Default:]
The optional keyword defaults are {diagonal} = 0, {rmin0} = 0,
{switchflag} = 1.
:line
:link(Thompson2014)
[(Thompson)] Thompson, Swiler, Trott, Foiles, Tucker, in preparation
:link(Bartok2010)
[(Bartok)] Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
:link(Meremianin2006)
[(Meremianin)] Meremianin, J. Phys. A, 39, 3099 (2006).
:link(Varshalovich1987)
[(Varshalovich)] Varshalovich, Moskalev, Khersonskii, Quantum Theory
of Angular Momentum, World Scientific, Singapore (1987).

193
doc/pair_snap.html Normal file
View File

@ -0,0 +1,193 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>pair_style snap command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>pair_style snap
</PRE>
<P><B>Examples:</B>
</P>
<PRE>pair_style snap
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P
</PRE>
<P><B>Description:</B>
</P>
<P>Style <I>snap</I> computes interactions
using the spectral neighbor analysis potential (SNAP)
<A HREF = "#Thompson2014">(Thompson)</A>. Like the GAP potential of Bartok et al.
<A HREF = "#Bartok2010">(Bartok)</A>, it uses bispectrum components
to characterize the local neighborhood of each atom
in a very general way. The mathematical definition of the
bispectrum calculation used by SNAP is identical
to that used of <A HREF = "compute_sna_atom.html">compute sna/atom</A>.
In SNAP, the total energy is decomposed into a sum over
atom energies. The energy of atom <I>i</I> is
expressed as a weighted sum over bispectrum components.
</P>
<CENTER><IMG SRC = "Eqs/pair_snap.jpg">
</CENTER>
<P>where <I>B_k^i</I> is the <I>k</I>-th bispectrum component of atom <I>i</I>,
and <I>beta_k^alpha_i</I> is the corresponding linear coefficient
that depends on <I>alpha_i</I>, the SNAP element of atom <I>i</I>. The
number of bispectrum components used and their definitions
depend on the values of <I>twojmax</I> and <I>diagonalstyle</I>
defined in the SNAP parameter file described below.
The bispectrum calculation is described in more detail
in <A HREF = "compute_sna_atom.html">compute sna/atom</A>.
</P>
<P>Note that unlike for other potentials, cutoffs for SNAP potentials are
not set in the pair_style or pair_coeff command; they are specified in
the SNAP potential files themselves.
</P>
<P>Only a single pair_coeff command is used with the <I>snap</I> style which
specifies two SNAP files and the list SNAP element(s) to be
extracted.
The SNAP elements are mapped to LAMMPS atom types by specifying
N additional arguments after the 2nd filename in the pair_coeff
command, where N is the number of LAMMPS atom types:
</P>
<UL><LI>SNAP element file
<LI>Elem1, Elem2, ...
<LI>SNAP parameter file
<LI>N element names = mapping of SNAP elements to atom types
</UL>
<P>As an example, if a LAMMPS indium phosphide simulation has 4 atoms
types, with the first two being indium and the 3rd and 4th being
phophorous, the pair_coeff command would look like this:
</P>
<PRE>pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P
</PRE>
<P>The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
The two filenames are for the element and parameter files, respectively.
The 'In' and 'P' arguments (between the file names) are the two elements
which will be extracted from the element file. The
two trailing 'In' arguments map LAMMPS atom types 1 and 2 to the
SNAP 'In' element. The two trailing 'P' arguments map LAMMPS atom types
3 and 4 to the SNAP 'P' element.
</P>
<P>If a SNAP mapping value is
specified as NULL, the mapping is not performed.
This can be used when a <I>snap</I> potential is used as part of the
<I>hybrid</I> pair style. The NULL values are placeholders for atom types
that will be used with other potentials.
</P>
<P>The name of the SNAP element file usually ends in the
".snapcoeff" extension. It may contain coefficients
for many SNAP elements.
Only those elements listed in the pair_coeff command are extracted.
The name of the SNAP parameter file usually ends in the ".snapparam"
extension. It contains a small number
of parameters that define the overall form of the SNAP potential.
See the <A HREF = "pair_coeff.html">pair_coeff</A> doc page for alternate ways
to specify the path for these files.
</P>
<P>Quite commonly,
SNAP potentials are combined with one or more other LAMMPS pair styles
using the <I>hybrid/overlay</I> pair style. As an example, the SNAP
tantalum potential provided in the LAMMPS potentials directory
combines the <I>snap</I> and <I>zbl</I> pair styles. It is invoked
by the following commands:
</P>
<PRE> variable zblcutinner equal 4
variable zblcutouter equal 4.8
variable zblz equal 73
pair_style hybrid/overlay &
zbl ${zblcutinner} ${zblcutouter} snap
pair_coeff * * zbl 0.0
pair_coeff 1 1 zbl ${zblz}
pair_coeff * * snap ../potentials/Ta06A.snapcoeff Ta &
../potentials/Ta06A.snapparam Ta
</PRE>
<P>It is convenient to keep these commands in a separate file that can
be inserted in any LAMMPS input script using the <A HREF = "include.html">include</A>
command.
</P>
<P>The top of the SNAP element file can contain any number of blank and comment
lines (start with #), but follows a strict
format after that. The first non-blank non-comment
line must contain two integers:
</P>
<UL><LI>nelem = Number of elements
<LI>ncoeff = Number of coefficients
</UL>
<P>This is followed by one block for each of the <I>nelem</I> elements.
The first line of each block contains three entries:
</P>
<UL><LI>Element symbol (text string)
<LI>R = Element radius (distance units)
<LI>w = Element weight (dimensionless)
</UL>
<P>This line is followed by <I>ncoeff</I> coefficients, one per line.
</P>
<P>The SNAP parameter file can contain blank and comment lines (start
with #) anywhere. Each non-blank non-comment line must contain one
keyword/value pair. The required keywords are <I>rcutfac</I> and
<I>twojmax</I>. Optional keywords are <I>rfac0</I>, <I>rmin0</I>, <I>diagonalstyle</I>,
and <I>switchflag</I>.
</P>
<P>The default values for these keywords are
</P>
<UL><LI><I>rfac0</I> = 0.99363
<LI><I>rmin0</I> = 0.0
<LI><I>diagonalstyle</I> = 3
<LI><I>switchflag</I> = 0
</UL>
<P>Detailed definitions of these keywords are given on the <A HREF = "compute_sna_atom.html">compute
sna/atom</A> doc page.
</P>
<HR>
<P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>:
</P>
<P>For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS with
user-specifiable parameters as described above. You never need to
specify a pair_coeff command with I != J arguments for this style.
</P>
<P>This pair style does not support the <A HREF = "pair_modify.html">pair_modify</A>
shift, table, and tail options.
</P>
<P>This pair style does not write its information to <A HREF = "restart.html">binary restart
files</A>, since it is stored in potential files. Thus, you
need to re-specify the pair_style and pair_coeff commands in an input
script that reads a restart file.
</P>
<P>This pair style can only be used via the <I>pair</I> keyword of the
<A HREF = "run_style.html">run_style respa</A> command. It does not support the
<I>inner</I>, <I>middle</I>, <I>outer</I> keywords.
</P>
<HR>
<P><B>Restrictions:</B>
</P>
<P>None
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_sna_atom.html">compute sna/atom</A>,
<A HREF = "compute_sna_atom.html">compute snad/atom</A>,
<A HREF = "compute_sna_atom.html">compute snav/atom</A>
</P>
<P><B>Default:</B> none
</P>
<HR>
<A NAME = "Thompson2014"></A>
<P><B>(Thompson)</B> Thompson, Swiler, Trott, Foiles, Tucker, in preparation
</P>
<A NAME = "Bartok2010"></A>
<P><B>(Bartok)</B> Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
</P>
</HTML>

186
doc/pair_snap.txt Normal file
View File

@ -0,0 +1,186 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
pair_style snap command :h3
[Syntax:]
pair_style snap :pre
[Examples:]
pair_style snap
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P :pre
[Description:]
Style {snap} computes interactions
using the spectral neighbor analysis potential (SNAP)
"(Thompson)"_#Thompson2014. Like the GAP potential of Bartok et al.
"(Bartok)"_#Bartok2010, it uses bispectrum components
to characterize the local neighborhood of each atom
in a very general way. The mathematical definition of the
bispectrum calculation used by SNAP is identical
to that used of "compute sna/atom"_compute_sna_atom.html.
In SNAP, the total energy is decomposed into a sum over
atom energies. The energy of atom {i} is
expressed as a weighted sum over bispectrum components.
:c,image(Eqs/pair_snap.jpg)
where {B_k^i} is the {k}-th bispectrum component of atom {i},
and {beta_k^alpha_i} is the corresponding linear coefficient
that depends on {alpha_i}, the SNAP element of atom {i}. The
number of bispectrum components used and their definitions
depend on the values of {twojmax} and {diagonalstyle}
defined in the SNAP parameter file described below.
The bispectrum calculation is described in more detail
in "compute sna/atom"_compute_sna_atom.html.
Note that unlike for other potentials, cutoffs for SNAP potentials are
not set in the pair_style or pair_coeff command; they are specified in
the SNAP potential files themselves.
Only a single pair_coeff command is used with the {snap} style which
specifies two SNAP files and the list SNAP element(s) to be
extracted.
The SNAP elements are mapped to LAMMPS atom types by specifying
N additional arguments after the 2nd filename in the pair_coeff
command, where N is the number of LAMMPS atom types:
SNAP element file
Elem1, Elem2, ...
SNAP parameter file
N element names = mapping of SNAP elements to atom types :ul
As an example, if a LAMMPS indium phosphide simulation has 4 atoms
types, with the first two being indium and the 3rd and 4th being
phophorous, the pair_coeff command would look like this:
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P :pre
The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
The two filenames are for the element and parameter files, respectively.
The 'In' and 'P' arguments (between the file names) are the two elements
which will be extracted from the element file. The
two trailing 'In' arguments map LAMMPS atom types 1 and 2 to the
SNAP 'In' element. The two trailing 'P' arguments map LAMMPS atom types
3 and 4 to the SNAP 'P' element.
If a SNAP mapping value is
specified as NULL, the mapping is not performed.
This can be used when a {snap} potential is used as part of the
{hybrid} pair style. The NULL values are placeholders for atom types
that will be used with other potentials.
The name of the SNAP element file usually ends in the
".snapcoeff" extension. It may contain coefficients
for many SNAP elements.
Only those elements listed in the pair_coeff command are extracted.
The name of the SNAP parameter file usually ends in the ".snapparam"
extension. It contains a small number
of parameters that define the overall form of the SNAP potential.
See the "pair_coeff"_pair_coeff.html doc page for alternate ways
to specify the path for these files.
Quite commonly,
SNAP potentials are combined with one or more other LAMMPS pair styles
using the {hybrid/overlay} pair style. As an example, the SNAP
tantalum potential provided in the LAMMPS potentials directory
combines the {snap} and {zbl} pair styles. It is invoked
by the following commands:
variable zblcutinner equal 4
variable zblcutouter equal 4.8
variable zblz equal 73
pair_style hybrid/overlay &
zbl $\{zblcutinner\} $\{zblcutouter\} snap
pair_coeff * * zbl 0.0
pair_coeff 1 1 zbl $\{zblz\}
pair_coeff * * snap ../potentials/Ta06A.snapcoeff Ta &
../potentials/Ta06A.snapparam Ta :pre
It is convenient to keep these commands in a separate file that can
be inserted in any LAMMPS input script using the "include"_include.html
command.
The top of the SNAP element file can contain any number of blank and comment
lines (start with #), but follows a strict
format after that. The first non-blank non-comment
line must contain two integers:
nelem = Number of elements
ncoeff = Number of coefficients :ul
This is followed by one block for each of the {nelem} elements.
The first line of each block contains three entries:
Element symbol (text string)
R = Element radius (distance units)
w = Element weight (dimensionless) :ul
This line is followed by {ncoeff} coefficients, one per line.
The SNAP parameter file can contain blank and comment lines (start
with #) anywhere. Each non-blank non-comment line must contain one
keyword/value pair. The required keywords are {rcutfac} and
{twojmax}. Optional keywords are {rfac0}, {rmin0}, {diagonalstyle},
and {switchflag}.
The default values for these keywords are
{rfac0} = 0.99363
{rmin0} = 0.0
{diagonalstyle} = 3
{switchflag} = 0 :ul
Detailed definitions of these keywords are given on the "compute
sna/atom"_compute_sna_atom.html doc page.
:line
[Mixing, shift, table, tail correction, restart, rRESPA info]:
For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS with
user-specifiable parameters as described above. You never need to
specify a pair_coeff command with I != J arguments for this style.
This pair style does not support the "pair_modify"_pair_modify.html
shift, table, and tail options.
This pair style does not write its information to "binary restart
files"_restart.html, since it is stored in potential files. Thus, you
need to re-specify the pair_style and pair_coeff commands in an input
script that reads a restart file.
This pair style can only be used via the {pair} keyword of the
"run_style respa"_run_style.html command. It does not support the
{inner}, {middle}, {outer} keywords.
:line
[Restrictions:]
None
[Related commands:]
"compute sna/atom"_compute_sna_atom.html,
"compute snad/atom"_compute_sna_atom.html,
"compute snav/atom"_compute_sna_atom.html
[Default:] none
:line
:link(Thompson2014)
[(Thompson)] Thompson, Swiler, Trott, Foiles, Tucker, in preparation
:link(Bartok2010)
[(Bartok)] Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).