diff --git a/doc/compute_sna_atom.html b/doc/compute_sna_atom.html new file mode 100644 index 0000000000..023417475c --- /dev/null +++ b/doc/compute_sna_atom.html @@ -0,0 +1,263 @@ + +
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 ... ++
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 ++ +
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 ++
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) +
+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), 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, +
+
+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, +Varshalovich). +
+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 +
+
+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': +
+
+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). +
+
+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: +
+
+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: +
+
+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 command can remove pairwise +interactions between atoms in the same bond, angle, or dihedral. This +is the default setting for the special_bonds +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 command to compute the bispectrum components +for snapshots in the dump file. The rerun script can use a +special_bonds 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 ++
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 for an overview of LAMMPS output +options. +
+Restrictions: none +
+Related commands: +
+ +Default: +
+The optional keyword defaults are diagonal = 0, rmin0 = 0, +switchflag = 1. +
+(Thompson) Thompson, Swiler, Trott, Foiles, Tucker, in preparation +
+ + +(Bartok) Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010). +
+ + +(Meremianin) Meremianin, J. Phys. A, 39, 3099 (2006). +
+ + +(Varshalovich) Varshalovich, Moskalev, Khersonskii, Quantum Theory +of Angular Momentum, World Scientific, Singapore (1987). +
+ diff --git a/doc/compute_sna_atom.txt b/doc/compute_sna_atom.txt new file mode 100644 index 0000000000..7a52aab3ab --- /dev/null +++ b/doc/compute_sna_atom.txt @@ -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). diff --git a/doc/pair_snap.html b/doc/pair_snap.html new file mode 100644 index 0000000000..2711beb63e --- /dev/null +++ b/doc/pair_snap.html @@ -0,0 +1,193 @@ + +Syntax: +
+pair_style snap ++
Examples: +
+pair_style snap +pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P ++
Description: +
+Style snap computes interactions +using the spectral neighbor analysis potential (SNAP) +(Thompson). Like the GAP potential of Bartok et al. +(Bartok), 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. +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. +
+
+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. +
+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: +
+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 ++
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 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
+
+It is convenient to keep these commands in a separate file that can +be inserted in any LAMMPS input script using the include +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: +
+This is followed by one block for each of the nelem elements. +The first line of each block contains three entries: +
+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 +
+Detailed definitions of these keywords are given on the compute +sna/atom doc page. +
+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 +shift, table, and tail options. +
+This pair style does not write its information to binary restart +files, 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 command. It does not support the +inner, middle, outer keywords. +
+Restrictions: +
+None +
+Related commands: +
+compute sna/atom, +compute snad/atom, +compute snav/atom +
+Default: none +
+(Thompson) Thompson, Swiler, Trott, Foiles, Tucker, in preparation +
+ + +(Bartok) Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010). +
+ diff --git a/doc/pair_snap.txt b/doc/pair_snap.txt new file mode 100644 index 0000000000..394b27d2e0 --- /dev/null +++ b/doc/pair_snap.txt @@ -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).