diff --git a/doc/doxygen/Doxyfile.in b/doc/doxygen/Doxyfile.in index d454898f4e..e905d5a64d 100644 --- a/doc/doxygen/Doxyfile.in +++ b/doc/doxygen/Doxyfile.in @@ -2,7 +2,7 @@ DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "LAMMPS Programmer's Guide" -PROJECT_NUMBER = "24 August 2020" +PROJECT_NUMBER = "4 May 2022" PROJECT_BRIEF = "Documentation of the LAMMPS library interface and Python wrapper" PROJECT_LOGO = lammps-logo.png CREATE_SUBDIRS = NO @@ -437,6 +437,8 @@ INPUT = @LAMMPS_SOURCE_DIR@/utils.cpp \ @LAMMPS_SOURCE_DIR@/math_eigen.h \ @LAMMPS_SOURCE_DIR@/platform.h \ @LAMMPS_SOURCE_DIR@/platform.cpp \ + @LAMMPS_SOURCE_DIR@/math_special.h \ + @LAMMPS_SOURCE_DIR@/math_special.cpp \ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index 4ddfed6df0..cf21a46ffa 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -245,6 +245,8 @@ OPT. * :doc:`resquared (go) ` * :doc:`saip/metal ` * :doc:`sdpd/taitwater/isothermal ` + * :doc:`smatb ` + * :doc:`smatb/single ` * :doc:`smd/hertz ` * :doc:`smd/tlsph ` * :doc:`smd/tri_surface ` diff --git a/doc/src/Developer_utils.rst b/doc/src/Developer_utils.rst index d7b1f077dd..0932276a58 100644 --- a/doc/src/Developer_utils.rst +++ b/doc/src/Developer_utils.rst @@ -246,6 +246,44 @@ Customized standard functions --------------------------- +Special Math functions +---------------------- + +The ``MathSpecial`` namespace implements a selection of custom and optimized +mathematical functions for a variety of applications. + +.. doxygenfunction:: factorial + :project: progguide + +.. doxygenfunction:: exp2_x86 + :project: progguide + +.. doxygenfunction:: fm_exp + :project: progguide + +.. doxygenfunction:: my_erfcx + :project: progguide + +.. doxygenfunction:: expmsq + :project: progguide + +.. doxygenfunction:: square + :project: progguide + +.. doxygenfunction:: cube + :project: progguide + +.. doxygenfunction:: powsign + :project: progguide + +.. doxygenfunction:: powint + :project: progguide + +.. doxygenfunction:: powsinxx + :project: progguide + +--------------------------- + Tokenizer classes ----------------- diff --git a/doc/src/Modify_style.rst b/doc/src/Modify_style.rst index 0ee600acc5..2ed83ed7c6 100644 --- a/doc/src/Modify_style.rst +++ b/doc/src/Modify_style.rst @@ -250,9 +250,9 @@ on` comments around that block. Error or warning messages and explanations (preferred) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. versionchanged:: 27Apr2022 +.. versionchanged:: 4May2022 -Starting with LAMMPS version 27 April 2022 the LAMMPS developers have +Starting with LAMMPS version 4 May 2022 the LAMMPS developers have agreed on a new policy for error and warning messages. Previously, all error and warning strings were supposed to be listed in diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index b326eec2ac..aaac06a4a8 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -2604,18 +2604,20 @@ SMTBQ package **Contents:** -A pair style which implements a Second Moment Tight Binding model with -QEq charge equilibration (SMTBQ) potential for the description of -ionocovalent bonds in oxides. +Pair styles which implement Second Moment Tight Binding models. +One with QEq charge equilibration (SMTBQ) for the description of +ionocovalent bonds in oxides, and two more as plain SMATB models. -**Authors:** Nicolas Salles, Emile Maras, Olivier Politano, and Robert -Tetot (LAAS-CNRS, France). +**Authors:** SMTBQ: Nicolas Salles, Emile Maras, Olivier Politano, and Robert +Tetot (LAAS-CNRS, France); +SMATB: Daniele Rapetti (Politecnico di Torino) **Supporting info:** * src/SMTBQ: filenames -> commands * src/SMTBQ/README * :doc:`pair_style smtbq ` +* :doc:`pair_style smatb `, :doc:`pair_style smatb/single ` * examples/PACKAGES/smtbq ---------- diff --git a/doc/src/Packages_list.rst b/doc/src/Packages_list.rst index c4449d4373..3cd19e6e03 100644 --- a/doc/src/Packages_list.rst +++ b/doc/src/Packages_list.rst @@ -434,8 +434,8 @@ whether an extra library is needed to build and use the package: - n/a - no * - :ref:`SMTBQ ` - - second moment tight binding potential - - :doc:`pair_style smtbq ` + - second moment tight binding potentials + - :doc:`pair_style smtbq ` :doc:`pair_style smatb ` - PACKAGES/smtbq - no * - :ref:`SPH ` diff --git a/doc/src/compute_sna_atom.rst b/doc/src/compute_sna_atom.rst index e43e61cd00..54a6df02a2 100644 --- a/doc/src/compute_sna_atom.rst +++ b/doc/src/compute_sna_atom.rst @@ -33,7 +33,7 @@ Syntax * R_1, R_2,... = list of cutoff radii, one for each type (distance units) * w_1, w_2,... = list of neighbor weights, one for each type * zero or more keyword/value pairs may be appended -* keyword = *rmin0* or *switchflag* or *bzeroflag* or *quadraticflag* or *chem* or *bnormflag* or *wselfallflag* or *bikflag* or *switchinnerflag* +* keyword = *rmin0* or *switchflag* or *bzeroflag* or *quadraticflag* or *chem* or *bnormflag* or *wselfallflag* or *bikflag* or *switchinnerflag* or *sinner* or *dinner* .. parsed-literal:: @@ -59,9 +59,13 @@ Syntax *bikflag* value = *0* or *1* (only implemented for compute snap) *0* = per-atom bispectrum descriptors are summed over atoms *1* = per-atom bispectrum descriptors are not summed over atoms - *switchinnerflag* values = *rinnerlist* *drinnerlist* - *rinnerlist* = *ntypes* values of rinner (distance units) - *drinnerlist* = *ntypes* values of drinner (distance units) + *switchinnerflag* value = *0* or *1* + *0* = do not use inner switching function + *1* = use inner switching function + *sinner* values = *sinnerlist* + *sinnerlist* = *ntypes* values of *Sinner* (distance units) + *dinner* values = *dinnerlist* + *dinnerlist* = *ntypes* values of *Dinner* (distance units) Examples """""""" @@ -73,7 +77,7 @@ Examples compute vb all sna/atom 1.4 0.95 6 2.0 1.0 compute snap all snap 1.4 0.95 6 2.0 1.0 compute snap all snap 1.0 0.99363 6 3.81 3.83 1.0 0.93 chem 2 0 1 - compute snap all snap 1.0 0.99363 6 3.81 3.83 1.0 0.93 switchinnerflag 1.1 1.3 0.5 0.6 + compute snap all snap 1.0 0.99363 6 3.81 3.83 1.0 0.93 switchinnerflag 1 sinner 1.35 1.6 dinner 0.25 0.3 Description """"""""""" @@ -312,25 +316,29 @@ the resulting bispectrum rows are :math:`B_{i,k}` instead of just :math:`B_k`. In this case, the entries in the final column for these rows are set to zero. -The keyword *switchinnerflag* activates an additional radial switching +The keyword *switchinnerflag* with value 1 +activates an additional radial switching function similar to :math:`f_c(r)` above, but acting to switch off smoothly contributions from neighbor atoms at short separation distances. This is useful when SNAP is used in combination with a simple -repulsive potential. The keyword is followed by the *ntypes* -values for :math:`r_{inner}` and the *ntypes* -values for :math:`\Delta r_{inner}`. For a neighbor atom at +repulsive potential. For a neighbor atom at distance :math:`r`, its contribution is scaled by a multiplicative factor :math:`f_{inner}(r)` defined as follows: .. math:: - = & 0, r \leq r_{inner} \\ - f_{inner}(r) = & \frac{1}{2}(1 - \cos(\pi \frac{r-r_{inner}}{\Delta r_{inner}})), r_{inner} < r \leq r_{inner} + \Delta r_{inner} \\ - = & 1, r > r_{inner} + \Delta r_{inner} + = & 0, r \leq S_{inner} - D_{inner} \\ + f_{inner}(r) = & \frac{1}{2}(1 - \cos(\frac{\pi}{2} (1 + \frac{r-S_{inner}}{D_{inner}})), S_{inner} - D_{inner} < r \leq S_{inner} + D_{inner} \\ + = & 1, r > S_{inner} + D_{inner} -The values of :math:`r_{inner}` and :math:`\Delta r_{inner}` are -the arithmetic means of the values for the central atom of type I -and the neighbor atom of type J. +where the switching region is centered at :math:`S_{inner}` and it extends a distance :math:`D_{inner}` +to the left and to the right of this. +With this option, additional keywords *sinner* and *dinner* must be used, +each followed by *ntypes* +values for :math:`S_{inner}` and :math:`D_{inner}`, respectively. +When the central atom and the neighbor atom have different types, +the values of :math:`S_{inner}` and :math:`D_{inner}` are +the arithmetic means of the values for both types. .. note:: @@ -450,7 +458,7 @@ Default The optional keyword defaults are *rmin0* = 0, *switchflag* = 1, *bzeroflag* = 1, *quadraticflag* = 0, -*bnormflag* = 0, *wselfallflag* = 0 +*bnormflag* = 0, *wselfallflag* = 0, *switchinnerflag* = 0, ---------- diff --git a/doc/src/compute_viscosity_cos.rst b/doc/src/compute_viscosity_cos.rst index d08217a590..2f7a09924c 100644 --- a/doc/src/compute_viscosity_cos.rst +++ b/doc/src/compute_viscosity_cos.rst @@ -21,12 +21,13 @@ Examples .. code-block:: LAMMPS + units real compute cos all viscosity/cos variable V equal c_cos[7] - variable A equal 0.02E-5 + variable A equal 0.02E-5 # A/fs^2 variable density equal density variable lz equal lz - variable reciprocalViscosity equal v_V/${A}/v_density*39.4784/v_lz/v_lz*100 + variable reciprocalViscosity equal v_V/${A}/v_density*39.4784/v_lz/v_lz*100 # 1/(Pa*s) Description """"""""""" diff --git a/doc/src/fix_accelerate_cos.rst b/doc/src/fix_accelerate_cos.rst index 46e08e68b4..904e853ad8 100644 --- a/doc/src/fix_accelerate_cos.rst +++ b/doc/src/fix_accelerate_cos.rst @@ -13,7 +13,7 @@ Syntax * ID, group-ID are documented in :doc:`fix ` command * accelerate/cos = style name of this fix command -* value = amplitude of acceleration (in unit of force/mass) +* value = amplitude of acceleration (in unit of velocity/time) Examples diff --git a/doc/src/fix_ave_correlate.rst b/doc/src/fix_ave_correlate.rst index 23086d465f..6653b91d91 100644 --- a/doc/src/fix_ave_correlate.rst +++ b/doc/src/fix_ave_correlate.rst @@ -25,7 +25,7 @@ Syntax f_ID = global scalar calculated by a fix with ID f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below) v_name = global value calculated by an equal-style variable with name - v_name[I] = Ith component of a vector-style variable with name + v_name[I] = Ith component of a vector-style variable with name, I can include wildcard (see below) * zero or more keyword/arg pairs may be appended * keyword = *type* or *ave* or *start* or *prefactor* or *file* or *overwrite* or *title1* or *title2* or *title3* @@ -105,20 +105,21 @@ individual fixes for info on which ones produce such values. ones that can be used with this fix. Variables of style *atom* cannot be used, since they produce per-atom values. -Note that for values from a compute or fix, the bracketed index I can -be specified using a wildcard asterisk with the index to effectively -specify multiple values. This takes the form "\*" or "\*n" or "n\*" or -"m\*n". If N = the size of the vector (for *mode* = scalar) or the -number of columns in the array (for *mode* = vector), then an asterisk -with no numeric values means all indices from 1 to N. A leading -asterisk means all indices from 1 to n (inclusive). A trailing -asterisk means all indices from n to N (inclusive). A middle asterisk -means all indices from m to n (inclusive). +---------- + +For input values from a compute or fix or variable , the bracketed +index I can be specified using a wildcard asterisk with the index to +effectively specify multiple values. This takes the form "\*" or +"\*n" or "n\*" or "m\*n". If N = the size of the vector, then an +asterisk with no numeric values means all indices from 1 to N. A +leading asterisk means all indices from 1 to n (inclusive). A +trailing asterisk means all indices from n to N (inclusive). A middle +asterisk means all indices from m to n (inclusive). Using a wildcard is the same as if the individual elements of the vector had been listed one by one. E.g. these 2 fix ave/correlate -commands are equivalent, since the :doc:`compute pressure ` command creates a global vector with 6 -values. +commands are equivalent, since the :doc:`compute pressure +` command creates a global vector with 6 values. .. code-block:: LAMMPS @@ -128,6 +129,14 @@ values. c_myPress[1] c_myPress[2] c_myPress[3] & c_myPress[4] c_myPress[5] c_myPress[6] +.. note:: + + For a vector-style variable, only the wildcard forms "\*n" or + "m\*n" are allowed. You must specify the upper bound, because + vector-style variable lengths are not determined until the variable + is evaluated. If n is specified larger than the vector length + turns out to be, zeroes are output for missing vector values. + ---------- The *Nevery*, *Nrepeat*, and *Nfreq* arguments specify on what diff --git a/doc/src/fix_ave_histo.rst b/doc/src/fix_ave_histo.rst index 05c63a6faf..5d36a372c3 100644 --- a/doc/src/fix_ave_histo.rst +++ b/doc/src/fix_ave_histo.rst @@ -32,7 +32,7 @@ Syntax f_ID = scalar or vector calculated by a fix with ID f_ID[I] = Ith component of vector or Ith column of array calculated by a fix with ID, I can include wildcard (see below) v_name = value(s) calculated by an equal-style or vector-style or atom-style variable with name - v_name[I] = value calculated by a vector-style variable with name + v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below) * zero or more keyword/arg pairs may be appended * keyword = *mode* or *file* or *ave* or *start* or *beyond* or *overwrite* or *title1* or *title2* or *title3* @@ -120,27 +120,6 @@ If *mode* = vector, then the input values must be vectors, or arrays with a bracketed term appended, indicating the Ith column of the array is used. -Note that for values from a compute or fix, the bracketed index I can -be specified using a wildcard asterisk with the index to effectively -specify multiple values. This takes the form "\*" or "\*n" or "n\*" or -"m\*n". If N = the size of the vector (for *mode* = scalar) or the -number of columns in the array (for *mode* = vector), then an asterisk -with no numeric values means all indices from 1 to N. A leading -asterisk means all indices from 1 to n (inclusive). A trailing -asterisk means all indices from n to N (inclusive). A middle asterisk -means all indices from m to n (inclusive). - -Using a wildcard is the same as if the individual elements of the -vector or columns of the array had been listed one by one. E.g. these -2 fix ave/histo commands are equivalent, since the :doc:`compute com/chunk ` command creates a global array with -3 columns: - -.. code-block:: LAMMPS - - compute myCOM all com/chunk - fix 1 all ave/histo 100 1 100 -10.0 10.0 100 c_myCOM[*] file tmp1.com mode vector - fix 2 all ave/histo 100 1 100 -10.0 10.0 100 c_myCOM[1] c_myCOM[2] c_myCOM[3] file tmp2.com mode vector - If the fix ave/histo/weight command is used, exactly two values must be specified. If the values are vectors, they must be the same length. The first value (a scalar or vector) is what is histogrammed @@ -153,6 +132,38 @@ the first vector. ---------- +For input values from a compute or fix or variable, the bracketed +index I can be specified using a wildcard asterisk with the index to +effectively specify multiple values. This takes the form "\*" or +"\*n" or "n\*" or "m\*n". If N = the size of the vector (for *mode* = +scalar) or the number of columns in the array (for *mode* = vector), +then an asterisk with no numeric values means all indices from 1 to N. +A leading asterisk means all indices from 1 to n (inclusive). A +trailing asterisk means all indices from n to N (inclusive). A middle +asterisk means all indices from m to n (inclusive). + +Using a wildcard is the same as if the individual elements of the +vector or columns of the array had been listed one by one. E.g. these +2 fix ave/histo commands are equivalent, since the :doc:`compute +com/chunk ` command creates a global array with 3 +columns: + +.. code-block:: LAMMPS + + compute myCOM all com/chunk + fix 1 all ave/histo 100 1 100 -10.0 10.0 100 c_myCOM[*] file tmp1.com mode vector + fix 2 all ave/histo 100 1 100 -10.0 10.0 100 c_myCOM[1] c_myCOM[2] c_myCOM[3] file tmp2.com mode vector + +.. note:: + + For a vector-style variable, only the wildcard forms "\*n" or + "m\*n" are allowed. You must specify the upper bound, because + vector-style variable lengths are not determined until the variable + is evaluated. If n is specified larger than the vector length + turns out to be, zeroes are output for missing vector values. + +---------- + The *Nevery*, *Nrepeat*, and *Nfreq* arguments specify on what timesteps the input values will be used in order to contribute to the histogram. The final histogram is generated on timesteps that are diff --git a/doc/src/fix_ave_time.rst b/doc/src/fix_ave_time.rst index dfa385ea46..2836e11fd0 100644 --- a/doc/src/fix_ave_time.rst +++ b/doc/src/fix_ave_time.rst @@ -25,7 +25,7 @@ Syntax f_ID = global scalar or vector calculated by a fix with ID f_ID[I] = Ith component of global vector or Ith column of global array calculated by a fix with ID, I can include wildcard (see below) v_name = value(s) calculated by an equal-style or vector-style variable with name - v_name[I] = value calculated by a vector-style variable with name + v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below) * zero or more keyword/arg pairs may be appended * keyword = *mode* or *file* or *ave* or *start* or *off* or *overwrite* or *title1* or *title2* or *title3* @@ -113,20 +113,23 @@ with a bracketed term appended, indicating the Ith column of the array is used. All vectors must be the same length, which is the length of the vector or number of rows in the array. -Note that for values from a compute or fix, the bracketed index I can -be specified using a wildcard asterisk with the index to effectively -specify multiple values. This takes the form "\*" or "\*n" or "n\*" or -"m\*n". If N = the size of the vector (for *mode* = scalar) or the -number of columns in the array (for *mode* = vector), then an asterisk -with no numeric values means all indices from 1 to N. A leading -asterisk means all indices from 1 to n (inclusive). A trailing -asterisk means all indices from n to N (inclusive). A middle asterisk -means all indices from m to n (inclusive). +---------- + +For input values from a compute or fix or variable, the bracketed +index I can be specified using a wildcard asterisk with the index to +effectively specify multiple values. This takes the form "\*" or +"\*n" or "n\*" or "m\*n". If N = the size of the vector (for *mode* = +scalar) or the number of columns in the array (for *mode* = vector), +then an asterisk with no numeric values means all indices from 1 to N. +A leading asterisk means all indices from 1 to n (inclusive). A +trailing asterisk means all indices from n to N (inclusive). A middle +asterisk means all indices from m to n (inclusive). Using a wildcard is the same as if the individual elements of the vector or columns of the array had been listed one by one. E.g. these -2 fix ave/time commands are equivalent, since the :doc:`compute rdf ` command creates, in this case, a global array -with 3 columns, each of length 50: +2 fix ave/time commands are equivalent, since the :doc:`compute rdf +` command creates, in this case, a global array with 3 +columns, each of length 50: .. code-block:: LAMMPS @@ -134,6 +137,14 @@ with 3 columns, each of length 50: fix 1 all ave/time 100 1 100 c_myRDF[*] file tmp1.rdf mode vector fix 2 all ave/time 100 1 100 c_myRDF[1] c_myRDF[2] c_myRDF[3] file tmp2.rdf mode vector +.. note:: + + For a vector-style variable, only the wildcard forms "\*n" or + "m\*n" are allowed. You must specify the upper bound, because + vector-style variable lengths are not determined until the variable + is evaluated. If n is specified larger than the vector length + turns out to be, zeroes are output for missing vector values. + ---------- The *Nevery*, *Nrepeat*, and *Nfreq* arguments specify on what @@ -169,9 +180,12 @@ asterisk to effectively specify multiple values. Note that there is a :doc:`compute reduce ` command which can sum per-atom quantities into a global scalar or vector which can thus be accessed by fix ave/time. Or it can be a compute defined -not in your input script, but by :doc:`thermodynamic output ` or other fixes such as :doc:`fix nvt ` or :doc:`fix temp/rescale `. See -the doc pages for these commands which give the IDs of these computes. -Users can also write code for their own compute styles and :doc:`add them to LAMMPS `. +not in your input script, but by :doc:`thermodynamic output +` or other fixes such as :doc:`fix nvt ` or +:doc:`fix temp/rescale `. See the doc pages for +these commands which give the IDs of these computes. Users can also +write code for their own compute styles and :doc:`add them to LAMMPS +`. If a value begins with "f\_", a fix ID must follow which has been previously defined in the input script. If *mode* = scalar, then if diff --git a/doc/src/pair_smatb.rst b/doc/src/pair_smatb.rst new file mode 100644 index 0000000000..73f3781f90 --- /dev/null +++ b/doc/src/pair_smatb.rst @@ -0,0 +1,131 @@ +.. index:: pair_style smatb +.. index:: pair_style smatb/single + +pair_style smatb command +========================= + +pair_style smatb/single command +=============================== + +Syntax +"""""" + +.. code-block:: LAMMPS + + pair_style style args + +* style = *smatb* +* args = none + +.. parsed-literal:: + + *smatb* + +Examples +"""""""" + +.. code-block:: LAMMPS + + pair_style smatb + pair_coeff 1 1 2.88 10.35 4.178 0.210 1.818 4.07293506 4.9883063257983666 + + +Description +""""""""""" + +The *smatb* styles compute the Second Moment Approximation to the Tight Binding +:ref:`(Cyrot) `, :ref:`(Gupta) `, :ref:`(Rosato) `, +given by + +.. math:: + E_{i} = \sum_{j,R_{ij}\leq R_{c}} \alpha(R_{ij}) - \sqrt{\sum_{j,R_{ij}\leq R_{c}}\Xi^2(R_{ij})} + +:math:`R_{ij}` is the distance between the atom :math:`i` and :math:`j`. +And the two functions :math:`\alpha\left(r\right)` and :math:`\Xi\left(r\right)` are: + +.. math:: + \alpha\left(r\right)=\left\lbrace\begin{array}{ll} + A e^{-p \left(\frac{r}{R_{0}}-1\right)} & r < R_{sc}\\ + a_3\left(r-R_{c}\right)^3+a_4\left(r-R_{c}\right)^4 + +a_5\left(r-R_{c}\right)^5& R_{sc} < r < R_{c} + \end{array} + \right. + +.. math:: + \Xi\left(r\right)=\left\lbrace\begin{array}{ll} + \xi e^{-q \left(\frac{r}{R_{0}}-1\right)} & r < R_{sc}\\ + x_3\left(r-R_{c}\right)^3+x_4\left(r-R_{c}\right)^4 + +x_5\left(r-R_{c}\right)^5& R_{sc} < r < R_{c} + \end{array} + \right. + + +The polynomial coefficients :math:`a_3`, :math:`a_4`, :math:`a_5`, +:math:`x_3`, :math:`x_4`, :math:`x_5` are computed by LAMMPS: the two +exponential terms and their first and second derivatives are smoothly +reduced to zero, from the inner cutoff :math:`R_{sc}` to the outer +cutoff :math:`R_{c}`. + +Coefficients +"""""""""""" + +The following coefficients must be defined for each pair of atoms types via the +:doc:`pair_coeff ` command as in the examples above, or in the data +file or restart files read by the :doc:`read_data ` or +:doc:`read_restart ` commands, or by mixing as described below: + +* :math:`R_{0}` (distance units) +* :math:`p` (dimensionless) +* :math:`q` (dimensionless) +* :math:`A` (energy units) +* :math:`\xi` (energy units) +* :math:`R_{cs}` (distance units) +* :math:`R_{c}` (distance units) + + +Note that: :math:`R_{0}` is the nearest neighbor distance, usually coincides +with the diameter of the atoms + +See the :doc:`run_style ` command for details. + +---------- + +Mixing info +""""""""""" + +For atom type pairs I,J and I != J the coefficients are not automatically mixed. + +---------- + +Restrictions +"""""""""""" + +This pair style is part of the SMTBQ package and is only enabled +if LAMMPS is built with that package. See the :doc:`Build package ` page for more info. + +These pair potentials require the :doc:`newton ` setting to be "on" for pair interactions. + +Related commands +"""""""""""""""" + +* :doc:`pair_coeff ` + +Default +""""""" + +none + +---------- + +.. _Cyrot: + +**(Cyrot)** Cyrot-Lackmann and Ducastelle, Phys Rev. B, 4, 2406-2412 (1971). + +.. _Gupta: + +**(Gupta)** Gupta ,Phys Rev. B, 23, 6265-6270 (1981). + +.. _Rosato: + +**(Rosato)** Rosato and Guillope and Legrand, Philosophical Magazine A, 59.2, 321-336 (1989). + diff --git a/doc/src/pair_snap.rst b/doc/src/pair_snap.rst index 350561fe4d..ebedb288c1 100644 --- a/doc/src/pair_snap.rst +++ b/doc/src/pair_snap.rst @@ -136,7 +136,7 @@ keyword/value pair. The required keywords are *rcutfac* and *twojmax*\ . Optional keywords are *rfac0*, *rmin0*, *switchflag*, *bzeroflag*, *quadraticflag*, *chemflag*, *bnormflag*, *wselfallflag*, *switchinnerflag*, -*rinner*, *drinner*, *chunksize*, and *parallelthresh*\ . +*sinner*, *dinner*, *chunksize*, and *parallelthresh*\ . The default values for these keywords are @@ -152,6 +152,9 @@ The default values for these keywords are * *chunksize* = 32768 * *parallelthresh* = 8192 +For detailed definitions of all of these keywords, +see the :doc:`compute sna/atom ` doc page. + If *quadraticflag* is set to 1, then the SNAP energy expression includes additional quadratic terms that have been shown to increase the overall accuracy of the potential without much increase in computational cost @@ -194,7 +197,7 @@ pair_coeff command, to avoid ambiguity in the number of coefficients. The keyword *switchinnerflag* activates an additional switching function that smoothly turns off contributions to the SNAP potential from neighbor atoms at short separations. If *switchinnerflag* is set to 1 then -the additional keywords *rinner* and *drinner* must also be provided. +the additional keywords *sinner* and *dinner* must also be provided. Each of these is followed by *nelements* values, where *nelements* is the number of unique elements appearing in appearing in the LAMMPS pair_coeff command. The element order should correspond to the order @@ -217,9 +220,6 @@ already large enough to saturate the GPU threads. Extra parallelism will be performed if the *chunksize* (or total number of atoms per GPU) is smaller than *parallelthresh*. -Detailed definitions for all the other keywords -are given on the :doc:`compute sna/atom ` doc page. - .. note:: The previously used *diagonalstyle* keyword was removed in 2019, diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index b42e3c9a50..2bcd66590d 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -323,6 +323,8 @@ accelerated styles exist. * :doc:`resquared ` - Everaers RE-Squared ellipsoidal potential * :doc:`saip/metal ` - interlayer potential for hetero-junctions formed with hexagonal 2D materials and metal surfaces * :doc:`sdpd/taitwater/isothermal ` - smoothed dissipative particle dynamics for water at isothermal conditions +* :doc:`smatb ` - Second Moment Approximation to the Tight Binding +* :doc:`smatb/single ` - Second Moment Approximation to the Tight Binding for single-element systems * :doc:`smd/hertz ` - * :doc:`smd/tlsph ` - * :doc:`smd/tri_surface ` - diff --git a/doc/src/thermo_style.rst b/doc/src/thermo_style.rst index 5d63ed81b6..a5a8935dc4 100644 --- a/doc/src/thermo_style.rst +++ b/doc/src/thermo_style.rst @@ -85,7 +85,7 @@ Syntax f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below) f_ID[I][J] = I,J component of global array calculated by a fix with ID v_name = value calculated by an equal-style variable with name - v_name[I] = value calculated by a vector-style variable with name + v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below) Examples """""""" @@ -348,16 +348,15 @@ dimensions *lx*, *ly*, *lz*, *yz*, *xz*, *xy*\ . ---------- -For output values from a compute or fix, the bracketed index I used to -index a vector, as in *c_ID[I]* or *f_ID[I]*, can be specified -using a wildcard asterisk with the index to effectively specify -multiple values. This takes the form "\*" or "\*n" or "n\*" or "m\*n". -If N = the size of the vector (for *mode* = scalar) or the number of -columns in the array (for *mode* = vector), then an asterisk with no -numeric values means all indices from 1 to N. A leading asterisk -means all indices from 1 to n (inclusive). A trailing asterisk means -all indices from n to N (inclusive). A middle asterisk means all -indices from m to n (inclusive). +For output values from a compute or fix or variable, the bracketed +index I used to index a vector, as in *c_ID[I]* or *f_ID[I]* or +*v_name[I]*, can be specified using a wildcard asterisk with the index +to effectively specify multiple values. This takes the form "\*" or +"\*n" or "n\*" or "m\*n". If N = the size of the vector, then an +asterisk with no numeric values means all indices from 1 to N. A +leading asterisk means all indices from 1 to n (inclusive). A +trailing asterisk means all indices from n to N (inclusive). A middle +asterisk means all indices from m to n (inclusive). Using a wildcard is the same as if the individual elements of the vector had been listed one by one. E.g. these 2 thermo_style commands @@ -372,6 +371,15 @@ creates a global vector with 6 values. c_myTemp[1] c_myTemp[2] c_myTemp[3] & c_myTemp[4] c_myTemp[5] c_myTemp[6] + +.. note:: + + For a vector-style variable, only the wildcard forms "\*n" or + "m\*n" are allowed. You must specify the upper bound, because + vector-style variable lengths are not determined until the variable + is evaluated. If n is specified larger than the vector length + turns out to be, zeroes are output for missing vector values. + ---------- The *c_ID* and *c_ID[I]* and *c_ID[I][J]* keywords allow global values diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 49a313d491..2d97b81e66 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -697,6 +697,7 @@ DFT dftb dh dhex +di dia diag diagonalization @@ -788,6 +789,7 @@ dtheta dtshrink du dU +Ducastelle Dudarev Duin Dullweber @@ -895,6 +897,7 @@ Embt emi emol eN +endian energetics energyCorr eng @@ -1073,6 +1076,7 @@ fld floralwhite Florez flv +fm fmackay fmag fmass @@ -1252,6 +1256,7 @@ Gubbins Guenole Guericke gui +Guillope Gumbsch Gunsteren Gunzenmuller @@ -1729,6 +1734,7 @@ lebedeva Lebedeva Lebold Lechman +Legrand Lehoucq Leimkuhler Leite @@ -2644,6 +2650,7 @@ Polarizable polarizables polarizer Politano +Politecnico polyA polybond polydisperse @@ -2803,6 +2810,7 @@ Randisi randomizations rann RANN +Rapetti Raphson Rappe Ravelo @@ -2948,6 +2956,7 @@ Rohart Ronchetti Ronevich Rosati +Rosato Rosenberger Rossky rosybrown @@ -3125,6 +3134,7 @@ smallbig smallint Smallint smallsmall +smatb smd SMD smi @@ -3394,6 +3404,7 @@ toolchain topologies Toporov Torder +Torino torsions Tosi Toukmaji diff --git a/examples/ELASTIC_T/BORN_MATRIX/Silicon/output.in b/examples/ELASTIC_T/BORN_MATRIX/Silicon/output.in index d6a89cff6a..05e007fab6 100644 --- a/examples/ELASTIC_T/BORN_MATRIX/Silicon/output.in +++ b/examples/ELASTIC_T/BORN_MATRIX/Silicon/output.in @@ -136,5 +136,6 @@ variable C46 equal v_F46+v_B[20] variable C56 equal v_F56+v_B[21] thermo ${nthermo} -thermo_style custom step temp pe press density f_avt f_avp f_avpe v_F11 v_F22 v_F33 v_F44 v_F55 v_F66 v_F12 v_F13 v_F23 v_B[1] v_B[2] v_B[3] v_B[4] v_B[5] v_B[6] v_B[7] v_B[8] v_B[12] +thermo_style custom step temp pe press density f_avt f_avp f_avpe v_F11 v_F22 v_F33 v_F44 v_F55 v_F66 v_F12 v_F13 v_F23 v_B[*8] v_B[12] + thermo_modify norm no diff --git a/examples/PACKAGES/smtbq/AgCuPancake.data b/examples/PACKAGES/smtbq/AgCuPancake.data new file mode 100644 index 0000000000..09f732b4e9 --- /dev/null +++ b/examples/PACKAGES/smtbq/AgCuPancake.data @@ -0,0 +1,48 @@ +# AgCu Pancake : energy should be around -90.16 eV +34 atoms +2 atom types +0 30 xlo xhi +0 30 ylo yhi +0 30 zlo zhi + +Masses + +1 108 # Ag +2 64 # Cu + +Atoms # atomic + +1 1 11.8677744 17.4748811 16.8202155 +2 1 14.4591543 12.6388264 17.3769114 +3 1 19.2905996 14.8698601 15.9074284 +4 1 13.6418392 11.2583912 15.0376329 +5 1 16.5295136 18.8875825 16.3408808 +6 1 11.4394217 12.6680604 13.934792 +7 1 17.1772792 13.4579369 17.0971284 +8 1 11.7477198 12.5836832 16.6835448 +9 1 12.3254647 15.127665 12.9151285 +10 1 11.5595413 17.5592601 14.0713777 +11 1 18.9820568 14.9536515 13.1587506 +12 1 14.5653354 15.1189885 11.12255 +13 1 14.5797485 17.250847 17.5049696 +14 1 13.9305528 12.7833817 12.6633235 +15 1 12.8538576 14.9830633 17.6286053 +16 1 16.7229337 16.4525301 12.4627193 +17 1 14.0512024 17.3954338 12.7914031 +18 1 18.2824041 17.2316517 14.6999911 +19 1 16.2210303 18.9719703 13.5921161 +20 1 17.2517138 16.3080477 17.1761679 +21 1 16.0269821 11.057668 13.3712031 +22 1 16.3354169 10.9735982 16.1199203 +23 1 13.9149278 18.8223918 15.2392839 +24 1 18.1136886 12.5568867 14.5759053 +25 1 16.6484505 13.6019749 12.3834541 +26 1 11.0468778 15.1307677 15.4471491 +27 1 15.4347551 14.8811145 18.8773723 +28 2 15.1502129 14.9589199 16.3394186 +29 2 13.2837251 13.9076768 15.1588849 +30 2 13.4425035 16.3005712 15.2145264 +31 2 15.7534979 16.8960911 14.9738557 +32 2 15.4967806 13.024304 14.8837423 +33 2 14.8498337 15.0410649 13.6605697 +34 2 17.0232044 14.8712576 14.7690776 diff --git a/examples/PACKAGES/smtbq/in.smatbAgCuPancake b/examples/PACKAGES/smtbq/in.smatbAgCuPancake new file mode 100644 index 0000000000..5ccd9c8efb --- /dev/null +++ b/examples/PACKAGES/smtbq/in.smatbAgCuPancake @@ -0,0 +1,38 @@ +# -*- lammps -*- + +units metal +atom_style atomic +boundary p p p + +read_data AgCuPancake.data + +pair_style smatb +# NN p q a qsi cutOff_Start cutOff_End +pair_coeff 1 1 2.89 10.85 3.18 0.1031 1.1895 4.08707719 5.0056268338740553 +pair_coeff 1 2 2.725 10.70 2.805 0.0977 1.2275 4.08707719 4.4340500673763259 +pair_coeff 2 2 2.56 10.55 2.43 0.0894 1.2799 3.62038672 4.4340500673763259 + + +neighbor 8.0 bin +neigh_modify every 1 delay 0 check yes + +thermo 1 +minimize 1.0e-8 1.0e-10 10000 100000 + +velocity all create 600.0 761341 rot yes mom yes + +fix 1 all nve +thermo 10 +timestep 0.005 + +#dump 1 all atom 50 dump.smatb + +#dump 2 all image 10 image.*.jpg element element & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Ag Cu + +#dump 3 all movie 10 movie.mpg element element & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Ag Cu + +run 10000 \ No newline at end of file diff --git a/examples/PACKAGES/smtbq/in.smatbBulkFCC b/examples/PACKAGES/smtbq/in.smatbBulkFCC new file mode 100644 index 0000000000..286ee2accf --- /dev/null +++ b/examples/PACKAGES/smtbq/in.smatbBulkFCC @@ -0,0 +1,27 @@ +# -*- lammps -*- + +units metal +atom_style atomic +boundary p p p + +lattice fcc 4.0782 + +region myreg block 0 8 0 8 0 8 + +create_box 1 myreg + +create_atoms 1 box + +mass 1 196.96655 # Au + +pair_style smatb/single +pair_coeff 1 1 2.88 10.35 4.178 0.210 1.818 4.07293506 4.9883063257983666 + +neighbor 8.0 bin +neigh_modify every 1 delay 0 check yes + +thermo 1 +fix boxmin all box/relax iso 1.0 +minimize 1.0e-8 1.0e-10 10000 100000 +unfix boxmin +minimize 1.0e-8 1.0e-10 10000 100000 diff --git a/examples/PACKAGES/smtbq/log.27Oct21.smatbAgCuPancake.g++ b/examples/PACKAGES/smtbq/log.27Oct21.smatbAgCuPancake.g++ new file mode 100644 index 0000000000..bd162728f2 --- /dev/null +++ b/examples/PACKAGES/smtbq/log.27Oct21.smatbAgCuPancake.g++ @@ -0,0 +1,1127 @@ +LAMMPS (27 Oct 2021) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# -*- lammps -*- + +units metal +atom_style atomic +boundary p p p + +read_data AgCuPancake.data +Reading data file ... + orthogonal box = (0.0000000 0.0000000 0.0000000) to (30.000000 30.000000 30.000000) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 34 atoms + read_data CPU = 0.000 seconds + +pair_style smatb +# NN p q a qsi cutOff_Start cutOff_End +pair_coeff 1 1 2.89 10.85 3.18 0.1031 1.1895 4.08707719 5.0056268338740553 +pair_coeff 1 2 2.725 10.70 2.805 0.0977 1.2275 4.08707719 4.4340500673763259 +pair_coeff 2 2 2.56 10.55 2.43 0.0894 1.2799 3.62038672 4.4340500673763259 + + +neighbor 8.0 bin +neigh_modify every 1 delay 0 check yes + +thermo 1 +minimize 1.0e-8 1.0e-10 10000 100000 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 13.005627 + ghost atom cutoff = 13.005627 + binsize = 6.5028134, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair smatb, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.186 | 4.186 | 4.186 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -90.165962 0 -90.165962 0.15999216 + 1 0 -90.165962 0 -90.165962 0.016319576 +Loop time of 6.8907e-05 on 1 procs for 1 steps with 34 atoms + +98.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -90.1659620528124 -90.1659620528124 -90.1659622946346 + Force two-norm initial, final = 0.0024917172 0.0017840646 + Force max component initial, final = 0.00098891473 0.00054742198 + Final line search alpha, max atom move = 1.0000000 0.00054742198 + Iterations, force evaluations = 1 2 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 5.6089e-05 | 5.6089e-05 | 5.6089e-05 | 0.0 | 81.40 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 1.725e-06 | 1.725e-06 | 1.725e-06 | 0.0 | 2.50 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.109e-05 | | | 16.10 + +Nlocal: 34.0000 ave 34 max 34 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 56.0000 ave 56 max 56 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 561.000 ave 561 max 561 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 561 +Ave neighs/atom = 16.500000 +Neighbor list builds = 0 +Dangerous builds = 0 + +velocity all create 600.0 761341 rot yes mom yes + +fix 1 all nve +thermo 10 +timestep 0.005 + +#dump 1 all atom 50 dump.smatb + +#dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Per MPI rank memory allocation (min/avg/max) = 3.061 | 3.061 | 3.061 Mbytes +Step Temp E_pair E_mol TotEng Press + 1 600 -90.165962 0 -87.606611 101.26402 + 10 298.0506 -88.871794 0 -87.600434 548.48617 + 20 248.60946 -88.662484 0 -87.602019 90.486083 + 30 221.44826 -88.545423 0 -87.600817 -508.39815 + 40 228.33268 -88.575214 0 -87.601242 -589.39365 + 50 245.7154 -88.649826 0 -87.601706 65.305495 + 60 273.03023 -88.765916 0 -87.601283 398.01803 + 70 366.50025 -89.166263 0 -87.602925 207.77985 + 80 276.91193 -88.782331 0 -87.60114 8.3684522 + 90 307.868 -88.915252 0 -87.602015 -304.72741 + 100 322.45302 -88.977777 0 -87.602327 -205.15812 + 110 303.31578 -88.896089 0 -87.60227 260.03553 + 120 269.99988 -88.753066 0 -87.601359 351.68785 + 130 286.8011 -88.825253 0 -87.601879 -64.479292 + 140 287.40216 -88.827221 0 -87.601282 -315.09505 + 150 328.85371 -89.004517 0 -87.601764 -298.80386 + 160 284.47173 -88.814826 0 -87.601388 358.1389 + 170 280.279 -88.797886 0 -87.602332 467.92358 + 180 311.43691 -88.931598 0 -87.603138 -77.489811 + 190 193.15923 -88.423986 0 -87.600048 -425.5563 + 200 304.96368 -88.902942 0 -87.602094 -596.60958 + 210 302.68927 -88.892198 0 -87.601051 91.636064 + 220 309.19801 -88.920064 0 -87.601153 621.21354 + 230 380.73063 -89.22681 0 -87.602771 447.14396 + 240 284.74877 -88.816012 0 -87.601392 -119.01968 + 250 238.52309 -88.61849 0 -87.601049 -501.65646 + 260 259.11102 -88.707412 0 -87.602152 -368.93359 + 270 251.74586 -88.674842 0 -87.600999 175.03119 + 280 382.00434 -89.231874 0 -87.602403 290.82425 + 290 310.3687 -88.924886 0 -87.600982 293.57749 + 300 279.433 -88.79349 0 -87.601545 -42.519241 + 310 276.82128 -88.781921 0 -87.601116 -274.91273 + 320 290.86073 -88.842663 0 -87.601972 -251.72319 + 330 247.13231 -88.655944 0 -87.60178 215.5825 + 340 304.78418 -88.902207 0 -87.602125 224.33743 + 350 321.83348 -88.975242 0 -87.602434 -146.36749 + 360 256.1084 -88.693238 0 -87.600785 -243.86723 + 370 333.28383 -89.023692 0 -87.602042 -202.7226 + 380 324.46336 -88.985932 0 -87.601906 338.96104 + 390 297.78689 -88.872153 0 -87.601918 474.90823 + 400 323.523 -88.983153 0 -87.603138 70.699072 + 410 241.32969 -88.630465 0 -87.601053 -335.98449 + 420 216.24017 -88.522752 0 -87.600361 -483.64034 + 430 340.87719 -89.057194 0 -87.603153 -153.19639 + 440 297.22954 -88.871197 0 -87.603339 437.42311 + 450 297.67599 -88.8724 0 -87.602638 411.10618 + 460 347.10992 -89.082494 0 -87.601867 -85.383428 + 470 310.98706 -88.928867 0 -87.602325 -258.83538 + 480 243.70408 -88.64023 0 -87.600689 -209.15529 + 490 202.36375 -88.462523 0 -87.599323 30.433491 + 500 310.02578 -88.925742 0 -87.603301 102.03538 + 510 311.17419 -88.929206 0 -87.601866 141.67864 + 520 338.18968 -89.045078 0 -87.602502 -16.941008 + 530 264.61141 -88.730468 0 -87.601746 187.78747 + 540 304.0748 -88.899894 0 -87.602837 -23.335389 + 550 257.2387 -88.699533 0 -87.60226 -76.623864 + 560 255.29649 -88.689478 0 -87.600489 -157.6005 + 570 296.00752 -88.86567 0 -87.603025 -80.312046 + 580 276.10128 -88.780334 0 -87.6026 53.17176 + 590 308.39452 -88.918678 0 -87.603195 38.274105 + 600 287.50603 -88.829033 0 -87.602652 114.15043 + 610 325.44631 -88.990713 0 -87.602494 -149.00031 + 620 296.79101 -88.868281 0 -87.602294 -31.191595 + 630 233.20643 -88.596762 0 -87.602 51.803242 + 640 366.28772 -89.16588 0 -87.603448 -35.874837 + 650 287.00582 -88.826607 0 -87.602359 108.51296 + 660 250.92942 -88.672951 0 -87.60259 71.245421 + 670 262.05685 -88.719309 0 -87.601484 -45.906179 + 680 325.28482 -88.989008 0 -87.601478 -153.5577 + 690 305.21477 -88.902942 0 -87.601023 86.906849 + 700 311.86315 -88.931883 0 -87.601604 101.32482 + 710 236.96144 -88.61142 0 -87.60064 80.204649 + 720 279.15425 -88.792529 0 -87.601773 -299.79972 + 730 324.76243 -88.988046 0 -87.602745 -190.80505 + 740 263.42453 -88.726147 0 -87.602488 265.91457 + 750 302.62838 -88.893264 0 -87.602377 140.40681 + 760 319.02473 -88.96278 0 -87.601953 31.374117 + 770 250.8839 -88.672034 0 -87.601867 -107.29433 + 780 270.67757 -88.756034 0 -87.601436 -223.11211 + 790 325.22943 -88.989523 0 -87.60223 -7.8218354 + 800 315.84743 -88.949085 0 -87.601811 158.29361 + 810 285.44223 -88.818547 0 -87.600969 348.1465 + 820 273.78228 -88.769575 0 -87.601733 -40.315077 + 830 278.78036 -88.790787 0 -87.601626 -239.09329 + 840 301.53249 -88.887576 0 -87.601364 -210.8338 + 850 299.43388 -88.879524 0 -87.602263 97.287213 + 860 289.9817 -88.83822 0 -87.601278 236.16201 + 870 308.32291 -88.917016 0 -87.601838 26.230231 + 880 286.88415 -88.826564 0 -87.602836 -12.642436 + 890 293.46738 -88.854834 0 -87.603024 -177.77579 + 900 260.54906 -88.713526 0 -87.602132 -138.78025 + 910 310.93853 -88.928482 0 -87.602147 5.3207191 + 920 331.11482 -89.015365 0 -87.602967 181.82814 + 930 278.62443 -88.790683 0 -87.602186 313.60224 + 940 307.93562 -88.915181 0 -87.601656 -139.69608 + 950 291.81836 -88.846372 0 -87.601596 -327.26973 + 960 277.8025 -88.786647 0 -87.601657 -129.44547 + 970 261.49577 -88.717364 0 -87.601931 242.6305 + 980 308.0163 -88.916951 0 -87.603082 169.78602 + 990 290.00437 -88.838536 0 -87.601498 44.660874 + 1000 357.1344 -89.126236 0 -87.602849 -265.91044 + 1010 283.45708 -88.810737 0 -87.601627 -152.47623 + 1020 297.97492 -88.874959 0 -87.603921 70.00523 + 1030 279.12249 -88.792681 0 -87.602061 159.79846 + 1040 312.39383 -88.934418 0 -87.601876 158.68328 + 1050 337.09276 -89.040629 0 -87.602731 -31.702724 + 1060 227.23727 -88.568884 0 -87.599584 -28.800733 + 1070 283.40375 -88.811423 0 -87.60254 -124.80818 + 1080 271.42275 -88.759439 0 -87.601662 -37.628741 + 1090 335.15468 -89.032775 0 -87.603144 -56.099081 + 1100 261.64481 -88.717593 0 -87.601525 176.07594 + 1110 297.2909 -88.870077 0 -87.601957 205.98241 + 1120 290.77288 -88.843161 0 -87.602844 -84.55887 + 1130 317.14042 -88.955942 0 -87.603153 -340.75016 + 1140 359.81744 -89.138017 0 -87.603185 -105.8786 + 1150 209.98715 -88.49576 0 -87.600042 230.91225 + 1160 324.43808 -88.986117 0 -87.602199 217.03324 + 1170 325.4821 -88.990737 0 -87.602366 1.5123229 + 1180 248.5009 -88.662178 0 -87.602177 -119.39002 + 1190 277.64425 -88.787604 0 -87.603289 -117.53181 + 1200 320.04284 -88.968181 0 -87.603011 -25.685206 + 1210 364.27176 -89.157253 0 -87.603421 75.929091 + 1220 234.49906 -88.600929 0 -87.600654 198.93977 + 1230 323.21645 -88.981743 0 -87.603036 -26.795407 + 1240 306.44746 -88.909845 0 -87.602668 -226.30248 + 1250 262.65422 -88.721948 0 -87.601575 -139.61234 + 1260 297.83104 -88.874145 0 -87.603721 127.64441 + 1270 319.69077 -88.967441 0 -87.603773 211.1439 + 1280 322.04803 -88.975391 0 -87.601668 120.21183 + 1290 302.37605 -88.891213 0 -87.601402 -164.43253 + 1300 226.70372 -88.568572 0 -87.601548 -143.94049 + 1310 222.50036 -88.550282 0 -87.601188 -163.7893 + 1320 338.85208 -89.048398 0 -87.602995 -102.76279 + 1330 370.2677 -89.182829 0 -87.603421 202.90736 + 1340 304.48434 -88.900827 0 -87.602023 436.17765 + 1350 271.13466 -88.758223 0 -87.601675 108.36451 + 1360 292.87592 -88.851046 0 -87.601759 -411.70922 + 1370 286.17601 -88.822909 0 -87.602201 -323.81016 + 1380 271.92765 -88.761741 0 -87.60181 -38.742365 + 1390 277.75266 -88.785982 0 -87.601205 391.17924 + 1400 347.88168 -89.086571 0 -87.602652 183.08725 + 1410 295.96621 -88.86433 0 -87.601861 -84.0265 + 1420 261.00333 -88.715462 0 -87.60213 -94.433666 + 1430 244.17278 -88.644119 0 -87.60258 -163.1004 + 1440 301.17108 -88.888009 0 -87.603338 -144.27123 + 1450 356.09498 -89.121777 0 -87.602823 -1.8206165 + 1460 332.86257 -89.021897 0 -87.602043 179.46074 + 1470 276.25226 -88.779864 0 -87.601487 376.39659 + 1480 302.47254 -88.892321 0 -87.602098 -88.155871 + 1490 246.60945 -88.652741 0 -87.600807 -132.37692 + 1500 284.04878 -88.813017 0 -87.601383 -290.0804 + 1510 283.76682 -88.812624 0 -87.602193 -33.272095 + 1520 254.7339 -88.688407 0 -87.601818 248.83014 + 1530 318.68849 -88.962694 0 -87.603302 99.197646 + 1540 322.71768 -88.979845 0 -87.603265 -45.038776 + 1550 243.53105 -88.639953 0 -87.601151 -131.47472 + 1560 267.44357 -88.742006 0 -87.601203 -89.590067 + 1570 286.79346 -88.824365 0 -87.601023 73.346429 + 1580 356.46927 -89.123462 0 -87.602912 -33.880707 + 1590 299.98929 -88.882122 0 -87.602492 136.18054 + 1600 277.07373 -88.785253 0 -87.603371 124.34489 + 1610 295.80216 -88.865226 0 -87.603457 -102.03415 + 1620 289.16666 -88.835667 0 -87.602202 -111.10681 + 1630 287.95146 -88.829784 0 -87.601503 -111.35052 + 1640 286.80875 -88.825858 0 -87.602451 83.844874 + 1650 275.08285 -88.775129 0 -87.60174 129.65013 + 1660 306.29672 -88.908967 0 -87.602432 -114.4214 + 1670 267.75873 -88.744656 0 -87.602508 -25.706225 + 1680 305.78446 -88.906817 0 -87.602467 -59.786573 + 1690 312.45402 -88.935284 0 -87.602484 27.295541 + 1700 279.11278 -88.794103 0 -87.603523 89.965543 + 1710 288.88848 -88.835185 0 -87.602907 46.419876 + 1720 310.9645 -88.928819 0 -87.602373 -93.075985 + 1730 268.93523 -88.747955 0 -87.600789 -91.989455 + 1740 294.57034 -88.858645 0 -87.602131 61.734208 + 1750 321.07641 -88.971939 0 -87.60236 -56.677925 + 1760 316.37702 -88.951114 0 -87.601581 209.15256 + 1770 277.22368 -88.785542 0 -87.603021 36.332449 + 1780 216.82668 -88.526023 0 -87.60113 -65.279021 + 1790 277.5677 -88.785691 0 -87.601702 -267.0748 + 1800 305.49588 -88.906685 0 -87.603566 -121.29205 + 1810 245.19957 -88.647543 0 -87.601624 293.34959 + 1820 344.99793 -89.073805 0 -87.602187 21.468923 + 1830 339.88657 -89.052485 0 -87.60267 -0.74286605 + 1840 246.70406 -88.653429 0 -87.601092 -88.583558 + 1850 324.78426 -88.989278 0 -87.603883 -127.0114 + 1860 288.73025 -88.833258 0 -87.601655 211.26226 + 1870 278.825 -88.791203 0 -87.601851 57.213965 + 1880 259.9335 -88.710377 0 -87.601609 22.449955 + 1890 256.11656 -88.693666 0 -87.601179 -140.61185 + 1900 281.84197 -88.804539 0 -87.602318 -112.01218 + 1910 319.25233 -88.964241 0 -87.602443 -43.005465 + 1920 335.34404 -89.033272 0 -87.602833 152.12463 + 1930 287.22826 -88.826665 0 -87.601468 249.61663 + 1940 310.67727 -88.926909 0 -87.601688 -10.319445 + 1950 283.51674 -88.811636 0 -87.602271 -162.04573 + 1960 279.31371 -88.793728 0 -87.602292 -265.7411 + 1970 256.30742 -88.694226 0 -87.600925 -38.707208 + 1980 333.25931 -89.024082 0 -87.602536 192.87856 + 1990 262.09798 -88.718972 0 -87.600971 283.75345 + 2000 289.03468 -88.834899 0 -87.601997 -87.145015 + 2010 259.61063 -88.707653 0 -87.600262 -260.74116 + 2020 340.97507 -89.056481 0 -87.602023 -187.81852 + 2030 306.81218 -88.910403 0 -87.601669 237.58171 + 2040 252.35573 -88.67799 0 -87.601545 322.76321 + 2050 284.67415 -88.816302 0 -87.602001 -3.8812621 + 2060 309.79645 -88.923171 0 -87.601708 -392.72626 + 2070 310.38253 -88.925966 0 -87.602003 -278.95375 + 2080 230.78966 -88.584789 0 -87.600336 293.00497 + 2090 296.90589 -88.868332 0 -87.601855 299.99507 + 2100 335.41016 -89.032518 0 -87.601798 21.683373 + 2110 288.43159 -88.831561 0 -87.601232 -250.86825 + 2120 220.80849 -88.542642 0 -87.600765 -136.68286 + 2130 297.90252 -88.872849 0 -87.602121 59.496605 + 2140 337.23055 -89.040459 0 -87.601974 119.22971 + 2150 313.52255 -88.938713 0 -87.601356 115.06472 + 2160 292.98902 -88.851486 0 -87.601716 2.7445423 + 2170 273.90882 -88.770222 0 -87.601841 -96.49089 + 2180 248.16043 -88.660088 0 -87.601539 -106.85882 + 2190 250.71686 -88.671169 0 -87.601715 32.540922 + 2200 275.08695 -88.775471 0 -87.602064 101.49633 + 2210 280.47811 -88.798356 0 -87.601953 20.917113 + 2220 282.21468 -88.805209 0 -87.601398 -142.41557 + 2230 284.46122 -88.814808 0 -87.601414 -129.41367 + 2240 284.8132 -88.816427 0 -87.601532 149.77109 + 2250 340.37526 -89.054127 0 -87.602227 115.16936 + 2260 305.22379 -88.9037 0 -87.601742 98.721078 + 2270 263.49622 -88.725657 0 -87.601692 -31.745137 + 2280 278.57193 -88.789913 0 -87.60164 -248.85369 + 2290 293.66029 -88.854561 0 -87.601928 -185.69862 + 2300 251.11644 -88.672199 0 -87.601041 190.89504 + 2310 332.43677 -89.020431 0 -87.602394 203.52898 + 2320 290.01895 -88.838399 0 -87.601299 147.03244 + 2330 326.2652 -88.994667 0 -87.602956 -130.95657 + 2340 270.77609 -88.756585 0 -87.601566 -201.99811 + 2350 283.93117 -88.812499 0 -87.601367 -121.74617 + 2360 314.9765 -88.946149 0 -87.60259 30.535547 + 2370 235.15428 -88.604199 0 -87.601129 249.78507 + 2380 282.26072 -88.806684 0 -87.602677 68.136964 + 2390 258.81794 -88.705424 0 -87.601414 -145.85092 + 2400 287.72284 -88.829128 0 -87.601821 -198.27117 + 2410 260.55603 -88.712577 0 -87.601153 97.777193 + 2420 297.8966 -88.871728 0 -87.601025 125.72687 + 2430 328.18828 -89.001213 0 -87.601298 -3.2490497 + 2440 358.64024 -89.132558 0 -87.602748 -108.67289 + 2450 319.57239 -88.965616 0 -87.602453 -90.52998 + 2460 261.49529 -88.717297 0 -87.601867 147.03783 + 2470 223.10162 -88.553271 0 -87.601612 213.213 + 2480 333.20922 -89.024686 0 -87.603354 -68.358579 + 2490 273.71813 -88.769955 0 -87.602387 -123.4927 + 2500 279.16171 -88.793277 0 -87.602489 -176.4558 + 2510 285.93636 -88.821189 0 -87.601504 21.244174 + 2520 368.13848 -89.173599 0 -87.603273 -20.382071 + 2530 310.77859 -88.928364 0 -87.602712 210.08027 + 2540 262.51949 -88.722218 0 -87.602419 146.22255 + 2550 309.35998 -88.92315 0 -87.603549 -124.54143 + 2560 293.1883 -88.85364 0 -87.60302 -174.73055 + 2570 235.5354 -88.605636 0 -87.60094 -147.8302 + 2580 262.26246 -88.719957 0 -87.601254 132.92258 + 2590 297.9783 -88.873 0 -87.601949 163.59526 + 2600 337.95031 -89.044756 0 -87.603201 82.366096 + 2610 312.04058 -88.934176 0 -87.60314 -105.04005 + 2620 306.10812 -88.908373 0 -87.602642 -57.202268 + 2630 329.4455 -89.008169 0 -87.602892 -123.76392 + 2640 302.90799 -88.894737 0 -87.602658 29.475338 + 2650 255.98033 -88.692779 0 -87.600874 212.57201 + 2660 261.06597 -88.714857 0 -87.601258 -36.171249 + 2670 281.20605 -88.800943 0 -87.601435 -183.50802 + 2680 319.89609 -88.967189 0 -87.602645 -71.481315 + 2690 304.67608 -88.902183 0 -87.602561 85.436128 + 2700 265.57153 -88.734455 0 -87.601637 224.74321 + 2710 349.54292 -89.094332 0 -87.603327 4.623035 + 2720 297.45437 -88.870532 0 -87.601715 -125.8209 + 2730 244.61743 -88.644959 0 -87.601523 -178.44193 + 2740 272.62342 -88.764408 0 -87.60151 -48.316065 + 2750 326.42705 -88.994651 0 -87.602249 151.52456 + 2760 291.38619 -88.845698 0 -87.602765 290.11335 + 2770 275.93304 -88.779795 0 -87.602779 -13.76015 + 2780 272.37319 -88.764568 0 -87.602737 -318.44654 + 2790 290.70559 -88.843014 0 -87.602985 -258.42515 + 2800 308.7225 -88.919307 0 -87.602425 22.676349 + 2810 256.52836 -88.695266 0 -87.601023 447.65996 + 2820 344.16031 -89.070568 0 -87.602523 93.296657 + 2830 281.44982 -88.801699 0 -87.601151 -74.40623 + 2840 324.35065 -88.985972 0 -87.602427 -296.67623 + 2850 292.24196 -88.849221 0 -87.602638 -53.022729 + 2860 277.92071 -88.788021 0 -87.602527 184.19688 + 2870 267.98132 -88.744312 0 -87.601215 94.095665 + 2880 303.05651 -88.894748 0 -87.602035 -8.3625484 + 2890 298.407 -88.875479 0 -87.602599 -78.796087 + 2900 234.73876 -88.602815 0 -87.601517 -42.812553 + 2910 285.89412 -88.821185 0 -87.601679 -19.254602 + 2920 345.83606 -89.07659 0 -87.601397 -51.025785 + 2930 285.25518 -88.817169 0 -87.600389 124.00245 + 2940 287.8466 -88.830105 0 -87.602271 49.193049 + 2950 278.4476 -88.790218 0 -87.602476 -46.973715 + 2960 270.16862 -88.754079 0 -87.601652 -46.724344 + 2970 300.52185 -88.883577 0 -87.601675 -99.868205 + 2980 307.7387 -88.914716 0 -87.60203 43.688798 + 2990 249.77056 -88.666671 0 -87.601253 203.36707 + 3000 300.43256 -88.883668 0 -87.602147 -26.615095 + 3010 323.13288 -88.980545 0 -87.602195 -92.22829 + 3020 329.13355 -89.006442 0 -87.602495 -129.38245 + 3030 300.89554 -88.886382 0 -87.602886 179.61331 + 3040 286.08177 -88.823344 0 -87.603038 108.14874 + 3050 289.27168 -88.837216 0 -87.603303 -151.68863 + 3060 242.99745 -88.639024 0 -87.602497 -46.622787 + 3070 239.42451 -88.622374 0 -87.601088 -107.46784 + 3080 336.58172 -89.03916 0 -87.603442 -39.955468 + 3090 271.44098 -88.758793 0 -87.600939 144.99325 + 3100 305.41376 -88.904823 0 -87.602054 154.84856 + 3110 336.8339 -89.040191 0 -87.603398 -74.449283 + 3120 320.07639 -88.96839 0 -87.603077 -86.636763 + 3130 319.32742 -88.964561 0 -87.602443 -149.45532 + 3140 258.56363 -88.704139 0 -87.601214 84.555403 + 3150 322.68621 -88.980076 0 -87.603631 172.40088 + 3160 234.31315 -88.600667 0 -87.601184 85.231478 + 3170 277.41953 -88.78497 0 -87.601613 -171.04636 + 3180 265.27627 -88.732774 0 -87.601216 -156.19852 + 3190 308.59394 -88.918416 0 -87.602083 -91.732331 + 3200 253.64464 -88.682808 0 -87.600865 214.39093 + 3210 328.22789 -89.003191 0 -87.603107 34.541243 + 3220 365.99924 -89.1642 0 -87.602999 23.702355 + 3230 273.01552 -88.765837 0 -87.601266 -16.904842 + 3240 280.71999 -88.799849 0 -87.602414 -97.02155 + 3250 275.08527 -88.775919 0 -87.60252 -43.638625 + 3260 331.01691 -89.01573 0 -87.603749 -18.965313 + 3270 321.58474 -88.974892 0 -87.603145 140.51814 + 3280 269.96025 -88.753538 0 -87.601999 70.883446 + 3290 291.92993 -88.847175 0 -87.601923 70.468301 + 3300 297.5631 -88.871352 0 -87.602071 -109.75113 + 3310 294.11606 -88.856988 0 -87.602411 -180.2875 + 3320 254.67046 -88.687575 0 -87.601256 17.463819 + 3330 283.04794 -88.809101 0 -87.601736 12.033618 + 3340 294.71349 -88.858925 0 -87.6018 39.032437 + 3350 316.35213 -88.952176 0 -87.602749 79.633097 + 3360 326.42712 -88.995001 0 -87.602598 15.135413 + 3370 253.32292 -88.681674 0 -87.601103 -8.7130662 + 3380 281.35311 -88.802268 0 -87.602132 -59.556266 + 3390 268.34143 -88.746344 0 -87.601711 -91.533166 + 3400 331.05467 -89.01509 0 -87.602948 -107.20459 + 3410 316.65229 -88.953063 0 -87.602355 158.10005 + 3420 283.079 -88.808978 0 -87.60148 274.27946 + 3430 311.45934 -88.930353 0 -87.601797 120.83161 + 3440 285.50655 -88.819489 0 -87.601637 -245.88312 + 3450 280.02107 -88.795963 0 -87.601509 -327.96932 + 3460 288.10267 -88.83055 0 -87.601623 -5.7258254 + 3470 302.73461 -88.89438 0 -87.60304 188.36126 + 3480 224.52412 -88.558184 0 -87.600457 308.75825 + 3490 317.51541 -88.956614 0 -87.602225 -150.50518 + 3500 284.55522 -88.815462 0 -87.601667 -210.62835 + 3510 248.09145 -88.65989 0 -87.601634 -53.739349 + 3520 353.53989 -89.111774 0 -87.60372 28.230465 + 3530 336.58346 -89.039227 0 -87.603501 142.33655 + 3540 290.62992 -88.842498 0 -87.602792 71.847364 + 3550 277.75405 -88.786979 0 -87.602196 -40.584697 + 3560 318.42825 -88.960244 0 -87.601962 -22.584843 + 3570 225.15997 -88.560726 0 -87.600287 216.23175 + 3580 318.03228 -88.960249 0 -87.603655 -45.672889 + 3590 247.21192 -88.656058 0 -87.601555 -188.06277 + 3600 291.55301 -88.846461 0 -87.602816 -325.60758 + 3610 307.71762 -88.91562 0 -87.603024 29.638779 + 3620 262.70243 -88.721527 0 -87.600947 321.78658 + 3630 322.97195 -88.980884 0 -87.60322 243.40964 + 3640 324.87513 -88.989047 0 -87.603264 -109.11128 + 3650 288.71025 -88.8339 0 -87.602382 -280.42766 + 3660 255.02092 -88.689275 0 -87.601462 -161.78801 + 3670 278.98636 -88.792509 0 -87.602469 109.11677 + 3680 337.06609 -89.040927 0 -87.603143 287.31558 + 3690 375.14756 -89.204281 0 -87.604058 196.10195 + 3700 301.72812 -88.89049 0 -87.603443 -85.709028 + 3710 239.20552 -88.621184 0 -87.600833 -222.056 + 3720 295.99847 -88.864505 0 -87.601898 -249.54504 + 3730 261.77546 -88.71888 0 -87.602255 36.72757 + 3740 297.16658 -88.870481 0 -87.602892 227.98221 + 3750 270.96529 -88.757349 0 -87.601524 241.06705 + 3760 295.55767 -88.863564 0 -87.602837 -246.15553 + 3770 326.51689 -88.996355 0 -87.603569 -272.08249 + 3780 291.28573 -88.844152 0 -87.601648 28.403883 + 3790 328.73683 -89.00472 0 -87.602465 263.09901 + 3800 265.68647 -88.734543 0 -87.601234 343.29907 + 3810 300.54973 -88.883967 0 -87.601947 -173.35675 + 3820 297.37157 -88.870956 0 -87.602492 -417.02797 + 3830 248.60853 -88.662043 0 -87.601582 -104.70522 + 3840 331.10334 -89.015661 0 -87.603312 246.52537 + 3850 295.43625 -88.861461 0 -87.601253 335.57407 + 3860 250.65051 -88.670022 0 -87.600851 16.821723 + 3870 275.91466 -88.77985 0 -87.602912 -204.72526 + 3880 247.52305 -88.657628 0 -87.601798 -262.31128 + 3890 278.27494 -88.789212 0 -87.602207 -74.977816 + 3900 323.86763 -88.984888 0 -87.603404 59.047904 + 3910 347.60149 -89.085283 0 -87.60256 171.25619 + 3920 312.99147 -88.937381 0 -87.602289 170.30026 + 3930 297.48976 -88.871807 0 -87.60284 2.6484041 + 3940 267.28885 -88.742478 0 -87.602335 -58.142775 + 3950 246.51718 -88.654336 0 -87.602796 -167.34403 + 3960 264.17557 -88.729343 0 -87.60248 -100.28807 + 3970 333.73536 -89.026904 0 -87.603327 90.348866 + 3980 285.07067 -88.817755 0 -87.601762 214.74178 + 3990 332.84149 -89.022933 0 -87.60317 -30.045029 + 4000 288.10707 -88.831218 0 -87.602273 -172.23178 + 4010 265.16371 -88.73362 0 -87.602542 -80.198459 + 4020 313.95464 -88.942637 0 -87.603437 -10.716749 + 4030 293.6689 -88.85493 0 -87.602261 13.230785 + 4040 259.93582 -88.710823 0 -87.602045 163.87062 + 4050 280.51921 -88.798918 0 -87.60234 -52.163875 + 4060 328.50951 -89.00489 0 -87.603605 -101.47046 + 4070 288.69983 -88.833542 0 -87.602068 14.586327 + 4080 320.50238 -88.97025 0 -87.60312 36.450654 + 4090 273.4762 -88.768521 0 -87.601985 192.59029 + 4100 321.19015 -88.972492 0 -87.602428 -59.141777 + 4110 291.66841 -88.846169 0 -87.602033 -99.613167 + 4120 295.93217 -88.865324 0 -87.603 -150.13992 + 4130 247.71884 -88.657195 0 -87.600529 99.861274 + 4140 304.00295 -88.899334 0 -87.602584 92.005604 + 4150 272.80116 -88.76564 0 -87.601984 53.204611 + 4160 293.25313 -88.85353 0 -87.602634 -28.525992 + 4170 298.7938 -88.877882 0 -87.603352 -163.10833 + 4180 301.52035 -88.89006 0 -87.6039 -72.066736 + 4190 308.26807 -88.918415 0 -87.603471 38.967573 + 4200 302.22603 -88.891295 0 -87.602124 124.30224 + 4210 330.92194 -89.015332 0 -87.603757 122.67286 + 4220 268.57664 -88.74812 0 -87.602484 28.378203 + 4230 302.59315 -88.893101 0 -87.602364 -188.39724 + 4240 271.69213 -88.759691 0 -87.600766 -77.147939 + 4250 313.01033 -88.937927 0 -87.602755 46.319411 + 4260 304.68575 -88.903105 0 -87.603442 141.6734 + 4270 269.2191 -88.750103 0 -87.601726 61.481497 + 4280 292.70334 -88.850651 0 -87.6021 -45.716729 + 4290 296.03015 -88.865926 0 -87.603184 -175.74721 + 4300 236.84427 -88.611419 0 -87.601139 39.770277 + 4310 270.15257 -88.753425 0 -87.601066 88.985049 + 4320 279.06324 -88.792683 0 -87.602315 7.7962133 + 4330 290.83598 -88.842874 0 -87.602289 -128.98967 + 4340 325.02615 -88.987976 0 -87.60155 -153.65778 + 4350 309.74371 -88.923794 0 -87.602556 101.36692 + 4360 333.87289 -89.02757 0 -87.603407 243.54183 + 4370 283.97121 -88.812603 0 -87.601299 159.97134 + 4380 265.75448 -88.735128 0 -87.60153 -40.979135 + 4390 235.53467 -88.606502 0 -87.601809 -292.92061 + 4400 271.90779 -88.762178 0 -87.602333 -238.3538 + 4410 259.56471 -88.708189 0 -87.600994 96.835101 + 4420 321.73463 -88.974354 0 -87.601968 267.38102 + 4430 361.51902 -89.144913 0 -87.602823 121.68332 + 4440 274.01224 -88.769984 0 -87.601162 93.037686 + 4450 262.42632 -88.720607 0 -87.601205 -205.20008 + 4460 260.43633 -88.712099 0 -87.601185 -280.86787 + 4470 305.19843 -88.904026 0 -87.602176 -128.56586 + 4480 270.09984 -88.753531 0 -87.601397 242.58675 + 4490 301.55315 -88.88915 0 -87.602849 356.34351 + 4500 329.2593 -89.007543 0 -87.603059 17.329732 + 4510 325.08065 -88.989355 0 -87.602696 -216.49233 + 4520 287.21081 -88.827617 0 -87.602495 -178.48794 + 4530 283.8706 -88.813383 0 -87.602509 -12.323587 + 4540 279.29297 -88.793207 0 -87.60186 159.35057 + 4550 306.59829 -88.910096 0 -87.602275 90.936021 + 4560 313.2314 -88.938793 0 -87.602678 -69.427966 + 4570 259.68814 -88.709405 0 -87.601683 -41.618037 + 4580 281.08579 -88.800834 0 -87.601838 -37.960165 + 4590 297.32173 -88.86967 0 -87.601419 37.526489 + 4600 300.74932 -88.885129 0 -87.602258 -22.326867 + 4610 273.00576 -88.765938 0 -87.601408 -31.346715 + 4620 316.54496 -88.9523 0 -87.602051 -52.098412 + 4630 287.43991 -88.827725 0 -87.601625 90.039641 + 4640 316.15696 -88.951283 0 -87.602688 171.18826 + 4650 306.20347 -88.909257 0 -87.60312 37.614423 + 4660 269.18155 -88.750321 0 -87.602104 -104.28384 + 4670 285.92568 -88.821934 0 -87.602294 -204.94093 + 4680 296.16755 -88.865944 0 -87.602616 -128.1243 + 4690 266.79367 -88.740131 0 -87.6021 228.90706 + 4700 321.38561 -88.973977 0 -87.60308 122.95489 + 4710 311.97398 -88.932966 0 -87.602214 31.633004 + 4720 301.22987 -88.887575 0 -87.602654 -82.435285 + 4730 303.19301 -88.897022 0 -87.603727 -145.57245 + 4740 278.81673 -88.791673 0 -87.602357 -84.135008 + 4750 271.23812 -88.759321 0 -87.602332 101.24241 + 4760 296.90147 -88.86955 0 -87.603092 82.791648 + 4770 287.42982 -88.828684 0 -87.602628 144.79507 + 4780 344.24479 -89.070825 0 -87.60242 -86.494514 + 4790 287.56501 -88.828545 0 -87.601912 -20.954162 + 4800 242.30285 -88.635474 0 -87.60191 -74.789737 + 4810 309.64379 -88.923632 0 -87.60282 -205.73876 + 4820 292.80064 -88.851258 0 -87.602292 144.83279 + 4830 310.10097 -88.925151 0 -87.602389 193.70379 + 4840 285.50995 -88.819953 0 -87.602086 37.48814 + 4850 305.97578 -88.906847 0 -87.601681 -198.7545 + 4860 247.27191 -88.655888 0 -87.601128 -102.42554 + 4870 297.46236 -88.871452 0 -87.602601 -36.355958 + 4880 304.39424 -88.901134 0 -87.602715 216.88721 + 4890 313.99299 -88.942238 0 -87.602874 184.97577 + 4900 359.79929 -89.139474 0 -87.60472 -115.24276 + 4910 246.74657 -88.653928 0 -87.601409 -119.55102 + 4920 262.83627 -88.723105 0 -87.601954 -79.709644 + 4930 321.64349 -88.975201 0 -87.603204 -37.089974 + 4940 278.55719 -88.789179 0 -87.60097 128.42582 + 4950 291.95516 -88.847012 0 -87.601653 146.81844 + 4960 269.53299 -88.752964 0 -87.603249 -104.39819 + 4970 296.61922 -88.869579 0 -87.604324 -119.95766 + 4980 287.08576 -88.827374 0 -87.602785 -94.80023 + 4990 314.20698 -88.943036 0 -87.60276 32.993272 + 5000 303.37619 -88.895704 0 -87.601627 158.70301 + 5010 282.31309 -88.804595 0 -87.600364 74.740851 + 5020 291.86827 -88.846876 0 -87.601887 65.092458 + 5030 263.48124 -88.725592 0 -87.601691 -75.44934 + 5040 300.4327 -88.884796 0 -87.603275 -140.02043 + 5050 273.27418 -88.768018 0 -87.602344 2.6067157 + 5060 287.857 -88.829359 0 -87.60148 38.746954 + 5070 290.96425 -88.843445 0 -87.602313 117.05904 + 5080 302.72352 -88.894564 0 -87.603271 23.026904 + 5090 300.84675 -88.886338 0 -87.603051 -103.07889 + 5100 299.51887 -88.880803 0 -87.60318 20.974538 + 5110 288.67025 -88.833789 0 -87.602441 54.235127 + 5120 306.88084 -88.911185 0 -87.602158 -138.78645 + 5130 283.69636 -88.812103 0 -87.601972 93.880569 + 5140 271.56869 -88.760004 0 -87.601605 90.151944 + 5150 266.38896 -88.738154 0 -87.60185 56.359177 + 5160 280.71726 -88.800226 0 -87.602802 -17.426097 + 5170 261.72287 -88.718063 0 -87.601662 -67.034865 + 5180 241.82534 -88.631875 0 -87.600349 12.929399 + 5190 277.93009 -88.788779 0 -87.603245 -119.85524 + 5200 269.10966 -88.750714 0 -87.602804 58.357607 + 5210 346.20968 -89.080242 0 -87.603455 -71.29052 + 5220 328.37379 -89.004093 0 -87.603387 5.1553166 + 5230 300.97069 -88.886869 0 -87.603053 115.64248 + 5240 301.01084 -88.886944 0 -87.602957 95.191971 + 5250 236.71937 -88.610946 0 -87.601199 107.80215 + 5260 312.09019 -88.934094 0 -87.602847 -212.82077 + 5270 316.08148 -88.950358 0 -87.602086 -170.49685 + 5280 302.93008 -88.894888 0 -87.602715 -39.90897 + 5290 302.28144 -88.892137 0 -87.60273 173.59441 + 5300 286.78006 -88.824765 0 -87.601481 198.94816 + 5310 274.86499 -88.774717 0 -87.602257 -91.224168 + 5320 286.72147 -88.826364 0 -87.603329 -166.39609 + 5330 324.09559 -88.985682 0 -87.603225 -233.03808 + 5340 307.01761 -88.91235 0 -87.602741 79.892604 + 5350 248.45166 -88.661232 0 -87.60144 306.59187 + 5360 333.77281 -89.026707 0 -87.602971 58.547416 + 5370 321.87823 -88.975691 0 -87.602692 -196.83649 + 5380 263.62564 -88.726359 0 -87.601841 -149.25154 + 5390 261.84998 -88.717553 0 -87.600609 115.37087 + 5400 341.36124 -89.058822 0 -87.602717 49.486872 + 5410 290.89383 -88.842518 0 -87.601686 221.04343 + 5420 297.90503 -88.873515 0 -87.602775 -121.52824 + 5430 262.27486 -88.721711 0 -87.602955 -68.109301 + 5440 277.61725 -88.788087 0 -87.603887 -78.180891 + 5450 265.38678 -88.734311 0 -87.602281 -89.762752 + 5460 311.67876 -88.931282 0 -87.601789 62.067925 + 5470 273.39579 -88.767514 0 -87.601321 101.93914 + 5480 299.06567 -88.878266 0 -87.602576 135.3911 + 5490 304.01072 -88.899218 0 -87.602434 -127.04131 + 5500 284.47034 -88.815595 0 -87.602163 -153.59266 + 5510 280.46655 -88.797617 0 -87.601264 1.2814917 + 5520 257.43661 -88.698204 0 -87.600086 91.697617 + 5530 330.29123 -89.011203 0 -87.602318 112.88972 + 5540 317.03883 -88.954571 0 -87.602215 85.402953 + 5550 242.92105 -88.637441 0 -87.60124 38.781825 + 5560 270.83966 -88.757805 0 -87.602516 -241.12746 + 5570 300.81873 -88.885115 0 -87.601947 -175.79274 + 5580 343.52799 -89.068121 0 -87.602773 88.919183 + 5590 283.41905 -88.811382 0 -87.602434 372.1787 + 5600 307.75862 -88.914912 0 -87.602142 50.395345 + 5610 310.43857 -88.926179 0 -87.601977 -178.79341 + 5620 240.75301 -88.628897 0 -87.601945 -235.06582 + 5630 226.53959 -88.568325 0 -87.602001 -125.78674 + 5640 323.48092 -88.982936 0 -87.603101 53.219114 + 5650 278.28351 -88.787923 0 -87.600881 275.13349 + 5660 304.66311 -88.902332 0 -87.602766 96.177455 + 5670 305.23344 -88.905098 0 -87.603099 -62.31996 + 5680 316.48733 -88.952912 0 -87.602909 -138.94786 + 5690 290.06625 -88.839444 0 -87.602142 -18.110728 + 5700 320.51267 -88.969805 0 -87.602631 60.643461 + 5710 289.34112 -88.83644 0 -87.602231 128.08732 + 5720 294.38899 -88.857651 0 -87.60191 -49.200335 + 5730 285.49383 -88.819879 0 -87.60208 -146.2487 + 5740 249.73258 -88.667462 0 -87.602207 -64.133299 + 5750 281.64132 -88.804542 0 -87.603177 96.128783 + 5760 267.10426 -88.740291 0 -87.600935 108.63925 + 5770 382.67627 -89.235539 0 -87.603201 -117.84791 + 5780 297.46422 -88.870377 0 -87.601518 36.417501 + 5790 286.2974 -88.823251 0 -87.602025 -54.80926 + 5800 254.38418 -88.687075 0 -87.601977 128.70573 + 5810 269.25099 -88.750675 0 -87.602162 -42.516668 + 5820 316.58205 -88.953056 0 -87.602648 -95.622756 + 5830 263.88455 -88.72759 0 -87.601968 84.030455 + 5840 304.93109 -88.903118 0 -87.602409 -27.548378 + 5850 284.14789 -88.813483 0 -87.601426 23.713706 + 5860 337.65824 -89.044086 0 -87.603777 -52.237376 + 5870 307.48264 -88.915455 0 -87.603862 31.788482 + 5880 288.21319 -88.831931 0 -87.602533 42.743604 + 5890 232.48161 -88.591879 0 -87.600209 -47.622442 + 5900 349.58623 -89.094437 0 -87.603248 -137.6963 + 5910 282.89612 -88.808729 0 -87.602012 -1.9281215 + 5920 264.18491 -88.729 0 -87.602097 174.70089 + 5930 287.90831 -88.829749 0 -87.601652 30.808363 + 5940 330.40577 -89.010977 0 -87.601603 -150.48604 + 5950 267.26578 -88.741108 0 -87.601063 66.042325 + 5960 275.82211 -88.778245 0 -87.601702 87.672544 + 5970 276.41406 -88.780567 0 -87.601499 35.104293 + 5980 277.73918 -88.786885 0 -87.602165 -74.9564 + 5990 290.2799 -88.839854 0 -87.601641 -134.62115 + 6000 292.85973 -88.851197 0 -87.601979 55.049025 + 6010 273.34921 -88.76863 0 -87.602636 161.66123 + 6020 360.72014 -89.142472 0 -87.60379 89.683463 + 6030 278.43333 -88.789374 0 -87.601693 -71.983911 + 6040 291.60999 -88.846171 0 -87.602284 -154.19128 + 6050 245.73944 -88.648527 0 -87.600304 -40.926728 + 6060 323.16142 -88.981272 0 -87.6028 -63.687189 + 6070 290.30111 -88.840365 0 -87.602061 254.5955 + 6080 272.29216 -88.76245 0 -87.600964 114.46914 + 6090 298.08408 -88.873191 0 -87.601688 -93.13679 + 6100 280.13272 -88.796769 0 -87.601839 -167.15819 + 6110 247.97501 -88.658938 0 -87.60118 29.917376 + 6120 276.06367 -88.778639 0 -87.601066 24.00766 + 6130 317.28851 -88.95588 0 -87.602459 16.39042 + 6140 282.22968 -88.805142 0 -87.601268 -19.927074 + 6150 348.57305 -89.089309 0 -87.602441 -60.013105 + 6160 264.13982 -88.728493 0 -87.601782 158.58486 + 6170 281.41244 -88.802798 0 -87.602409 92.259416 + 6180 259.47708 -88.708956 0 -87.602134 4.626715 + 6190 283.04063 -88.809782 0 -87.602448 -205.09728 + 6200 300.52975 -88.884026 0 -87.602091 -153.66585 + 6210 335.42614 -89.033469 0 -87.60268 64.43316 + 6220 317.2037 -88.954783 0 -87.601724 287.9933 + 6230 316.52674 -88.952412 0 -87.602241 155.93202 + 6240 242.08426 -88.634098 0 -87.601467 -123.51538 + 6250 236.30964 -88.609379 0 -87.60138 -269.13809 + 6260 291.9638 -88.847416 0 -87.602019 -239.13221 + 6270 322.06404 -88.97576 0 -87.601969 1.3632171 + 6280 282.3132 -88.806351 0 -87.60212 270.97563 + 6290 316.07848 -88.951339 0 -87.60308 343.54427 + 6300 333.03635 -89.023039 0 -87.602444 -53.300514 + 6310 266.89966 -88.740185 0 -87.601702 -316.04307 + 6320 280.18047 -88.798409 0 -87.603275 -223.71836 + 6330 302.57928 -88.893132 0 -87.602454 39.945396 + 6340 364.17751 -89.156984 0 -87.603554 258.99694 + 6350 261.18382 -88.715931 0 -87.60183 258.10964 + 6360 272.93597 -88.765241 0 -87.601009 -66.085064 + 6370 318.6057 -88.961194 0 -87.602155 -369.3587 + 6380 264.42882 -88.730075 0 -87.602132 -122.75736 + 6390 278.88257 -88.791887 0 -87.60229 61.026821 + 6400 315.86364 -88.948979 0 -87.601636 66.303224 + 6410 284.60653 -88.815376 0 -87.601363 207.76124 + 6420 328.16373 -89.003462 0 -87.603652 -52.564009 + 6430 242.15662 -88.634634 0 -87.601694 22.258226 + 6440 303.66911 -88.898396 0 -87.60307 -220.99055 + 6450 258.67689 -88.705598 0 -87.60219 9.0181133 + 6460 264.23683 -88.729925 0 -87.602801 91.901129 + 6470 290.47606 -88.842187 0 -87.603137 -43.088495 + 6480 312.69522 -88.936576 0 -87.602748 92.973965 + 6490 312.77142 -88.936105 0 -87.601952 -46.556267 + 6500 311.74378 -88.931518 0 -87.601748 76.817831 + 6510 281.31437 -88.801839 0 -87.601869 155.23279 + 6520 289.91635 -88.838527 0 -87.601864 -189.36716 + 6530 252.09133 -88.676392 0 -87.601075 -240.0293 + 6540 295.89081 -88.86456 0 -87.602413 -150.16486 + 6550 280.69146 -88.799012 0 -87.601699 318.94562 + 6560 316.85967 -88.954988 0 -87.603396 263.51362 + 6570 327.41148 -88.999371 0 -87.60277 -51.018246 + 6580 314.1394 -88.94241 0 -87.602422 -303.66257 + 6590 241.54111 -88.631892 0 -87.601577 -130.94903 + 6600 265.95755 -88.735902 0 -87.601438 183.5449 + 6610 298.53441 -88.875525 0 -87.602101 139.67801 + 6620 290.27485 -88.839946 0 -87.601754 17.142559 + 6630 344.41824 -89.071429 0 -87.602284 -130.59731 + 6640 298.94139 -88.876638 0 -87.601478 -17.987291 + 6650 256.40941 -88.695501 0 -87.601765 148.64019 + 6660 279.28998 -88.793894 0 -87.602558 76.683677 + 6670 276.88831 -88.782737 0 -87.601647 -140.41313 + 6680 272.30701 -88.76268 0 -87.601131 -213.94867 + 6690 329.05911 -89.005947 0 -87.602317 -16.814889 + 6700 345.40549 -89.076136 0 -87.60278 205.3681 + 6710 284.8064 -88.816519 0 -87.601653 229.89123 + 6720 300.48151 -88.88353 0 -87.601801 -34.201128 + 6730 247.55204 -88.657375 0 -87.601421 -173.67994 + 6740 241.77668 -88.632952 0 -87.601633 -264.63679 + 6750 343.1789 -89.067567 0 -87.603708 -7.7433606 + 6760 315.62267 -88.948934 0 -87.602619 260.00017 + 6770 300.78263 -88.885232 0 -87.602218 127.40104 + 6780 322.83351 -88.980379 0 -87.603306 -57.944463 + 6790 264.11044 -88.729046 0 -87.60246 -128.92914 + 6800 268.84343 -88.748601 0 -87.601826 -69.007404 + 6810 333.48699 -89.02541 0 -87.602893 17.56948 + 6820 243.91365 -88.641589 0 -87.601154 160.85239 + 6830 271.26156 -88.758297 0 -87.601208 -83.764928 + 6840 313.21322 -88.937413 0 -87.601375 -42.024688 + 6850 280.8211 -88.798955 0 -87.601089 22.753553 + 6860 330.46879 -89.012428 0 -87.602785 51.414574 + 6870 298.58766 -88.875816 0 -87.602165 136.74636 + 6880 272.34514 -88.762483 0 -87.600772 -81.068005 + 6890 288.69289 -88.833126 0 -87.601682 -124.0571 + 6900 233.97156 -88.598848 0 -87.600823 -14.577433 + 6910 330.49937 -89.0123 0 -87.602527 -188.59444 + 6920 330.41937 -89.011632 0 -87.602201 32.906624 + 6930 255.3847 -88.69058 0 -87.601215 383.7451 + 6940 300.51017 -88.883886 0 -87.602034 178.91964 + 6950 282.09782 -88.804448 0 -87.601136 -230.53172 + 6960 295.91029 -88.864969 0 -87.602738 -311.48327 + 6970 297.6492 -88.872061 0 -87.602414 -36.24742 + 6980 322.78286 -88.979052 0 -87.602195 130.24028 + 6990 294.56318 -88.85874 0 -87.602256 324.01938 + 7000 283.0322 -88.808994 0 -87.601697 125.74757 + 7010 291.76701 -88.846432 0 -87.601875 -239.86247 + 7020 267.34759 -88.742251 0 -87.601857 -308.70955 + 7030 305.64779 -88.906305 0 -87.602538 -130.30905 + 7040 291.16268 -88.843816 0 -87.601837 238.71682 + 7050 287.7685 -88.829352 0 -87.601851 236.63146 + 7060 313.17664 -88.938052 0 -87.60217 9.2737854 + 7070 302.40446 -88.891635 0 -87.601703 -142.03881 + 7080 282.66181 -88.807561 0 -87.601843 -26.373154 + 7090 268.05588 -88.744775 0 -87.60136 96.906158 + 7100 326.82457 -88.996005 0 -87.601907 -81.302498 + 7110 307.67405 -88.913623 0 -87.601213 -128.03287 + 7120 273.31218 -88.767212 0 -87.601375 168.68553 + 7130 329.86388 -89.010232 0 -87.60317 117.776 + 7140 269.07967 -88.749429 0 -87.601647 -16.066781 + 7150 275.95503 -88.779225 0 -87.602116 -100.71312 + 7160 275.47459 -88.776574 0 -87.601514 -233.74182 + 7170 295.72498 -88.86306 0 -87.60162 -113.76386 + 7180 337.25396 -89.040892 0 -87.602307 194.96728 + 7190 290.51493 -88.840392 0 -87.601176 299.83265 + 7200 303.37237 -88.896609 0 -87.602548 9.0019354 + 7210 287.65074 -88.830082 0 -87.603083 -80.152243 + 7220 282.10179 -88.807097 0 -87.603768 -211.58866 + 7230 261.59288 -88.71817 0 -87.602324 -122.29124 + 7240 315.52263 -88.949287 0 -87.603399 32.99114 + 7250 343.1982 -89.06788 0 -87.603939 157.02574 + 7260 310.6005 -88.926702 0 -87.601809 174.52212 + 7270 291.62647 -88.845775 0 -87.601817 -74.154897 + 7280 255.69491 -88.692579 0 -87.60189 -51.718648 + 7290 274.76527 -88.775059 0 -87.603024 -195.17721 + 7300 281.0313 -88.80105 0 -87.602287 -65.662134 + 7310 307.94237 -88.915532 0 -87.601978 125.66494 + 7320 276.65958 -88.781481 0 -87.601366 183.07671 + 7330 335.13835 -89.032161 0 -87.6026 -37.276545 + 7340 313.89989 -88.941597 0 -87.60263 -96.167179 + 7350 226.08891 -88.56571 0 -87.601308 108.83174 + 7360 309.43597 -88.923261 0 -87.603336 -109.37744 + 7370 296.34874 -88.866116 0 -87.602015 -53.01724 + 7380 314.41352 -88.943977 0 -87.60282 56.432001 + 7390 279.68243 -88.795356 0 -87.602347 114.53845 + 7400 319.83993 -88.96665 0 -87.602346 51.968919 + 7410 293.16857 -88.852358 0 -87.601823 -36.609925 + 7420 289.59509 -88.838219 0 -87.602927 -99.787204 + 7430 264.7473 -88.731813 0 -87.602511 -177.82193 + 7440 320.10094 -88.969254 0 -87.603837 12.825071 + 7450 271.73597 -88.760449 0 -87.601336 207.20301 + 7460 268.55731 -88.746084 0 -87.60053 82.773759 + 7470 351.23172 -89.101669 0 -87.60346 -88.989453 + 7480 316.72159 -88.954773 0 -87.60377 -78.339446 + 7490 225.41993 -88.563253 0 -87.601705 -10.543651 + 7500 305.72013 -88.907429 0 -87.603354 -47.965158 + 7510 315.69713 -88.948537 0 -87.601904 81.34451 + 7520 327.08726 -88.997395 0 -87.602177 77.396887 + 7530 290.40429 -88.841806 0 -87.603062 99.535155 + 7540 253.55891 -88.683959 0 -87.602381 12.085307 + 7550 302.50141 -88.892709 0 -87.602364 -269.796 + 7560 282.86484 -88.808314 0 -87.60173 -214.13748 + 7570 261.51913 -88.717604 0 -87.602072 152.44735 + 7580 336.42705 -89.038602 0 -87.603544 219.68617 + 7590 344.68075 -89.073073 0 -87.602808 108.13439 + 7600 273.46092 -88.768721 0 -87.60225 -92.71439 + 7610 232.47259 -88.592826 0 -87.601194 -131.94946 + 7620 285.84682 -88.82049 0 -87.601186 -125.01469 + 7630 328.74993 -89.004555 0 -87.602244 49.605079 + 7640 323.80671 -88.983645 0 -87.60242 307.18366 + 7650 316.3091 -88.952042 0 -87.602799 102.19698 + 7660 272.48614 -88.765016 0 -87.602703 -165.94103 + 7670 226.44266 -88.567155 0 -87.601245 -227.3066 + 7680 293.02681 -88.851137 0 -87.601206 -200.17184 + 7690 345.20479 -89.075708 0 -87.603208 161.0222 + 7700 232.78062 -88.593541 0 -87.600596 430.54202 + 7710 341.44013 -89.058672 0 -87.60223 35.212752 + 7720 285.49608 -88.819321 0 -87.601513 -273.97302 + 7730 258.666 -88.705437 0 -87.602075 -267.78796 + 7740 309.45452 -88.922676 0 -87.602671 -19.788307 + 7750 303.78093 -88.897458 0 -87.601655 298.96035 + 7760 321.11999 -88.972981 0 -87.603216 246.46887 + 7770 233.26023 -88.596219 0 -87.601228 28.352752 + 7780 274.48574 -88.772334 0 -87.601492 -391.53973 + 7790 328.06714 -89.001818 0 -87.60242 -266.38034 + 7800 317.14896 -88.955505 0 -87.60268 234.39778 + 7810 283.98576 -88.813327 0 -87.601961 363.5722 + 7820 305.5478 -88.904974 0 -87.601634 0.37928952 + 7830 300.83963 -88.88498 0 -87.601724 -105.02226 + 7840 293.66028 -88.855563 0 -87.60293 -241.44021 + 7850 233.55147 -88.598454 0 -87.602221 4.6281726 + 7860 310.99751 -88.929056 0 -87.60247 104.68716 + 7870 340.90605 -89.05665 0 -87.602486 20.471641 + 7880 296.6517 -88.867682 0 -87.602289 108.25963 + 7890 253.97438 -88.683973 0 -87.600624 24.194046 + 7900 332.28495 -89.019513 0 -87.602123 -187.68888 + 7910 287.80933 -88.828982 0 -87.601307 -61.308069 + 7920 281.00058 -88.800615 0 -87.601983 126.14953 + 7930 229.94923 -88.582545 0 -87.601677 122.80877 + 7940 270.16505 -88.754784 0 -87.602372 -126.55714 + 7950 304.17768 -88.899217 0 -87.601721 -175.74155 + 7960 340.60335 -89.055474 0 -87.602602 17.346439 + 7970 299.26805 -88.878771 0 -87.602218 210.48594 + 7980 256.4594 -88.694857 0 -87.600908 158.87647 + 7990 349.82752 -89.094657 0 -87.602438 -109.87889 + 8000 302.77194 -88.893189 0 -87.601689 -300.01888 + 8010 280.03197 -88.797188 0 -87.602688 -103.88445 + 8020 259.29959 -88.708365 0 -87.602301 292.53974 + 8030 293.49657 -88.853413 0 -87.601479 172.6838 + 8040 342.82886 -89.065848 0 -87.603482 -66.333939 + 8050 269.25901 -88.75072 0 -87.602173 -120.87227 + 8060 275.53057 -88.776585 0 -87.601286 -152.11048 + 8070 284.86841 -88.816954 0 -87.601823 -128.43418 + 8080 276.90228 -88.78339 0 -87.60224 172.97308 + 8090 321.4894 -88.974231 0 -87.602891 257.16424 + 8100 315.91079 -88.949851 0 -87.602306 48.205408 + 8110 323.63158 -88.982696 0 -87.602218 -163.50758 + 8120 265.11219 -88.732339 0 -87.601481 -190.1341 + 8130 233.32064 -88.596982 0 -87.601733 20.545048 + 8140 339.56999 -89.051843 0 -87.603378 68.822657 + 8150 324.20502 -88.985802 0 -87.602878 105.09631 + 8160 295.92974 -88.865066 0 -87.602752 96.047786 + 8170 296.73983 -88.869622 0 -87.603853 -78.694793 + 8180 281.36565 -88.803161 0 -87.602972 -158.20166 + 8190 324.78163 -88.988425 0 -87.603041 -54.659181 + 8200 240.93814 -88.627962 0 -87.60022 274.97268 + 8210 339.93408 -89.053496 0 -87.603479 101.73407 + 8220 313.27537 -88.93911 0 -87.602807 -164.6208 + 8230 265.53773 -88.735121 0 -87.602447 -61.389851 + 8240 226.09198 -88.565266 0 -87.600851 6.3423131 + 8250 329.60293 -89.008793 0 -87.602844 -10.571973 + 8260 333.19402 -89.024574 0 -87.603307 89.600823 + 8270 260.58515 -88.712885 0 -87.601337 63.215192 + 8280 287.56416 -88.828912 0 -87.602283 -109.92568 + 8290 281.43214 -88.801904 0 -87.601431 -219.48504 + 8300 302.07775 -88.89063 0 -87.602092 15.378134 + 8310 321.96436 -88.975966 0 -87.6026 262.15889 + 8320 320.85609 -88.970803 0 -87.602164 112.67312 + 8330 252.91507 -88.680305 0 -87.601474 -15.819756 + 8340 283.72778 -88.813709 0 -87.603444 -195.22858 + 8350 274.67993 -88.77334 0 -87.601669 -104.1685 + 8360 317.10179 -88.95421 0 -87.601585 5.7971078 + 8370 290.83485 -88.84142 0 -87.600839 228.26816 + 8380 337.59889 -89.042526 0 -87.602469 122.27525 + 8390 280.63788 -88.799694 0 -87.60261 -94.601384 + 8400 230.85312 -88.586075 0 -87.601352 -206.03049 + 8410 306.7373 -88.910592 0 -87.602179 -278.31253 + 8420 304.41991 -88.901015 0 -87.602486 169.77828 + 8430 310.24314 -88.925978 0 -87.60261 337.60803 + 8440 301.7642 -88.89007 0 -87.602869 124.22907 + 8450 248.33688 -88.661248 0 -87.601946 -150.03349 + 8460 337.09956 -89.040817 0 -87.602891 -437.14552 + 8470 287.81213 -88.828912 0 -87.601225 28.304312 + 8480 326.46057 -88.994877 0 -87.602332 352.03144 + 8490 328.43163 -89.003666 0 -87.602713 277.566 + 8500 238.1762 -88.617603 0 -87.601642 -85.984239 + 8510 247.23928 -88.656698 0 -87.602078 -345.78935 + 8520 290.89331 -88.842785 0 -87.601955 -263.49648 + 8530 306.68812 -88.909845 0 -87.601641 9.8990752 + 8540 293.8471 -88.855901 0 -87.602471 453.48747 + 8550 320.1259 -88.968088 0 -87.602564 189.43197 + 8560 338.6242 -89.046412 0 -87.601982 -248.70605 + 8570 281.92867 -88.804546 0 -87.601956 -224.7321 + 8580 227.39702 -88.57148 0 -87.601499 34.956938 + 8590 285.15607 -88.818175 0 -87.601818 67.06963 + 8600 321.00262 -88.971527 0 -87.602263 122.94675 + 8610 281.61502 -88.802914 0 -87.601662 3.7822137 + 8620 309.3802 -88.920624 0 -87.600936 -222.93477 + 8630 304.35768 -88.899864 0 -87.601601 33.055413 + 8640 250.80123 -88.671537 0 -87.601723 231.69894 + 8650 322.32638 -88.977336 0 -87.602426 19.046079 + 8660 289.07656 -88.834981 0 -87.601901 -120.98459 + 8670 285.88972 -88.821465 0 -87.601978 -173.78722 + 8680 303.14128 -88.894811 0 -87.601736 -51.904319 + 8690 321.99974 -88.975875 0 -87.602358 118.82155 + 8700 297.69625 -88.8717 0 -87.601851 291.06268 + 8710 303.48449 -88.896518 0 -87.601979 26.959696 + 8720 283.02308 -88.808693 0 -87.601434 -211.69955 + 8730 291.87517 -88.847264 0 -87.602246 -238.7568 + 8740 252.46918 -88.677851 0 -87.600922 58.390563 + 8750 332.85708 -89.021989 0 -87.602159 108.31016 + 8760 329.52059 -89.00877 0 -87.603172 171.18022 + 8770 295.09921 -88.861519 0 -87.602749 43.865932 + 8780 317.01485 -88.955603 0 -87.603349 -163.09931 + 8790 299.43529 -88.879794 0 -87.602528 -85.572858 + 8800 312.25523 -88.934344 0 -87.602393 -55.838044 + 8810 276.13125 -88.779843 0 -87.601982 160.05357 + 8820 237.91002 -88.615874 0 -87.601048 216.52648 + 8830 324.87674 -88.989102 0 -87.603313 -202.45418 + 8840 215.46085 -88.519904 0 -87.600837 -21.862585 + 8850 301.28807 -88.887415 0 -87.602245 -134.77239 + 8860 315.68997 -88.948965 0 -87.602363 67.929965 + 8870 338.18112 -89.045427 0 -87.602887 141.72979 + 8880 272.87149 -88.765928 0 -87.601972 62.453803 + 8890 280.80249 -88.799802 0 -87.602016 -137.57726 + 8900 307.14393 -88.912875 0 -87.602726 -58.882448 + 8910 248.30733 -88.661396 0 -87.60222 28.612164 + 8920 313.05328 -88.939028 0 -87.603673 -11.258686 + 8930 340.1899 -89.054846 0 -87.603737 18.671509 + 8940 221.35088 -88.545125 0 -87.600934 0.17075045 + 8950 313.13716 -88.93848 0 -87.602767 -117.63475 + 8960 331.35315 -89.015692 0 -87.602277 6.3389563 + 8970 301.03025 -88.885348 0 -87.601278 165.5599 + 8980 289.48287 -88.835839 0 -87.601026 87.633182 + 8990 291.02543 -88.843555 0 -87.602162 -87.618652 + 9000 271.46238 -88.760451 0 -87.602505 -133.29681 + 9010 295.24534 -88.86198 0 -87.602586 -24.271516 + 9020 260.35875 -88.711996 0 -87.601413 97.583327 + 9030 317.16109 -88.956273 0 -87.603396 49.534194 + 9040 277.00067 -88.783394 0 -87.601825 4.2286602 + 9050 292.35786 -88.84903 0 -87.601953 -59.631942 + 9060 277.42343 -88.785311 0 -87.601937 -192.95837 + 9070 286.88109 -88.825283 0 -87.601567 29.945848 + 9080 358.37828 -89.131278 0 -87.602585 84.701644 + 9090 263.53811 -88.72548 0 -87.601336 287.59974 + 9100 296.94456 -88.869712 0 -87.60307 -36.047604 + 9110 303.28265 -88.896996 0 -87.603318 -286.33967 + 9120 278.81604 -88.791189 0 -87.601875 -137.48799 + 9130 275.77192 -88.777891 0 -87.601563 64.746611 + 9140 357.85383 -89.129189 0 -87.602733 160.55313 + 9150 305.73208 -88.905634 0 -87.601508 243.58529 + 9160 268.07276 -88.744717 0 -87.60123 20.079915 + 9170 264.62976 -88.730667 0 -87.601866 -277.89092 + 9180 275.90424 -88.778953 0 -87.60206 -275.66381 + 9190 281.94929 -88.804611 0 -87.601932 13.526196 + 9200 281.13084 -88.801203 0 -87.602016 294.38319 + 9210 314.62854 -88.944577 0 -87.602503 105.79101 + 9220 292.02357 -88.84761 0 -87.601958 -104.69927 + 9230 263.09361 -88.72319 0 -87.600942 -128.10326 + 9240 331.45587 -89.016941 0 -87.603088 -18.190047 + 9250 285.33158 -88.81914 0 -87.602034 227.59969 + 9260 299.98924 -88.882009 0 -87.602379 32.577895 + 9270 308.2903 -88.916567 0 -87.601528 -133.67016 + 9280 282.91862 -88.808383 0 -87.601569 -117.01408 + 9290 262.06397 -88.720688 0 -87.602832 16.64012 + 9300 296.132 -88.866211 0 -87.603035 150.55861 + 9310 273.2275 -88.766914 0 -87.601439 73.160286 + 9320 307.91507 -88.915968 0 -87.602531 -149.79118 + 9330 291.13943 -88.844154 0 -87.602274 -149.00604 + 9340 277.13879 -88.783771 0 -87.601612 -29.054577 + 9350 311.97519 -88.933324 0 -87.602568 44.536142 + 9360 317.72694 -88.957781 0 -87.602489 154.81556 + 9370 235.45594 -88.605049 0 -87.600692 137.48304 + 9380 231.13782 -88.586808 0 -87.60087 -93.891428 + 9390 294.82803 -88.859655 0 -87.602041 -264.31551 + 9400 362.55838 -89.148714 0 -87.60219 -156.86709 + 9410 339.81674 -89.051615 0 -87.602098 271.51139 + 9420 280.89936 -88.800362 0 -87.602162 395.57822 + 9430 305.34246 -88.905082 0 -87.602618 -5.3355995 + 9440 273.25794 -88.76723 0 -87.601625 -302.23068 + 9450 238.78972 -88.619508 0 -87.60093 -319.11968 + 9460 311.18937 -88.929597 0 -87.602192 -0.68489272 + 9470 338.35461 -89.045304 0 -87.602024 211.3674 + 9480 296.18865 -88.865202 0 -87.601785 253.48027 + 9490 287.39009 -88.828514 0 -87.602627 11.560189 + 9500 222.64679 -88.550865 0 -87.601147 -102.26318 + 9510 282.26405 -88.80587 0 -87.601848 -244.32346 + 9520 329.66107 -89.008214 0 -87.602016 -201.7463 + 9530 318.29206 -88.959585 0 -87.601883 338.24867 + 9540 277.64692 -88.786011 0 -87.601685 362.92276 + 9550 299.9758 -88.881901 0 -87.602329 -52.986848 + 9560 264.07935 -88.728095 0 -87.601642 -257.17293 + 9570 271.78597 -88.761247 0 -87.601921 -322.32643 + 9580 293.25633 -88.853227 0 -87.602318 15.509204 + 9590 313.99297 -88.941965 0 -87.602601 203.41962 + 9600 314.0622 -88.942163 0 -87.602504 261.82469 + 9610 290.14214 -88.839283 0 -87.601657 -36.0876 + 9620 308.94913 -88.919943 0 -87.602094 -188.60605 + 9630 283.60522 -88.811507 0 -87.601765 -82.315739 + 9640 261.14737 -88.715734 0 -87.601788 33.628265 + 9650 255.36423 -88.690939 0 -87.601662 191.27378 + 9660 286.57809 -88.824936 0 -87.602513 -9.4340498 + 9670 283.19171 -88.810525 0 -87.602547 -215.96343 + 9680 313.56792 -88.939496 0 -87.601945 -123.18549 + 9690 336.09815 -89.035376 0 -87.601721 60.038925 + 9700 272.18381 -88.76201 0 -87.600987 352.23962 + 9710 297.62806 -88.871878 0 -87.602321 107.42505 + 9720 265.59711 -88.733728 0 -87.600801 -85.858056 + 9730 303.23247 -88.895251 0 -87.601788 -388.61966 + 9740 256.8463 -88.697047 0 -87.601448 -108.71472 + 9750 276.03836 -88.779084 0 -87.601619 213.48947 + 9760 342.20761 -89.06272 0 -87.603005 199.03836 + 9770 333.75262 -89.026471 0 -87.602821 78.008338 + 9780 311.14422 -88.928916 0 -87.601704 -144.25471 + 9790 296.38674 -88.866209 0 -87.601946 -128.04915 + 9800 250.03064 -88.6681 0 -87.601573 5.7582715 + 9810 290.52821 -88.841724 0 -87.602451 136.19024 + 9820 262.7407 -88.722173 0 -87.60143 64.707606 + 9830 299.20995 -88.878061 0 -87.601756 -237.61353 + 9840 315.1346 -88.945859 0 -87.601626 -46.37683 + 9850 288.53998 -88.832109 0 -87.601317 134.10721 + 9860 256.50104 -88.694755 0 -87.600628 104.9712 + 9870 318.6017 -88.961241 0 -87.602219 -31.68379 + 9880 325.37115 -88.990064 0 -87.602165 -78.599349 + 9890 306.49052 -88.909116 0 -87.601755 -49.123798 + 9900 282.88958 -88.80931 0 -87.60262 51.563119 + 9910 299.93938 -88.882506 0 -87.603089 83.125725 + 9920 278.97804 -88.792051 0 -87.602047 22.40744 + 9930 258.23652 -88.702905 0 -87.601375 7.7553914 + 9940 297.88687 -88.872442 0 -87.60178 -90.767726 + 9950 316.93813 -88.953574 0 -87.601647 -139.45285 + 9960 284.60319 -88.815957 0 -87.601958 178.99591 + 9970 267.65923 -88.743258 0 -87.601534 177.69007 + 9980 283.9857 -88.81345 0 -87.602085 -66.889934 + 9990 303.62269 -88.898221 0 -87.603093 -299.83071 + 10000 260.03075 -88.710707 0 -87.601524 -73.881784 + 10001 258.76961 -88.705262 0 -87.601458 -43.203807 +Loop time of 0.17839 on 1 procs for 10000 steps with 34 atoms + +Performance: 24216.636 ns/day, 0.001 hours/ns, 56057.027 timesteps/s +90.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.15624 | 0.15624 | 0.15624 | 0.0 | 87.59 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.0036623 | 0.0036623 | 0.0036623 | 0.0 | 2.05 +Output | 0.011836 | 0.011836 | 0.011836 | 0.0 | 6.63 +Modify | 0.0036767 | 0.0036767 | 0.0036767 | 0.0 | 2.06 +Other | | 0.002972 | | | 1.67 + +Nlocal: 34.0000 ave 34 max 34 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 56.0000 ave 56 max 56 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 561.000 ave 561 max 561 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 561 +Ave neighs/atom = 16.500000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/smtbq/log.27Oct21.smatbBulkFCC.g++ b/examples/PACKAGES/smtbq/log.27Oct21.smatbBulkFCC.g++ new file mode 100644 index 0000000000..0902915117 --- /dev/null +++ b/examples/PACKAGES/smtbq/log.27Oct21.smatbBulkFCC.g++ @@ -0,0 +1,160 @@ +LAMMPS (27 Oct 2021) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# -*- lammps -*- + +units metal +atom_style atomic +boundary p p p + +lattice fcc 4.0782 +Lattice spacing in x,y,z = 4.0782000 4.0782000 4.0782000 + +region myreg block 0 8 0 8 0 8 + +create_box 1 myreg +Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (32.625600 32.625600 32.625600) + 1 by 1 by 1 MPI processor grid + +create_atoms 1 box +Created 2048 atoms + using lattice units in orthogonal box = (0.0000000 0.0000000 0.0000000) to (32.625600 32.625600 32.625600) + create_atoms CPU = 0.001 seconds + +mass 1 196.96655 # Au + +pair_style smatb/single +pair_coeff 1 1 2.88 10.35 4.178 0.210 1.818 4.07293506 4.9883063257983666 + +neighbor 8.0 bin +neigh_modify every 1 delay 0 check yes + +thermo 1 +fix boxmin all box/relax iso 1.0 +minimize 1.0e-8 1.0e-10 10000 100000 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12.988306 + ghost atom cutoff = 12.988306 + binsize = 6.4941532, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair smatb/single, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 6.601 | 6.601 | 6.601 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 -7800.9629 0 -7800.9629 -17598.853 34727.66 + 1 0 -7801.0757 0 -7801.0757 -17102.698 34717.243 + 2 0 -7801.1852 0 -7801.1852 -16605.672 34706.828 + 3 0 -7801.2915 0 -7801.2915 -16107.773 34696.415 + 4 0 -7801.3946 0 -7801.3946 -15609 34686.004 + 5 0 -7801.4944 0 -7801.4944 -15109.353 34675.595 + 6 0 -7801.5909 0 -7801.5909 -14608.829 34665.188 + 7 0 -7801.6841 0 -7801.6841 -14107.429 34654.783 + 8 0 -7801.7741 0 -7801.7741 -13605.15 34644.38 + 9 0 -7801.8608 0 -7801.8608 -13101.992 34633.98 + 10 0 -7801.9442 0 -7801.9442 -12597.953 34623.581 + 11 0 -7802.0243 0 -7802.0243 -12093.033 34613.185 + 12 0 -7802.1011 0 -7802.1011 -11587.23 34602.79 + 13 0 -7802.1746 0 -7802.1746 -11080.543 34592.398 + 14 0 -7802.2448 0 -7802.2448 -10572.902 34582.008 + 15 0 -7802.3117 0 -7802.3117 -10064.258 34571.62 + 16 0 -7802.3753 0 -7802.3753 -9554.6096 34561.234 + 17 0 -7802.4356 0 -7802.4356 -9043.9555 34550.85 + 18 0 -7802.4925 0 -7802.4925 -8532.2942 34540.468 + 19 0 -7802.5462 0 -7802.5462 -8019.6245 34530.088 + 20 0 -7802.5964 0 -7802.5964 -7505.945 34519.711 + 21 0 -7802.6434 0 -7802.6434 -6991.2543 34509.335 + 22 0 -7802.687 0 -7802.687 -6475.5513 34498.961 + 23 0 -7802.7272 0 -7802.7272 -5958.8344 34488.59 + 24 0 -7802.7641 0 -7802.7641 -5441.1024 34478.221 + 25 0 -7802.7977 0 -7802.7977 -4922.354 34467.853 + 26 0 -7802.8278 0 -7802.8278 -4402.5878 34457.488 + 27 0 -7802.8546 0 -7802.8546 -3881.8024 34447.125 + 28 0 -7802.878 0 -7802.878 -3359.9966 34436.764 + 29 0 -7802.8981 0 -7802.8981 -2837.1689 34426.405 + 30 0 -7802.9147 0 -7802.9147 -2313.3181 34416.048 + 31 0 -7802.928 0 -7802.928 -1788.4427 34405.693 + 32 0 -7802.9378 0 -7802.9378 -1262.5414 34395.34 + 33 0 -7802.9443 0 -7802.9443 -735.61295 34384.99 + 34 0 -7802.9473 0 -7802.9473 -207.6559 34374.641 + 35 0 -7802.9476 0 -7802.9476 0.90227419 34370.559 + 36 0 -7802.9476 0 -7802.9476 0.99992446 34370.557 +Loop time of 0.142744 on 1 procs for 36 steps with 2048 atoms + +100.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -7800.9628521055 -7802.94781441221 -7802.94781442797 + Force two-norm initial, final = 1144.4464 4.8784902e-06 + Force max component initial, final = 1144.4464 4.8784902e-06 + Final line search alpha, max atom move = 0.015845171 7.7300512e-08 + Iterations, force evaluations = 36 38 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.13461 | 0.13461 | 0.13461 | 0.0 | 94.30 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.0012706 | 0.0012706 | 0.0012706 | 0.0 | 0.89 +Output | 0.00066993 | 0.00066993 | 0.00066993 | 0.0 | 0.47 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.006191 | | | 4.34 + +Nlocal: 2048.00 ave 2048 max 2048 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 10147.0 ave 10147 max 10147 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 567296.0 ave 567296 max 567296 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 567296 +Ave neighs/atom = 277.00000 +Neighbor list builds = 0 +Dangerous builds = 0 +unfix boxmin +minimize 1.0e-8 1.0e-10 10000 100000 +Per MPI rank memory allocation (min/avg/max) = 6.601 | 6.601 | 6.601 Mbytes +Step Temp E_pair E_mol TotEng Press + 36 0 -7802.9476 0 -7802.9476 0.99992446 + 37 0 -7802.9476 0 -7802.9476 0.99992446 +Loop time of 0.0105782 on 1 procs for 1 steps with 2048 atoms + +100.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -7802.94759154184 -7802.94759154184 -7802.94759154185 + Force two-norm initial, final = 4.7040841e-12 1.3779243e-12 + Force max component initial, final = 1.1096422e-13 4.1164848e-14 + Final line search alpha, max atom move = 1.0000000 4.1164848e-14 + Iterations, force evaluations = 1 2 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.010394 | 0.010394 | 0.010394 | 0.0 | 98.25 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 8.6608e-05 | 8.6608e-05 | 8.6608e-05 | 0.0 | 0.82 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 9.804e-05 | | | 0.93 + +Nlocal: 2048.00 ave 2048 max 2048 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 10147.0 ave 10147 max 10147 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 567296.0 ave 567296 max 567296 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 567296 +Ave neighs/atom = 277.00000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/src/.gitignore b/src/.gitignore index 80b4baa0e5..d5ed0343e7 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1537,6 +1537,10 @@ /pair_mgpt.h /pair_morse_smooth_linear.cpp /pair_morse_smooth_linear.h +/pair_smatb.cpp +/pair_smatb.h +/pair_smatb_single.cpp +/pair_smatb_single.h /pair_smtbq.cpp /pair_smtbq.h /pair_vashishta*.cpp diff --git a/src/ADIOS/Install.sh b/src/ADIOS/Install.sh index ddca8c6efe..bd0acb1414 100644 --- a/src/ADIOS/Install.sh +++ b/src/ADIOS/Install.sh @@ -31,17 +31,17 @@ done if (test $1 = 1) then CONFIGSCRIPT=none - if ( test `which adios2-config 2>> /dev/null` ) then + if ( type adios2-config > /dev/null 2>&1 ) then CONFIGSCRIPT=adios2-config elif ( ! test -z "$ADIOS2_DIR" ) then - if ( test `which $ADIOS2_DIR/bin/adios2-config` ) then + if ( type $ADIOS2_DIR/bin/adios2-config > /dev/null 2>&1 ) then CONFIGSCRIPT=$ADIOS2_DIR/bin/adios2-config else echo "ERROR: ADIOS2_DIR environment variable is set but" \ "\$ADIOS2_DIR/bin/adios2-config does not exist" fi elif ( ! test -z "$ADIOS_DIR" ) then - if ( test `which $ADIOS_DIR/bin/adios2-config` ) then + if ( type $ADIOS_DIR/bin/adios2-config > /dev/null 2>&1 ) then CONFIGSCRIPT=$ADIOS_DIR/bin/adios2-config else echo "ERROR: ADIOS_DIR environment variable is set but" \ diff --git a/src/KOKKOS/pair_snap_kokkos.h b/src/KOKKOS/pair_snap_kokkos.h index bdad113c18..2cd0003478 100644 --- a/src/KOKKOS/pair_snap_kokkos.h +++ b/src/KOKKOS/pair_snap_kokkos.h @@ -73,7 +73,7 @@ struct TagPairSNAPComputeDeidrjCPU{}; template class PairSNAPKokkos : public PairSNAP { -public: + public: enum {EnabledNeighFlags=FULL|HALF|HALFTHREAD}; enum {COUL_FLAG=0}; typedef DeviceType device_type; @@ -228,7 +228,7 @@ public: const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const; -protected: + protected: typename AT::t_neighbors_2d d_neighbors; typename AT::t_int_1d_randomread d_ilist; typename AT::t_int_1d_randomread d_numneigh; @@ -252,9 +252,9 @@ protected: void allocate() override; //void read_files(char *, char *); /*template -inline int equal(double* x,double* y); + inline int equal(double* x,double* y); template -inline double dist2(double* x,double* y); + inline double dist2(double* x,double* y); double extra_cutoff(); void load_balance(); void set_sna_to_shared(int snaid,int i); @@ -280,6 +280,8 @@ inline double dist2(double* x,double* y); Kokkos::View d_radelem; // element radii Kokkos::View d_wjelem; // elements weights Kokkos::View d_coeffelem; // element bispectrum coefficients + Kokkos::View d_sinnerelem; // element inner cutoff midpoint + Kokkos::View d_dinnerelem; // element inner cutoff half-width Kokkos::View d_map; // mapping from atom types to elements Kokkos::View d_ninside; // ninside for all atoms in list Kokkos::View d_beta; // betas for all atoms in list @@ -329,10 +331,10 @@ inline double dist2(double* x,double* y); template class PairSNAPKokkosDevice : public PairSNAPKokkos { -private: + private: using Base = PairSNAPKokkos; -public: + public: PairSNAPKokkosDevice(class LAMMPS *); @@ -348,10 +350,10 @@ public: template class PairSNAPKokkosHost : public PairSNAPKokkos { -private: + private: using Base = PairSNAPKokkos; -public: + public: PairSNAPKokkosHost(class LAMMPS *); diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index 6cf40b31a5..74264ca47e 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -578,15 +578,21 @@ void PairSNAPKokkos::coeff(int narg, char d_radelem = Kokkos::View("pair:radelem",nelements); d_wjelem = Kokkos::View("pair:wjelem",nelements); d_coeffelem = Kokkos::View("pair:coeffelem",nelements,ncoeffall); + d_sinnerelem = Kokkos::View("pair:sinnerelem",nelements); + d_dinnerelem = Kokkos::View("pair:dinnerelem",nelements); auto h_radelem = Kokkos::create_mirror_view(d_radelem); auto h_wjelem = Kokkos::create_mirror_view(d_wjelem); auto h_coeffelem = Kokkos::create_mirror_view(d_coeffelem); + auto h_sinnerelem = Kokkos::create_mirror_view(d_sinnerelem); + auto h_dinnerelem = Kokkos::create_mirror_view(d_dinnerelem); auto h_map = Kokkos::create_mirror_view(d_map); for (int ielem = 0; ielem < nelements; ielem++) { h_radelem(ielem) = radelem[ielem]; h_wjelem(ielem) = wjelem[ielem]; + h_sinnerelem(ielem) = sinnerelem[ielem]; + h_dinnerelem(ielem) = dinnerelem[ielem]; for (int jcoeff = 0; jcoeff < ncoeffall; jcoeff++) { h_coeffelem(ielem,jcoeff) = coeffelem[ielem][jcoeff]; } @@ -599,10 +605,12 @@ void PairSNAPKokkos::coeff(int narg, char Kokkos::deep_copy(d_radelem,h_radelem); Kokkos::deep_copy(d_wjelem,h_wjelem); Kokkos::deep_copy(d_coeffelem,h_coeffelem); + Kokkos::deep_copy(d_sinnerelem,h_sinnerelem); + Kokkos::deep_copy(d_dinnerelem,h_dinnerelem); Kokkos::deep_copy(d_map,h_map); snaKK = SNAKokkos(rfac0,twojmax, - rmin0,switchflag,bzeroflag,chemflag,bnormflag,wselfallflag,nelements); + rmin0,switchflag,bzeroflag,chemflag,bnormflag,wselfallflag,nelements,switchinnerflag); snaKK.grow_rij(0,0); snaKK.init(); } @@ -724,15 +732,19 @@ void PairSNAPKokkos::operator() (TagPairSN const F_FLOAT dx = x(j,0) - xtmp; const F_FLOAT dy = x(j,1) - ytmp; const F_FLOAT dz = x(j,2) - ztmp; - const int elem_j = d_map[jtype]; + const int jelem = d_map[jtype]; my_sna.rij(ii,offset,0) = static_cast(dx); my_sna.rij(ii,offset,1) = static_cast(dy); my_sna.rij(ii,offset,2) = static_cast(dz); - my_sna.wj(ii,offset) = static_cast(d_wjelem[elem_j]); - my_sna.rcutij(ii,offset) = static_cast((radi + d_radelem[elem_j])*rcutfac); + my_sna.wj(ii,offset) = static_cast(d_wjelem[jelem]); + my_sna.rcutij(ii,offset) = static_cast((radi + d_radelem[jelem])*rcutfac); my_sna.inside(ii,offset) = j; + if (switchinnerflag) { + my_sna.sinnerij(ii,offset) = 0.5*(d_sinnerelem[ielem] + d_sinnerelem[jelem]); + my_sna.dinnerij(ii,offset) = 0.5*(d_dinnerelem[ielem] + d_dinnerelem[jelem]); + } if (chemflag) - my_sna.element(ii,offset) = elem_j; + my_sna.element(ii,offset) = jelem; else my_sna.element(ii,offset) = 0; } @@ -1080,18 +1092,22 @@ void PairSNAPKokkos::operator() (TagPairSN const int jtype = type(j); const F_FLOAT rsq = dx*dx + dy*dy + dz*dz; - const int elem_j = d_map[jtype]; + const int jelem = d_map[jtype]; if (rsq < rnd_cutsq(itype,jtype)) { if (final) { my_sna.rij(ii,offset,0) = static_cast(dx); my_sna.rij(ii,offset,1) = static_cast(dy); my_sna.rij(ii,offset,2) = static_cast(dz); - my_sna.wj(ii,offset) = static_cast(d_wjelem[elem_j]); - my_sna.rcutij(ii,offset) = static_cast((radi + d_radelem[elem_j])*rcutfac); + my_sna.wj(ii,offset) = static_cast(d_wjelem[jelem]); + my_sna.rcutij(ii,offset) = static_cast((radi + d_radelem[jelem])*rcutfac); my_sna.inside(ii,offset) = j; + if (switchinnerflag) { + my_sna.sinnerij(ii,offset) = 0.5*(d_sinnerelem[ielem] + d_sinnerelem[jelem]); + my_sna.dinnerij(ii,offset) = 0.5*(d_dinnerelem[ielem] + d_dinnerelem[jelem]); + } if (chemflag) - my_sna.element(ii,offset) = elem_j; + my_sna.element(ii,offset) = jelem; else my_sna.element(ii,offset) = 0; } diff --git a/src/KOKKOS/sna_kokkos.h b/src/KOKKOS/sna_kokkos.h index b3389f2a33..fe70129660 100644 --- a/src/KOKKOS/sna_kokkos.h +++ b/src/KOKKOS/sna_kokkos.h @@ -64,7 +64,7 @@ struct alignas(8) FullHalfMapper { template class SNAKokkos { -public: + public: using real_type = real_type_; using complex = SNAComplex; static constexpr int vector_length = vector_length_; @@ -97,21 +97,22 @@ public: typedef Kokkos::View t_sna_3c3; typedef Kokkos::View t_sna_5c; -inline + inline SNAKokkos() {}; + KOKKOS_INLINE_FUNCTION SNAKokkos(const SNAKokkos& sna, const typename Kokkos::TeamPolicy::member_type& team); -inline - SNAKokkos(real_type, int, real_type, int, int, int, int, int, int); + inline + SNAKokkos(real_type, int, real_type, int, int, int, int, int, int, int); KOKKOS_INLINE_FUNCTION ~SNAKokkos(); -inline + inline void build_indexlist(); // SNAKokkos() -inline + inline void init(); // double memory_usage(); @@ -192,13 +193,13 @@ inline void compute_deidrj_cpu(const typename Kokkos::TeamPolicy::member_type& team, int, int); // ForceSNAP KOKKOS_INLINE_FUNCTION - real_type compute_sfac(real_type, real_type); // add_uarraytot, compute_duarray + real_type compute_sfac(real_type, real_type, real_type, real_type); // add_uarraytot, compute_duarray KOKKOS_INLINE_FUNCTION - real_type compute_dsfac(real_type, real_type); // compute_duarray + real_type compute_dsfac(real_type, real_type, real_type, real_type); // compute_duarray KOKKOS_INLINE_FUNCTION - void compute_s_dsfac(const real_type, const real_type, real_type&, real_type&); // compute_cayley_klein + void compute_s_dsfac(const real_type, const real_type, const real_type, const real_type, real_type&, real_type&); // compute_cayley_klein #ifdef TIMING_INFO double* timers; @@ -214,6 +215,8 @@ inline t_sna_2i inside; t_sna_2d wj; t_sna_2d rcutij; + t_sna_2d sinnerij; + t_sna_2d dinnerij; t_sna_2i element; t_sna_3d dedr; int natom, nmax; @@ -255,7 +258,7 @@ inline int ndoubles; int ntriples; -private: + private: real_type rmin0, rfac0; //use indexlist instead of loops, constructor generates these @@ -264,13 +267,13 @@ private: Kokkos::View idxb; Kokkos::View idxcg_block; -public: + public: Kokkos::View idxu_block; Kokkos::View idxu_half_block; Kokkos::View idxu_cache_block; Kokkos::View idxu_full_half; -private: + private: Kokkos::View idxz_block; Kokkos::View idxb_block; @@ -290,14 +293,14 @@ private: KOKKOS_INLINE_FUNCTION void create_thread_scratch_arrays(const typename Kokkos::TeamPolicy::member_type& team); // SNAKokkos() -inline + inline void init_clebsch_gordan(); // init() -inline + inline void init_rootpqarray(); // init() KOKKOS_INLINE_FUNCTION - void add_uarraytot(const typename Kokkos::TeamPolicy::member_type& team, int, int, const real_type&, const real_type&, const real_type&, int); // compute_ui + void add_uarraytot(const typename Kokkos::TeamPolicy::member_type& team, int, int, const real_type&, const real_type&, const real_type&, const real_type&, const real_type&, int); // compute_ui KOKKOS_INLINE_FUNCTION void compute_uarray_cpu(const typename Kokkos::TeamPolicy::member_type& team, int, int, @@ -308,18 +311,24 @@ inline inline double deltacg(int, int, int); // init_clebsch_gordan -inline + inline int compute_ncoeff(); // SNAKokkos() KOKKOS_INLINE_FUNCTION void compute_duarray_cpu(const typename Kokkos::TeamPolicy::member_type& team, int, int, const real_type&, const real_type&, const real_type&, // compute_duidrj_cpu - const real_type&, const real_type&, const real_type&, const real_type&, const real_type&); + const real_type&, const real_type&, const real_type&, const real_type&, const real_type&, + const real_type&, const real_type&); // Sets the style for the switching function // 0 = none // 1 = cosine int switch_flag; + // Sets the style for the inner switching function + // 0 = none + // 1 = cosine + int switch_inner_flag; + // Chem snap flags int chem_flag; int bnorm_flag; diff --git a/src/KOKKOS/sna_kokkos_impl.h b/src/KOKKOS/sna_kokkos_impl.h index 550548df55..77130b9781 100644 --- a/src/KOKKOS/sna_kokkos_impl.h +++ b/src/KOKKOS/sna_kokkos_impl.h @@ -25,12 +25,13 @@ namespace LAMMPS_NS { static const double MY_PI = 3.14159265358979323846; // pi +static const double MY_PI2 = 1.57079632679489661923; // pi/2 template inline SNAKokkos::SNAKokkos(real_type rfac0_in, int twojmax_in, real_type rmin0_in, int switch_flag_in, int bzero_flag_in, - int chem_flag_in, int bnorm_flag_in, int wselfall_flag_in, int nelements_in) + int chem_flag_in, int bnorm_flag_in, int wselfall_flag_in, int nelements_in, int switch_inner_flag_in) { LAMMPS_NS::ExecutionSpace execution_space = ExecutionSpaceFromDevice::space; host_flag = (execution_space == LAMMPS_NS::Host); @@ -40,6 +41,7 @@ SNAKokkos::SNAKokkos(real_type rfac0_in, rfac0 = rfac0_in; rmin0 = rmin0_in; switch_flag = switch_flag_in; + switch_inner_flag = switch_inner_flag_in; bzero_flag = bzero_flag_in; chem_flag = chem_flag_in; @@ -295,6 +297,8 @@ void SNAKokkos::grow_rij(int newnatom, int rij = t_sna_3d(Kokkos::NoInit("sna:rij"),natom,nmax,3); wj = t_sna_2d(Kokkos::NoInit("sna:wj"),natom,nmax); rcutij = t_sna_2d(Kokkos::NoInit("sna:rcutij"),natom,nmax); + sinnerij = t_sna_2d(Kokkos::NoInit("sna:sinnerij"),natom,nmax); + dinnerij = t_sna_2d(Kokkos::NoInit("sna:dinnerij"),natom,nmax); inside = t_sna_2i(Kokkos::NoInit("sna:inside"),natom,nmax); element = t_sna_2i(Kokkos::NoInit("sna:element"),natom,nmax); dedr = t_sna_3d(Kokkos::NoInit("sna:dedr"),natom,nmax,3); @@ -371,6 +375,8 @@ void SNAKokkos::compute_cayley_klein(const const real_type rsq = x * x + y * y + z * z; const real_type r = sqrt(rsq); const real_type rcut = rcutij(iatom, jnbor); + const real_type sinner = sinnerij(iatom, jnbor); + const real_type dinner = dinnerij(iatom, jnbor); const real_type rscale0 = rfac0 * static_cast(MY_PI) / (rcut - rmin0); const real_type theta0 = (r - rmin0) * rscale0; const real_type sn = sin(theta0); @@ -380,7 +386,7 @@ void SNAKokkos::compute_cayley_klein(const const real_type wj_local = wj(iatom, jnbor); real_type sfac, dsfac; - compute_s_dsfac(r, rcut, sfac, dsfac); + compute_s_dsfac(r, rcut, sinner, dinner, sfac, dsfac); sfac *= wj_local; dsfac *= wj_local; @@ -1238,7 +1244,7 @@ void SNAKokkos::compute_ui_cpu(const typen z0 = r / tan(theta0); compute_uarray_cpu(team, iatom, jnbor, x, y, z, z0, r); - add_uarraytot(team, iatom, jnbor, r, wj(iatom,jnbor), rcutij(iatom,jnbor), element(iatom, jnbor)); + add_uarraytot(team, iatom, jnbor, r, wj(iatom,jnbor), rcutij(iatom,jnbor), sinnerij(iatom,jnbor), dinnerij(iatom,jnbor), element(iatom, jnbor)); } /* ---------------------------------------------------------------------- @@ -1541,7 +1547,7 @@ void SNAKokkos::compute_duidrj_cpu(const t z0 = r * cs / sn; dz0dr = z0 / r - (r*rscale0) * (rsq + z0 * z0) / rsq; - compute_duarray_cpu(team, iatom, jnbor, x, y, z, z0, r, dz0dr, wj(iatom,jnbor), rcutij(iatom,jnbor)); + compute_duarray_cpu(team, iatom, jnbor, x, y, z, z0, r, dz0dr, wj(iatom,jnbor), rcutij(iatom,jnbor), sinnerij(iatom,jnbor), dinnerij(iatom,jnbor)); } @@ -1623,9 +1629,10 @@ void SNAKokkos::compute_deidrj_cpu(const t template KOKKOS_INLINE_FUNCTION void SNAKokkos::add_uarraytot(const typename Kokkos::TeamPolicy::member_type& team, int iatom, int jnbor, - const real_type& r, const real_type& wj, const real_type& rcut, int jelem) + const real_type& r, const real_type& wj, const real_type& rcut, + const real_type& sinner, const real_type& dinner, int jelem) { - const real_type sfac = compute_sfac(r, rcut) * wj; + const real_type sfac = compute_sfac(r, rcut, sinner, dinner) * wj; Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,twojmax+1), [&] (const int& j) { @@ -1746,7 +1753,8 @@ KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_duarray_cpu(const typename Kokkos::TeamPolicy::member_type& team, int iatom, int jnbor, const real_type& x, const real_type& y, const real_type& z, const real_type& z0, const real_type& r, const real_type& dz0dr, - const real_type& wj, const real_type& rcut) + const real_type& wj, const real_type& rcut, + const real_type& sinner, const real_type& dinner) { real_type r0inv; real_type a_r, a_i, b_r, b_i; @@ -1872,8 +1880,8 @@ void SNAKokkos::compute_duarray_cpu(const }); } - real_type sfac = compute_sfac(r, rcut); - real_type dsfac = compute_dsfac(r, rcut); + real_type sfac = compute_sfac(r, rcut, sinner, dinner); + real_type dsfac = compute_dsfac(r, rcut, sinner, dinner); sfac *= wj; dsfac *= wj; @@ -2224,63 +2232,121 @@ int SNAKokkos::compute_ncoeff() template KOKKOS_INLINE_FUNCTION -real_type SNAKokkos::compute_sfac(real_type r, real_type rcut) +real_type SNAKokkos::compute_sfac(real_type r, real_type rcut, real_type sinner, real_type dinner) { + real_type sfac_outer; constexpr real_type one = static_cast(1.0); constexpr real_type zero = static_cast(0.0); constexpr real_type onehalf = static_cast(0.5); - if (switch_flag == 0) return one; + if (switch_flag == 0) sfac_outer = one; if (switch_flag == 1) { - if (r <= rmin0) return one; + if (r <= rmin0) sfac_outer = one; else if (r > rcut) return zero; else { real_type rcutfac = static_cast(MY_PI) / (rcut - rmin0); - return onehalf * (cos((r - rmin0) * rcutfac) + one); + sfac_outer = onehalf * (cos((r - rmin0) * rcutfac) + one); } } - return zero; + + if (switch_inner_flag == 0) return sfac_outer; + if (switch_inner_flag == 1) { + if (r >= sinner + dinner) + return sfac_outer; + else if (r > sinner - dinner) { + real_type rcutfac = static_cast(MY_PI2) / dinner; + return sfac_outer * + onehalf * (one - cos(static_cast(MY_PI2) + (r - sinner) * rcutfac)); + } else return zero; + } + return zero; // dummy return } /* ---------------------------------------------------------------------- */ template KOKKOS_INLINE_FUNCTION -real_type SNAKokkos::compute_dsfac(real_type r, real_type rcut) +real_type SNAKokkos::compute_dsfac(real_type r, real_type rcut, real_type sinner, real_type dinner) { + real_type sfac_outer, dsfac_outer, sfac_inner, dsfac_inner; + constexpr real_type one = static_cast(1.0); constexpr real_type zero = static_cast(0.0); constexpr real_type onehalf = static_cast(0.5); - if (switch_flag == 0) return zero; + if (switch_flag == 0) dsfac_outer = zero; if (switch_flag == 1) { - if (r <= rmin0) return zero; + if (r <= rmin0) dsfac_outer = zero; else if (r > rcut) return zero; else { real_type rcutfac = static_cast(MY_PI) / (rcut - rmin0); - return -onehalf * sin((r - rmin0) * rcutfac) * rcutfac; + dsfac_outer = -onehalf * sin((r - rmin0) * rcutfac) * rcutfac; } } - return zero; + + if (switch_inner_flag == 0) return dsfac_outer; + if (switch_inner_flag == 1) { + if (r >= sinner + dinner) + return dsfac_outer; + else if (r > sinner - dinner) { + + // calculate sfac_outer + + if (switch_flag == 0) sfac_outer = one; + if (switch_flag == 1) { + if (r <= rmin0) sfac_outer = one; + else if (r > rcut) sfac_outer = zero; + else { + real_type rcutfac = static_cast(MY_PI) / (rcut - rmin0); + sfac_outer = onehalf * (cos((r - rmin0) * rcutfac) + one); + } + } + + // calculate sfac_inner + + real_type rcutfac = static_cast(MY_PI2) / dinner; + sfac_inner = onehalf * (one - cos(static_cast(MY_PI2) + (r - sinner) * rcutfac)); + dsfac_inner = onehalf * rcutfac * sin(static_cast(MY_PI2) + (r - sinner) * rcutfac); + return dsfac_outer * sfac_inner + sfac_outer * dsfac_inner; + + } else return zero; + } + return zero; // dummy return } template KOKKOS_INLINE_FUNCTION -void SNAKokkos::compute_s_dsfac(const real_type r, const real_type rcut, real_type& sfac, real_type& dsfac) { +void SNAKokkos::compute_s_dsfac(const real_type r, const real_type rcut, const real_type sinner, const real_type dinner, real_type& sfac, real_type& dsfac) { + + real_type sfac_outer, dsfac_outer, sfac_inner, dsfac_inner; constexpr real_type one = static_cast(1.0); constexpr real_type zero = static_cast(0.0); constexpr real_type onehalf = static_cast(0.5); - if (switch_flag == 0) { sfac = zero; dsfac = zero; } + + if (switch_flag == 0) { sfac_outer = zero; dsfac_outer = zero; } else if (switch_flag == 1) { - if (r <= rmin0) { sfac = one; dsfac = zero; } - else if (r > rcut) { sfac = zero; dsfac = zero; } + if (r <= rmin0) { sfac_outer = one; dsfac_outer = zero; } + else if (r > rcut) { sfac = zero; dsfac = zero; return; } else { const real_type rcutfac = static_cast(MY_PI) / (rcut - rmin0); const real_type theta0 = (r - rmin0) * rcutfac; const real_type sn = sin(theta0); const real_type cs = cos(theta0); - sfac = onehalf * (cs + one); - dsfac = -onehalf * sn * rcutfac; - + sfac_outer = onehalf * (cs + one); + dsfac_outer = -onehalf * sn * rcutfac; } - } else { sfac = zero; dsfac = zero; } + } else { sfac = zero; dsfac = zero; return; } // dummy return + + if (switch_inner_flag == 0) { sfac = sfac_outer; dsfac = dsfac_outer; return; } + else if (switch_inner_flag == 1) { + if (r >= sinner + dinner) { sfac = sfac_outer; dsfac = dsfac_outer; return; } + else if (r > sinner - dinner) { + real_type rcutfac = static_cast(MY_PI2) / dinner; + sfac_inner = onehalf * (one - cos(static_cast(MY_PI2) + (r - sinner) * rcutfac)); + dsfac_inner = onehalf * rcutfac * sin(static_cast(MY_PI2) + (r - sinner) * rcutfac); + sfac = sfac_outer * sfac_inner; + dsfac = dsfac_outer * sfac_inner + sfac_outer * dsfac_inner; + return; + } else { sfac = zero; dsfac = zero; return; } + } else { sfac = zero; dsfac = zero; return; } // dummy return + } /* ---------------------------------------------------------------------- @@ -2356,6 +2422,8 @@ double SNAKokkos::memory_usage() bytes += natom * nmax * sizeof(real_type); // inside bytes += natom * nmax * sizeof(real_type); // wj bytes += natom * nmax * sizeof(real_type); // rcutij + bytes += natom * nmax * sizeof(real_type); // sinnerij + bytes += natom * nmax * sizeof(real_type); // dinnerij return bytes; } diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index 77b6d551be..834c71a947 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -319,8 +319,7 @@ void PairEAM::compute(int eflag, int vflag) } if (eflag) evdwl = scale[itype][jtype]*phi; - if (evflag) ev_tally(i,j,nlocal,newton_pair, - evdwl,0.0,fpair,delx,dely,delz); + if (evflag) ev_tally(i,j,nlocal,newton_pair,evdwl,0.0,fpair,delx,dely,delz); } } } diff --git a/src/ML-IAP/Install.sh b/src/ML-IAP/Install.sh index 753dfae358..3a1a7493aa 100755 --- a/src/ML-IAP/Install.sh +++ b/src/ML-IAP/Install.sh @@ -46,7 +46,7 @@ action mliap_model_python_couple.pyx python_impl.cpp # edit 2 Makefile.package files to include/exclude package info if (test $1 = 1) then - if (test "$(type cythonize 2> /dev/null)" != "" && test -e ../python_impl.cpp) then + if (type cythonize > /dev/null 2>&1 && test -e ../python_impl.cpp) then if (test -e ../Makefile.package) then sed -i -e 's|^PKG_INC =[ \t]*|&-DMLIAP_PYTHON |' ../Makefile.package fi @@ -69,7 +69,7 @@ elif (test $1 = 0) then sed -i -e '/^include.*python.*mliap_python.*$/d' ../Makefile.package.settings elif (test $1 = 2) then - if (type cythonize 2>&1 > /dev/null && test -e ../python_impl.cpp) then + if (type cythonize > /dev/null 2>&1 && test -e ../python_impl.cpp) then if (test -e ../Makefile.package) then sed -i -e 's/[^ \t]*-DMLIAP_PYTHON[^ \t]* //g' ../Makefile.package fi diff --git a/src/ML-IAP/mliap_descriptor_snap.cpp b/src/ML-IAP/mliap_descriptor_snap.cpp index b2568d3a4d..fc65ca5207 100644 --- a/src/ML-IAP/mliap_descriptor_snap.cpp +++ b/src/ML-IAP/mliap_descriptor_snap.cpp @@ -41,8 +41,8 @@ MLIAPDescriptorSNAP::MLIAPDescriptorSNAP(LAMMPS *_lmp, char *paramfilename) : ML radelem = nullptr; wjelem = nullptr; snaptr = nullptr; - rinnerelem = nullptr; - drinnerelem = nullptr; + sinnerelem = nullptr; + dinnerelem = nullptr; read_paramfile(paramfilename); @@ -59,11 +59,8 @@ MLIAPDescriptorSNAP::~MLIAPDescriptorSNAP() memory->destroy(radelem); memory->destroy(wjelem); delete snaptr; - - if (switchinnerflag) { - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); - } + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); } /* ---------------------------------------------------------------------- @@ -94,8 +91,8 @@ void MLIAPDescriptorSNAP::compute_descriptors(class MLIAPData *data) snaptr->wj[ninside] = wjelem[jelem]; snaptr->rcutij[ninside] = sqrt(cutsq[ielem][jelem]); if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5 * (rinnerelem[ielem] + rinnerelem[jelem]); - snaptr->drinnerij[ninside] = 0.5 * (drinnerelem[ielem] + drinnerelem[jelem]); + snaptr->sinnerij[ninside] = 0.5 * (sinnerelem[ielem] + sinnerelem[jelem]); + snaptr->dinnerij[ninside] = 0.5 * (dinnerelem[ielem] + dinnerelem[jelem]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; @@ -150,8 +147,8 @@ void MLIAPDescriptorSNAP::compute_forces(class MLIAPData *data) snaptr->wj[ninside] = wjelem[jelem]; snaptr->rcutij[ninside] = sqrt(cutsq[ielem][jelem]); if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5 * (rinnerelem[ielem] + rinnerelem[jelem]); - snaptr->drinnerij[ninside] = 0.5 * (drinnerelem[ielem] + drinnerelem[jelem]); + snaptr->sinnerij[ninside] = 0.5 * (sinnerelem[ielem] + sinnerelem[jelem]); + snaptr->dinnerij[ninside] = 0.5 * (dinnerelem[ielem] + dinnerelem[jelem]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; @@ -222,8 +219,8 @@ void MLIAPDescriptorSNAP::compute_force_gradients(class MLIAPData *data) snaptr->wj[ninside] = wjelem[jelem]; snaptr->rcutij[ninside] = sqrt(cutsq[ielem][jelem]); if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5 * (rinnerelem[ielem] + rinnerelem[jelem]); - snaptr->drinnerij[ninside] = 0.5 * (drinnerelem[ielem] + drinnerelem[jelem]); + snaptr->sinnerij[ninside] = 0.5 * (sinnerelem[ielem] + sinnerelem[jelem]); + snaptr->dinnerij[ninside] = 0.5 * (dinnerelem[ielem] + dinnerelem[jelem]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; @@ -292,8 +289,8 @@ void MLIAPDescriptorSNAP::compute_descriptor_gradients(class MLIAPData *data) snaptr->wj[ninside] = wjelem[jelem]; snaptr->rcutij[ninside] = sqrt(cutsq[ielem][jelem]); if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5 * (rinnerelem[ielem] + rinnerelem[jelem]); - snaptr->drinnerij[ninside] = 0.5 * (drinnerelem[ielem] + drinnerelem[jelem]); + snaptr->sinnerij[ninside] = 0.5 * (sinnerelem[ielem] + sinnerelem[jelem]); + snaptr->dinnerij[ninside] = 0.5 * (dinnerelem[ielem] + dinnerelem[jelem]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; @@ -364,8 +361,8 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename) // set local input checks - int rinnerflag = 0; - int drinnerflag = 0; + int sinnerflag = 0; + int dinnerflag = 0; for (int i = 0; i < nelements; i++) delete[] elements[i]; delete[] elements; @@ -414,7 +411,7 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename) // check for keywords with one value per element if ((keywd == "elems") || (keywd == "radelems") || (keywd == "welems") || - (keywd == "rinnerelems") || (keywd == "drinnerelems")) { + (keywd == "sinnerelems") || (keywd == "dinnerelems")) { if ((nelementsflag == 0) || ((int) words.count() != nelements + 1)) error->all(FLERR, "Incorrect SNAP parameter file"); @@ -433,14 +430,14 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename) for (int ielem = 0; ielem < nelements; ielem++) wjelem[ielem] = utils::numeric(FLERR, words.next(), false, lmp); wjelemflag = 1; - } else if (keywd == "rinnerelems") { + } else if (keywd == "sinnerelems") { for (int ielem = 0; ielem < nelements; ielem++) - rinnerelem[ielem] = utils::numeric(FLERR, words.next(), false, lmp); - rinnerflag = 1; - } else if (keywd == "drinnerelems") { + sinnerelem[ielem] = utils::numeric(FLERR, words.next(), false, lmp); + sinnerflag = 1; + } else if (keywd == "dinnerelems") { for (int ielem = 0; ielem < nelements; ielem++) - drinnerelem[ielem] = utils::numeric(FLERR, words.next(), false, lmp); - rinnerflag = 1; + dinnerelem[ielem] = utils::numeric(FLERR, words.next(), false, lmp); + dinnerflag = 1; } } else { @@ -457,8 +454,8 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename) elements = new char *[nelements]; memory->create(radelem, nelements, "mliap_snap_descriptor:radelem"); memory->create(wjelem, nelements, "mliap_snap_descriptor:wjelem"); - memory->create(rinnerelem, nelements, "mliap_snap_descriptor:rinner"); - memory->create(drinnerelem, nelements, "mliap_snap_descriptor:drinner"); + memory->create(sinnerelem, nelements, "mliap_snap_descriptor:sinner"); + memory->create(dinnerelem, nelements, "mliap_snap_descriptor:dinner"); nelementsflag = 1; } else if (keywd == "rcutfac") { rcutfac = utils::numeric(FLERR, keyval, false, lmp); @@ -491,10 +488,10 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename) !wjelemflag) error->all(FLERR, "Incorrect SNAP parameter file"); - if (switchinnerflag && !(rinnerflag && drinnerflag)) + if (switchinnerflag && !(sinnerflag && dinnerflag)) error->all(FLERR, "Incorrect SNAP parameter file"); - if (!switchinnerflag && (rinnerflag || drinnerflag)) + if (!switchinnerflag && (sinnerflag || dinnerflag)) error->all(FLERR, "Incorrect SNAP parameter file"); // construct cutsq diff --git a/src/ML-IAP/mliap_descriptor_snap.h b/src/ML-IAP/mliap_descriptor_snap.h index 0e217f82fa..b49ff6d2cc 100644 --- a/src/ML-IAP/mliap_descriptor_snap.h +++ b/src/ML-IAP/mliap_descriptor_snap.h @@ -42,8 +42,8 @@ class MLIAPDescriptorSNAP : public MLIAPDescriptor { int switchinnerflag; double rfac0, rmin0; - double *rinnerelem; - double *drinnerelem; + double* sinnerelem; + double* dinnerelem; }; } // namespace LAMMPS_NS diff --git a/src/ML-SNAP/compute_sna_atom.cpp b/src/ML-SNAP/compute_sna_atom.cpp index cec705770d..5f24ebeaa6 100644 --- a/src/ML-SNAP/compute_sna_atom.cpp +++ b/src/ML-SNAP/compute_sna_atom.cpp @@ -32,7 +32,7 @@ using namespace LAMMPS_NS; ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), cutsq(nullptr), list(nullptr), sna(nullptr), - radelem(nullptr), wjelem(nullptr), rinnerelem(nullptr), drinnerelem(nullptr) + radelem(nullptr), wjelem(nullptr), sinnerelem(nullptr), dinnerelem(nullptr) { double rmin0, rfac0; @@ -85,6 +85,11 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : } } + // set local input checks + + int sinnerflag = 0; + int dinnerflag = 0; + // process optional args int iarg = nargmin; @@ -134,21 +139,37 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : wselfallflag = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"switchinnerflag") == 0) { - if (iarg+1+2*ntypes > narg) + if (iarg+2 > narg) error->all(FLERR,"Illegal compute sna/atom command"); - switchinnerflag = 1; + switchinnerflag = atoi(arg[iarg+1]); + iarg += 2; + } else if (strcmp(arg[iarg],"sinner") == 0) { iarg++; - memory->create(rinnerelem,ntypes+1,"sna/atom:rinnerelem"); - memory->create(drinnerelem,ntypes+1,"sna/atom:drinnerelem"); + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute sna/atom command"); + memory->create(sinnerelem,ntypes+1,"sna/atom:sinnerelem"); for (int i = 0; i < ntypes; i++) - rinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerflag = 1; iarg += ntypes; + } else if (strcmp(arg[iarg],"dinner") == 0) { + iarg++; + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute sna/atom command"); + memory->create(dinnerelem,ntypes+1,"sna/atom:dinnerelem"); for (int i = 0; i < ntypes; i++) - drinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerflag = 1; iarg += ntypes; } else error->all(FLERR,"Illegal compute sna/atom command"); } + if (switchinnerflag && !(sinnerflag && dinnerflag)) + error->all(FLERR,"Illegal compute sna/atom command: switchinnerflag = 1, missing sinner/dinner keyword"); + + if (!switchinnerflag && (sinnerflag || dinnerflag)) + error->all(FLERR,"Illegal compute sna/atom command: switchinnerflag = 0, unexpected sinner/dinner keyword"); + snaptr = new SNA(lmp, rfac0, twojmax, rmin0, switchflag, bzeroflag, chemflag, bnormflag, wselfallflag, @@ -176,8 +197,8 @@ ComputeSNAAtom::~ComputeSNAAtom() if (chemflag) memory->destroy(map); if (switchinnerflag) { - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); } } @@ -282,8 +303,8 @@ void ComputeSNAAtom::compute_peratom() snaptr->wj[ninside] = wjelem[jtype]; snaptr->rcutij[ninside] = (radi+radelem[jtype])*rcutfac; if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5*(rinnerelem[itype]+rinnerelem[jtype]); - snaptr->drinnerij[ninside] = 0.5*(drinnerelem[itype]+drinnerelem[jtype]); + snaptr->sinnerij[ninside] = 0.5*(sinnerelem[itype]+sinnerelem[jtype]); + snaptr->dinnerij[ninside] = 0.5*(dinnerelem[itype]+dinnerelem[jtype]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; diff --git a/src/ML-SNAP/compute_sna_atom.h b/src/ML-SNAP/compute_sna_atom.h index ffb88d4df3..7d1ebfa2f8 100644 --- a/src/ML-SNAP/compute_sna_atom.h +++ b/src/ML-SNAP/compute_sna_atom.h @@ -45,8 +45,8 @@ class ComputeSNAAtom : public Compute { int *map; // map types to [0,nelements) int nelements, chemflag; int switchinnerflag; - double *rinnerelem; - double *drinnerelem; + double *sinnerelem; + double *dinnerelem; class SNA *snaptr; double cutmax; int quadraticflag; diff --git a/src/ML-SNAP/compute_snad_atom.cpp b/src/ML-SNAP/compute_snad_atom.cpp index 4874a53c9c..838d8a85c9 100644 --- a/src/ML-SNAP/compute_snad_atom.cpp +++ b/src/ML-SNAP/compute_snad_atom.cpp @@ -32,7 +32,7 @@ using namespace LAMMPS_NS; ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), cutsq(nullptr), list(nullptr), snad(nullptr), - radelem(nullptr), wjelem(nullptr), rinnerelem(nullptr), drinnerelem(nullptr) + radelem(nullptr), wjelem(nullptr), sinnerelem(nullptr), dinnerelem(nullptr) { double rfac0, rmin0; int twojmax, switchflag, bzeroflag, bnormflag, wselfallflag; @@ -57,8 +57,8 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : // process required arguments - memory->create(radelem,ntypes+1,"sna/atom:radelem"); // offset by 1 to match up with types - memory->create(wjelem,ntypes+1,"sna/atom:wjelem"); + memory->create(radelem,ntypes+1,"snad/atom:radelem"); // offset by 1 to match up with types + memory->create(wjelem,ntypes+1,"snad/atom:wjelem"); rcutfac = atof(arg[3]); rfac0 = atof(arg[4]); twojmax = atoi(arg[5]); @@ -71,7 +71,7 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : double cut; cutmax = 0.0; - memory->create(cutsq,ntypes+1,ntypes+1,"sna/atom:cutsq"); + memory->create(cutsq,ntypes+1,ntypes+1,"snad/atom:cutsq"); for (int i = 1; i <= ntypes; i++) { cut = 2.0*radelem[i]*rcutfac; if (cut > cutmax) cutmax = cut; @@ -82,6 +82,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : } } + // set local input checks + + int sinnerflag = 0; + int dinnerflag = 0; + // process optional args int iarg = nargmin; @@ -131,21 +136,38 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : wselfallflag = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"switchinnerflag") == 0) { - if (iarg+1+2*ntypes > narg) + if (iarg+2 > narg) error->all(FLERR,"Illegal compute snad/atom command"); - switchinnerflag = 1; + switchinnerflag = atoi(arg[iarg+1]); + iarg += 2; + } else if (strcmp(arg[iarg],"sinner") == 0) { iarg++; - memory->create(rinnerelem,ntypes+1,"snad/atom:rinnerelem"); - memory->create(drinnerelem,ntypes+1,"snad/atom:drinnerelem"); + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute snad/atom command"); + memory->create(sinnerelem,ntypes+1,"snad/atom:sinnerelem"); for (int i = 0; i < ntypes; i++) - rinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerflag = 1; iarg += ntypes; + } else if (strcmp(arg[iarg],"dinner") == 0) { + iarg++; + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute snad/atom command"); + memory->create(dinnerelem,ntypes+1,"snad/atom:dinnerelem"); for (int i = 0; i < ntypes; i++) - drinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerflag = 1; iarg += ntypes; } else error->all(FLERR,"Illegal compute snad/atom command"); } + if (switchinnerflag && !(sinnerflag && dinnerflag)) + error->all(FLERR,"Illegal compute snad/atom command: switchinnerflag = 1, missing sinner/dinner keyword"); + + if (!switchinnerflag && (sinnerflag || dinnerflag)) + error->all(FLERR,"Illegal compute snad/atom command: switchinnerflag = 0, unexpected sinner/dinner keyword"); + + snaptr = new SNA(lmp, rfac0, twojmax, rmin0, switchflag, bzeroflag, chemflag, bnormflag, wselfallflag, @@ -177,8 +199,8 @@ ComputeSNADAtom::~ComputeSNADAtom() if (chemflag) memory->destroy(map); if (switchinnerflag) { - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); } } @@ -190,7 +212,7 @@ void ComputeSNADAtom::init() error->all(FLERR,"Compute snad/atom requires a pair style be defined"); if (cutmax > force->pair->cutforce) - error->all(FLERR,"Compute sna/atom cutoff is longer than pairwise cutoff"); + error->all(FLERR,"Compute snad/atom cutoff is longer than pairwise cutoff"); // need an occasional full neighbor list @@ -299,8 +321,8 @@ void ComputeSNADAtom::compute_peratom() snaptr->wj[ninside] = wjelem[jtype]; snaptr->rcutij[ninside] = (radi+radelem[jtype])*rcutfac; if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5*(rinnerelem[itype]+rinnerelem[jtype]); - snaptr->drinnerij[ninside] = 0.5*(drinnerelem[itype]+drinnerelem[jtype]); + snaptr->sinnerij[ninside] = 0.5*(sinnerelem[itype]+sinnerelem[jtype]); + snaptr->dinnerij[ninside] = 0.5*(dinnerelem[itype]+dinnerelem[jtype]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; diff --git a/src/ML-SNAP/compute_snad_atom.h b/src/ML-SNAP/compute_snad_atom.h index 0951dabb0d..0cdb075daf 100644 --- a/src/ML-SNAP/compute_snad_atom.h +++ b/src/ML-SNAP/compute_snad_atom.h @@ -47,8 +47,8 @@ class ComputeSNADAtom : public Compute { int *map; // map types to [0,nelements) int nelements, chemflag; int switchinnerflag; - double *rinnerelem; - double *drinnerelem; + double *sinnerelem; + double *dinnerelem; class SNA *snaptr; double cutmax; int quadraticflag; diff --git a/src/ML-SNAP/compute_snap.cpp b/src/ML-SNAP/compute_snap.cpp index 04dac2acba..83f56e338c 100644 --- a/src/ML-SNAP/compute_snap.cpp +++ b/src/ML-SNAP/compute_snap.cpp @@ -35,7 +35,7 @@ enum{SCALAR,VECTOR,ARRAY}; ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), cutsq(nullptr), list(nullptr), snap(nullptr), snapall(nullptr), snap_peratom(nullptr), radelem(nullptr), wjelem(nullptr), - rinnerelem(nullptr), drinnerelem(nullptr), snaptr(nullptr) + sinnerelem(nullptr), dinnerelem(nullptr), snaptr(nullptr) { array_flag = 1; @@ -89,6 +89,11 @@ ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) : } } + // set local input checks + + int sinnerflag = 0; + int dinnerflag = 0; + // process optional args int iarg = nargmin; @@ -115,7 +120,7 @@ ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) : quadraticflag = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"chem") == 0) { - if (iarg+2 > narg) + if (iarg+2+ntypes > narg) error->all(FLERR,"Illegal compute snap command"); chemflag = 1; memory->create(map,ntypes+1,"compute_snap:map"); @@ -143,21 +148,37 @@ ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) : bikflag = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"switchinnerflag") == 0) { - if (iarg+1+2*ntypes > narg) + if (iarg+2 > narg) error->all(FLERR,"Illegal compute snap command"); - switchinnerflag = 1; + switchinnerflag = atoi(arg[iarg+1]); + iarg += 2; + } else if (strcmp(arg[iarg],"sinner") == 0) { iarg++; - memory->create(rinnerelem,ntypes+1,"snap:rinnerelem"); - memory->create(drinnerelem,ntypes+1,"snap:drinnerelem"); + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute snap command"); + memory->create(sinnerelem,ntypes+1,"snap:sinnerelem"); for (int i = 0; i < ntypes; i++) - rinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerflag = 1; iarg += ntypes; + } else if (strcmp(arg[iarg],"dinner") == 0) { + iarg++; + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute snap command"); + memory->create(dinnerelem,ntypes+1,"snap:dinnerelem"); for (int i = 0; i < ntypes; i++) - drinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerflag = 1; iarg += ntypes; } else error->all(FLERR,"Illegal compute snap command"); } + if (switchinnerflag && !(sinnerflag && dinnerflag)) + error->all(FLERR,"Illegal compute snap command: switchinnerflag = 1, missing sinner/dinner keyword"); + + if (!switchinnerflag && (sinnerflag || dinnerflag)) + error->all(FLERR,"Illegal compute snap command: switchinnerflag = 0, unexpected sinner/dinner keyword"); + snaptr = new SNA(lmp, rfac0, twojmax, rmin0, switchflag, bzeroflag, chemflag, bnormflag, wselfallflag, @@ -198,8 +219,8 @@ ComputeSnap::~ComputeSnap() if (chemflag) memory->destroy(map); if (switchinnerflag) { - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); } } @@ -353,8 +374,8 @@ void ComputeSnap::compute_array() snaptr->wj[ninside] = wjelem[jtype]; snaptr->rcutij[ninside] = (radi+radelem[jtype])*rcutfac; if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5*(rinnerelem[itype]+rinnerelem[jtype]); - snaptr->drinnerij[ninside] = 0.5*(drinnerelem[itype]+drinnerelem[jtype]); + snaptr->sinnerij[ninside] = 0.5*(sinnerelem[itype]+sinnerelem[jtype]); + snaptr->dinnerij[ninside] = 0.5*(dinnerelem[itype]+dinnerelem[jtype]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; diff --git a/src/ML-SNAP/compute_snap.h b/src/ML-SNAP/compute_snap.h index 562002dcf3..bc0670e2c7 100644 --- a/src/ML-SNAP/compute_snap.h +++ b/src/ML-SNAP/compute_snap.h @@ -47,8 +47,8 @@ class ComputeSnap : public Compute { int *map; // map types to [0,nelements) int nelements, chemflag; int switchinnerflag; - double *rinnerelem; - double *drinnerelem; + double *sinnerelem; + double *dinnerelem; class SNA *snaptr; double cutmax; int quadraticflag; diff --git a/src/ML-SNAP/compute_snav_atom.cpp b/src/ML-SNAP/compute_snav_atom.cpp index d3999381f2..0baa4bc110 100644 --- a/src/ML-SNAP/compute_snav_atom.cpp +++ b/src/ML-SNAP/compute_snav_atom.cpp @@ -31,7 +31,7 @@ using namespace LAMMPS_NS; ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), cutsq(nullptr), list(nullptr), snav(nullptr), - radelem(nullptr), wjelem(nullptr), rinnerelem(nullptr), drinnerelem(nullptr) + radelem(nullptr), wjelem(nullptr), sinnerelem(nullptr), dinnerelem(nullptr) { double rfac0, rmin0; int twojmax, switchflag, bzeroflag, bnormflag, wselfallflag; @@ -56,8 +56,8 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : // process required arguments - memory->create(radelem,ntypes+1,"sna/atom:radelem"); // offset by 1 to match up with types - memory->create(wjelem,ntypes+1,"sna/atom:wjelem"); + memory->create(radelem,ntypes+1,"snav/atom:radelem"); // offset by 1 to match up with types + memory->create(wjelem,ntypes+1,"snav/atom:wjelem"); rcutfac = atof(arg[3]); rfac0 = atof(arg[4]); twojmax = atoi(arg[5]); @@ -67,7 +67,7 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : wjelem[i+1] = atof(arg[6+ntypes+i]); // construct cutsq double cut; - memory->create(cutsq,ntypes+1,ntypes+1,"sna/atom:cutsq"); + memory->create(cutsq,ntypes+1,ntypes+1,"snav/atom:cutsq"); for (int i = 1; i <= ntypes; i++) { cut = 2.0*radelem[i]*rcutfac; cutsq[i][i] = cut*cut; @@ -77,6 +77,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : } } + // set local input checks + + int sinnerflag = 0; + int dinnerflag = 0; + // process optional args int iarg = nargmin; @@ -104,7 +109,7 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else if (strcmp(arg[iarg],"chem") == 0) { if (iarg+2+ntypes > narg) - error->all(FLERR,"Illegal compute sna/atom command"); + error->all(FLERR,"Illegal compute snav/atom command"); chemflag = 1; memory->create(map,ntypes+1,"compute_sna_atom:map"); nelements = utils::inumeric(FLERR,arg[iarg+1],false,lmp); @@ -126,21 +131,37 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : wselfallflag = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"switchinnerflag") == 0) { - if (iarg+1+2*ntypes > narg) + if (iarg+2 > narg) error->all(FLERR,"Illegal compute snav/atom command"); - switchinnerflag = 1; + switchinnerflag = atoi(arg[iarg+1]); + iarg += 2; + } else if (strcmp(arg[iarg],"sinner") == 0) { iarg++; - memory->create(rinnerelem,ntypes+1,"snav/atom:rinnerelem"); - memory->create(drinnerelem,ntypes+1,"snav/atom:drinnerelem"); + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute snav/atom command"); + memory->create(sinnerelem,ntypes+1,"snav/atom:sinnerelem"); for (int i = 0; i < ntypes; i++) - rinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + sinnerflag = 1; iarg += ntypes; + } else if (strcmp(arg[iarg],"dinner") == 0) { + iarg++; + if (iarg+ntypes > narg) + error->all(FLERR,"Illegal compute snav/atom command"); + memory->create(dinnerelem,ntypes+1,"snav/atom:dinnerelem"); for (int i = 0; i < ntypes; i++) - drinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerelem[i+1] = utils::numeric(FLERR,arg[iarg+i],false,lmp); + dinnerflag = 1; iarg += ntypes; } else error->all(FLERR,"Illegal compute snav/atom command"); } + if (switchinnerflag && !(sinnerflag && dinnerflag)) + error->all(FLERR,"Illegal compute snav/atom command: switchinnerflag = 1, missing sinner/dinner keyword"); + + if (!switchinnerflag && (sinnerflag || dinnerflag)) + error->all(FLERR,"Illegal compute snav/atom command: switchinnerflag = 0, unexpected sinner/dinner keyword"); + snaptr = new SNA(lmp, rfac0, twojmax, rmin0, switchflag, bzeroflag, chemflag, bnormflag, wselfallflag, @@ -171,8 +192,8 @@ ComputeSNAVAtom::~ComputeSNAVAtom() if (chemflag) memory->destroy(map); if (switchinnerflag) { - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); } } @@ -291,8 +312,8 @@ void ComputeSNAVAtom::compute_peratom() snaptr->wj[ninside] = wjelem[jtype]; snaptr->rcutij[ninside] = (radi+radelem[jtype])*rcutfac; if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5*(rinnerelem[itype]+rinnerelem[jtype]); - snaptr->drinnerij[ninside] = 0.5*(drinnerelem[itype]+drinnerelem[jtype]); + snaptr->sinnerij[ninside] = 0.5*(sinnerelem[itype]+sinnerelem[jtype]); + snaptr->dinnerij[ninside] = 0.5*(dinnerelem[itype]+dinnerelem[jtype]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; diff --git a/src/ML-SNAP/compute_snav_atom.h b/src/ML-SNAP/compute_snav_atom.h index a261507601..1eb84d8df7 100644 --- a/src/ML-SNAP/compute_snav_atom.h +++ b/src/ML-SNAP/compute_snav_atom.h @@ -47,8 +47,8 @@ class ComputeSNAVAtom : public Compute { int *map; // map types to [0,nelements) int nelements, chemflag; int switchinnerflag; - double *rinnerelem; - double *drinnerelem; + double *sinnerelem; + double *dinnerelem; class SNA *snaptr; int quadraticflag; }; diff --git a/src/ML-SNAP/pair_snap.cpp b/src/ML-SNAP/pair_snap.cpp index 208857cd90..07a8237ab5 100644 --- a/src/ML-SNAP/pair_snap.cpp +++ b/src/ML-SNAP/pair_snap.cpp @@ -45,8 +45,8 @@ PairSNAP::PairSNAP(LAMMPS *lmp) : Pair(lmp) radelem = nullptr; wjelem = nullptr; coeffelem = nullptr; - rinnerelem = nullptr; - drinnerelem = nullptr; + sinnerelem = nullptr; + dinnerelem = nullptr; beta_max = 0; beta = nullptr; @@ -65,8 +65,8 @@ PairSNAP::~PairSNAP() memory->destroy(coeffelem); if (switchinnerflag) { - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); } memory->destroy(beta); @@ -158,8 +158,8 @@ void PairSNAP::compute(int eflag, int vflag) snaptr->wj[ninside] = wjelem[jelem]; snaptr->rcutij[ninside] = (radi + radelem[jelem])*rcutfac; if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5*(rinnerelem[ielem]+rinnerelem[jelem]); - snaptr->drinnerij[ninside] = 0.5*(drinnerelem[ielem]+drinnerelem[jelem]); + snaptr->sinnerij[ninside] = 0.5*(sinnerelem[ielem]+sinnerelem[jelem]); + snaptr->dinnerij[ninside] = 0.5*(dinnerelem[ielem]+dinnerelem[jelem]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; @@ -331,8 +331,8 @@ void PairSNAP::compute_bispectrum() snaptr->wj[ninside] = wjelem[jelem]; snaptr->rcutij[ninside] = (radi + radelem[jelem])*rcutfac; if (switchinnerflag) { - snaptr->rinnerij[ninside] = 0.5*(rinnerelem[ielem]+rinnerelem[jelem]); - snaptr->drinnerij[ninside] = 0.5*(drinnerelem[ielem]+drinnerelem[jelem]); + snaptr->sinnerij[ninside] = 0.5*(sinnerelem[ielem]+sinnerelem[jelem]); + snaptr->dinnerij[ninside] = 0.5*(dinnerelem[ielem]+dinnerelem[jelem]); } if (chemflag) snaptr->element[ninside] = jelem; ninside++; @@ -516,13 +516,13 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) memory->destroy(radelem); memory->destroy(wjelem); memory->destroy(coeffelem); - memory->destroy(rinnerelem); - memory->destroy(drinnerelem); + memory->destroy(sinnerelem); + memory->destroy(dinnerelem); memory->create(radelem,nelements,"pair:radelem"); memory->create(wjelem,nelements,"pair:wjelem"); memory->create(coeffelem,nelements,ncoeffall,"pair:coeffelem"); - memory->create(rinnerelem,nelements,"pair:rinnerelem"); - memory->create(drinnerelem,nelements,"pair:drinnerelem"); + memory->create(sinnerelem,nelements,"pair:sinnerelem"); + memory->create(dinnerelem,nelements,"pair:dinnerelem"); // initialize checklist for all required nelements @@ -644,8 +644,8 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) // set local input checks - int rinnerflag = 0; - int drinnerflag = 0; + int sinnerflag = 0; + int dinnerflag = 0; // open SNAP parameter file on proc 0 @@ -688,34 +688,40 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) auto keywd = words[0]; auto keyval = words[1]; - // check for keywords with one value per element + // check for keywords with more than one value per element - if (keywd == "rinner" || keywd == "drinner") { + if (keywd == "sinner" || keywd == "dinner") { if ((int)words.size() != nelements+1) error->all(FLERR,"Incorrect SNAP parameter file"); - if (comm->me == 0) - utils::logmesg(lmp,"SNAP keyword {} {} ... \n", keywd, keyval); + // innerlogstr collects all values of sinner or dinner for log output below + + std::string innerlogstr; int iword = 1; - if (keywd == "rinner") { - keyval = words[iword]; + if (keywd == "sinner") { for (int ielem = 0; ielem < nelements; ielem++) { - rinnerelem[ielem] = utils::numeric(FLERR,keyval,false,lmp); + keyval = words[iword]; + sinnerelem[ielem] = utils::numeric(FLERR,keyval,false,lmp); iword++; + innerlogstr += keyval + " "; } - rinnerflag = 1; - } else if (keywd == "drinner") { - keyval = words[iword]; + sinnerflag = 1; + } else if (keywd == "dinner") { for (int ielem = 0; ielem < nelements; ielem++) { - drinnerelem[ielem] = utils::numeric(FLERR,keyval,false,lmp); + keyval = words[iword]; + dinnerelem[ielem] = utils::numeric(FLERR,keyval,false,lmp); iword++; + innerlogstr += keyval + " "; } - drinnerflag = 1; + dinnerflag = 1; } + if (comm->me == 0) + utils::logmesg(lmp,"SNAP keyword {} {} ... \n", keywd, innerlogstr); + } else { // all other keywords take one value @@ -765,10 +771,10 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) if (chemflag && nelemtmp != nelements) error->all(FLERR,"Incorrect SNAP parameter file"); - if (switchinnerflag && !(rinnerflag && drinnerflag)) + if (switchinnerflag && !(sinnerflag && dinnerflag)) error->all(FLERR,"Incorrect SNAP parameter file"); - if (!switchinnerflag && (rinnerflag || drinnerflag)) + if (!switchinnerflag && (sinnerflag || dinnerflag)) error->all(FLERR,"Incorrect SNAP parameter file"); } diff --git a/src/ML-SNAP/pair_snap.h b/src/ML-SNAP/pair_snap.h index 3ba492615b..fc7c41a6ce 100644 --- a/src/ML-SNAP/pair_snap.h +++ b/src/ML-SNAP/pair_snap.h @@ -60,9 +60,9 @@ class PairSNAP : public Pair { int twojmax, switchflag, bzeroflag, bnormflag; int chemflag, wselfallflag; int switchinnerflag; // inner cutoff switch - double *rinnerelem; // element inner cutoff - double *drinnerelem; // element inner cutoff range - int chunksize, parallel_thresh; + double *sinnerelem; // element inner cutoff midpoint + double *dinnerelem; // element inner cutoff half-width + int chunksize,parallel_thresh; double rfac0, rmin0, wj1, wj2; int rcutfacflag, twojmaxflag; // flags for required parameters int beta_max; // length of beta diff --git a/src/ML-SNAP/sna.cpp b/src/ML-SNAP/sna.cpp index 9d32f4ab9c..33937b9c45 100644 --- a/src/ML-SNAP/sna.cpp +++ b/src/ML-SNAP/sna.cpp @@ -145,8 +145,8 @@ SNA::SNA(LAMMPS* lmp, double rfac0_in, int twojmax_in, inside = nullptr; wj = nullptr; rcutij = nullptr; - rinnerij = nullptr; - drinnerij = nullptr; + sinnerij = nullptr; + dinnerij = nullptr; element = nullptr; nmax = 0; idxz = nullptr; @@ -176,10 +176,8 @@ SNA::~SNA() memory->destroy(inside); memory->destroy(wj); memory->destroy(rcutij); - if (switch_inner_flag) { - memory->destroy(rinnerij); - memory->destroy(drinnerij); - } + memory->destroy(sinnerij); + memory->destroy(dinnerij); if (chem_flag) memory->destroy(element); memory->destroy(ulist_r_ij); memory->destroy(ulist_i_ij); @@ -327,10 +325,8 @@ void SNA::grow_rij(int newnmax) memory->destroy(inside); memory->destroy(wj); memory->destroy(rcutij); - if (switch_inner_flag) { - memory->destroy(rinnerij); - memory->destroy(drinnerij); - } + memory->destroy(sinnerij); + memory->destroy(dinnerij); if (chem_flag) memory->destroy(element); memory->destroy(ulist_r_ij); memory->destroy(ulist_i_ij); @@ -338,10 +334,8 @@ void SNA::grow_rij(int newnmax) memory->create(inside, nmax, "pair:inside"); memory->create(wj, nmax, "pair:wj"); memory->create(rcutij, nmax, "pair:rcutij"); - if (switch_inner_flag) { - memory->create(rinnerij, nmax, "pair:rinnerij"); - memory->create(drinnerij, nmax, "pair:drinnerij"); - } + memory->create(sinnerij, nmax, "pair:sinnerij"); + memory->create(dinnerij, nmax, "pair:dinnerij"); if (chem_flag) memory->create(element, nmax, "sna:element"); memory->create(ulist_r_ij, nmax, idxu_max, "sna:ulist_ij"); memory->create(ulist_i_ij, nmax, idxu_max, "sna:ulist_ij"); @@ -1020,12 +1014,9 @@ void SNA::add_uarraytot(double r, int jj) double sfac; int jelem; - sfac = compute_sfac(r, rcutij[jj]); + sfac = compute_sfac(r, rcutij[jj], sinnerij[jj], dinnerij[jj]); sfac *= wj[jj]; - if (switch_inner_flag) - sfac *= compute_sfac_inner(r, rinnerij[jj], drinnerij[jj]); - if (chem_flag) jelem = element[jj]; else jelem = 0; @@ -1268,14 +1259,8 @@ void SNA::compute_duarray(double x, double y, double z, } } - double sfac = compute_sfac(r, rcut); - double dsfac = compute_dsfac(r, rcut); - - if (switch_inner_flag) { - double sfac_inner = compute_sfac_inner(r, rinnerij[jj], drinnerij[jj]); - dsfac = dsfac*sfac_inner + sfac*compute_dsfac_inner(r, rinnerij[jj], drinnerij[jj]); - sfac *= sfac_inner; - } + double sfac = compute_sfac(r, rcut, sinnerij[jj], dinnerij[jj]); + double dsfac = compute_dsfac(r, rcut, sinnerij[jj], dinnerij[jj]); sfac *= wj; dsfac *= wj; @@ -1339,10 +1324,8 @@ double SNA::memory_usage() bytes += (double)nmax * sizeof(int); // inside bytes += (double)nmax * sizeof(double); // wj bytes += (double)nmax * sizeof(double); // rcutij - if (switch_inner_flag) { - bytes += (double)nmax * sizeof(double); // rinnerij - bytes += (double)nmax * sizeof(double); // drinnerij - } + bytes += (double)nmax * sizeof(double); // sinnerij + bytes += (double)nmax * sizeof(double); // dinnerij if (chem_flag) bytes += (double)nmax * sizeof(int); // element return bytes; @@ -1547,9 +1530,12 @@ void SNA::compute_ncoeff() /* ---------------------------------------------------------------------- */ -double SNA::compute_sfac(double r, double rcut) +double SNA::compute_sfac(double r, double rcut, double sinner, double dinner) { double sfac; + + // calculate sfac = sfac_outer + if (switch_flag == 0) sfac = 1.0; else if (r <= rmin0) sfac = 1.0; else if (r > rcut) sfac = 0.0; @@ -1557,51 +1543,56 @@ double SNA::compute_sfac(double r, double rcut) double rcutfac = MY_PI / (rcut - rmin0); sfac = 0.5 * (cos((r - rmin0) * rcutfac) + 1.0); } + + // calculate sfac *= sfac_inner, rarely visited + + if (switch_inner_flag == 1 && r < sinner + dinner) { + if (r > sinner - dinner) { + double rcutfac = MY_PI2 / dinner; + sfac *= 0.5 * (1.0 - cos(MY_PI2 + (r - sinner) * rcutfac)); + } else sfac = 0.0; + } + return sfac; } /* ---------------------------------------------------------------------- */ -double SNA::compute_dsfac(double r, double rcut) +double SNA::compute_dsfac(double r, double rcut, double sinner, double dinner) { - double dsfac; - if (switch_flag == 0) dsfac = 0.0; - else if (r <= rmin0) dsfac = 0.0; - else if (r > rcut) dsfac = 0.0; + double dsfac, sfac_outer, dsfac_outer, sfac_inner, dsfac_inner; + if (switch_flag == 0) dsfac_outer = 0.0; + else if (r <= rmin0) dsfac_outer = 0.0; + else if (r > rcut) dsfac_outer = 0.0; else { double rcutfac = MY_PI / (rcut - rmin0); - dsfac = -0.5 * sin((r - rmin0) * rcutfac) * rcutfac; - } - return dsfac; -} - -/* ---------------------------------------------------------------------- */ - -double SNA::compute_sfac_inner(double r, double rinner, double drinner) -{ - double sfac; - if (switch_inner_flag == 0) sfac = 1.0; - else if (r >= rinner + drinner) sfac = 1.0; - else if (r <= rinner) sfac = 0.0; - else { - double rcutfac = MY_PI / drinner; - sfac = 0.5 * (1.0 - cos((r - rinner) * rcutfac)); - } - return sfac; -} - -/* ---------------------------------------------------------------------- */ - -double SNA::compute_dsfac_inner(double r, double rinner, double drinner) -{ - double dsfac; - if (switch_inner_flag == 0) dsfac = 0.0; - else if (r >= rinner + drinner) dsfac = 0.0; - else if (r <= rinner) dsfac = 0.0; - else { - double rcutfac = MY_PI / drinner; - dsfac = 0.5 * sin((r - rinner) * rcutfac) * rcutfac; + dsfac_outer = -0.5 * sin((r - rmin0) * rcutfac) * rcutfac; } + + // some duplicated computation, but rarely visited + + if (switch_inner_flag == 1 && r < sinner + dinner) { + if (r > sinner - dinner) { + + // calculate sfac_outer + + if (switch_flag == 0) sfac_outer = 1.0; + else if (r <= rmin0) sfac_outer = 1.0; + else if (r > rcut) sfac_outer = 0.0; + else { + double rcutfac = MY_PI / (rcut - rmin0); + sfac_outer = 0.5 * (cos((r - rmin0) * rcutfac) + 1.0); + } + + // calculate sfac_inner + + double rcutfac = MY_PI2 / dinner; + sfac_inner = 0.5 * (1.0 - cos(MY_PI2 + (r - sinner) * rcutfac)); + dsfac_inner = 0.5 * rcutfac * sin(MY_PI2 + (r - sinner) * rcutfac); + dsfac = dsfac_outer*sfac_inner + sfac_outer*dsfac_inner; + } else dsfac = 0.0; + } else dsfac = dsfac_outer; + return dsfac; } diff --git a/src/ML-SNAP/sna.h b/src/ML-SNAP/sna.h index b04e9dcade..d35d7bd4fd 100644 --- a/src/ML-SNAP/sna.h +++ b/src/ML-SNAP/sna.h @@ -56,11 +56,8 @@ class SNA : protected Pointers { void compute_duidrj(int); void compute_dbidrj(); void compute_deidrj(double *); - double compute_sfac(double, double); - double compute_dsfac(double, double); - - double compute_sfac_inner(double, double, double); - double compute_dsfac_inner(double, double, double); + double compute_sfac(double, double, double, double); + double compute_dsfac(double, double, double, double); // public bispectrum data @@ -80,8 +77,8 @@ class SNA : protected Pointers { // only allocated for switch_inner_flag=1 - double *rinnerij; // short inner cutoff list - double *drinnerij; // short inner range list + double *sinnerij; // short inner cutoff midpoint list + double *dinnerij; // short inner half-width list // only allocated for chem_flag=1 diff --git a/src/SMTBQ/README b/src/SMTBQ/README deleted file mode 100644 index 594df29ac6..0000000000 --- a/src/SMTBQ/README +++ /dev/null @@ -1,16 +0,0 @@ -This package implements the Second Moment Tight Binding - QEq (SMTB-Q) -potential for the description of ionocovalent bonds in oxides. - -Authors: Nicolas Salles, Emile Maras, Olivier Politano, Robert Tetot -at ICB, Universite de Bourgogne and ICMMO, Universite Paris-Sud. - -Contact emails: lammps@u-bourgogne.fr, nsalles33@gmail.com - -This package is occasionally maintained. - -See the doc page for the pair_style smtbq command to get started. - -There are potential files for this potential in the potentials dir. - -There are example scripts for using this package in -examples/PACKAGES/smtbq. diff --git a/src/SMTBQ/pair_smatb.cpp b/src/SMTBQ/pair_smatb.cpp new file mode 100644 index 0000000000..b2cbda0854 --- /dev/null +++ b/src/SMTBQ/pair_smatb.cpp @@ -0,0 +1,558 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Daniele Rapetti (iximiel@gmail.com) +------------------------------------------------------------------------- */ + +#include "pair_smatb.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" + +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +PairSMATB::PairSMATB(LAMMPS *_lmp) : + Pair(_lmp), nmax(0), on_eb(nullptr), r0(nullptr), p(nullptr), A(nullptr), q(nullptr), + QSI(nullptr), cutOffStart(nullptr), cutOffEnd(nullptr), cutOffEnd2(nullptr), a3(nullptr), + a4(nullptr), a5(nullptr), x3(nullptr), x4(nullptr), x5(nullptr) +{ + single_enable = 0; // 1 if single() routine exists + restartinfo = 1; // 1 if pair style writes restart info + respa_enable = 0; // 1 if inner/middle/outer rRESPA routines + one_coeff = 0; // 1 if allows only one coeff * * call + manybody_flag = 1; // 1 if a manybody potential + no_virial_fdotr_compute = 0; // 1 if does not invoke virial_fdotr_compute() + writedata = 1; // 1 if writes coeffs to data file + ghostneigh = 0; // 1 if pair style needs neighbors of ghosts + + // set comm size needed by this Pair + comm_forward = 1; + comm_reverse = 1; +} + +/* ---------------------------------------------------------------------- */ + +PairSMATB::~PairSMATB() +{ + if (copymode) { return; } + memory->destroy(on_eb); + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + + memory->destroy(r0); + memory->destroy(p); + memory->destroy(A); + memory->destroy(q); + memory->destroy(QSI); + memory->destroy(cutOffStart); + memory->destroy(cutOffEnd); + memory->destroy(cutOffEnd2); + memory->destroy(a3); + memory->destroy(a4); + memory->destroy(a5); + memory->destroy(x5); + memory->destroy(x4); + memory->destroy(x3); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::compute(int eflag, int vflag) +{ + int i, j, ii, jj, jnum, itype, jtype; + double xtmp, ytmp, ztmp, del[3], fpair; + double dijsq, dij; + double espo, aexpp, qsiexpq, eb_i, Fb, Fr; + double polyval, polyval2, polyval3, polyval4, polyval5; + + if (eflag || vflag) { + ev_setup(eflag, vflag); + eng_vdwl = 0; + } else { + evflag = vflag_fdotr = eflag_global = eflag_atom = 0; + } + + // grow on_eb array if necessary + + if (atom->nmax > nmax) { + nmax = atom->nmax; + memory->grow(on_eb, nmax, "pair_smatb:on_eb"); + } + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + int nall = nlocal + atom->nghost; + + int newton_pair = force->newton_pair; + + // zero out on_eb + memset(on_eb, 0, nall * sizeof(double)); + + int inum = list->inum; + int *ilist = list->ilist; + int *jlist; + int *numneigh = list->numneigh; + int **firstneigh = list->firstneigh; + + // FIRST LOOP: CALCULATES the squared bonding energy and accumulate it in on_eb for each atom + for (ii = 0; ii < inum; ++ii) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (jj = 0; jj < jnum; ++jj) { + j = jlist[jj]; + j &= NEIGHMASK; + jtype = type[j]; + del[0] = xtmp - x[j][0]; + del[1] = ytmp - x[j][1]; + del[2] = ztmp - x[j][2]; + dijsq = del[0] * del[0] + del[1] * del[1] + del[2] * del[2]; + + if (dijsq < cutOffEnd2[itype][jtype]) { + dij = sqrt(dijsq); + if (dij < cutOffStart[itype][jtype]) { + qsiexpq = (QSI[itype][jtype] * QSI[itype][jtype]) * + exp(2.0 * q[itype][jtype] * (1.0 - dij / r0[itype][jtype])); + } else { + polyval = dij - cutOffEnd[itype][jtype]; + polyval3 = polyval * polyval * polyval; + polyval4 = polyval3 * polyval; + polyval5 = polyval4 * polyval; + qsiexpq = x5[itype][jtype] * polyval5 + x4[itype][jtype] * polyval4 + + x3[itype][jtype] * polyval3; + qsiexpq = qsiexpq * qsiexpq; + } + on_eb[i] += qsiexpq; + if (newton_pair) on_eb[j] += qsiexpq; + } + } + } + + // communicate the squared bonding energy between the various bins + + if (newton_pair) comm->reverse_comm(this); + + // Support Loop: take the square root of the bonding energy and + // accumulate it in the energy accumulator if needed the store the + // reciprocal in on_eb in order to not do it in the SECOND LOOP + + for (ii = 0; ii < inum; ++ii) { + i = ilist[ii]; + if (i < nlocal) { + eb_i = sqrt(on_eb[i]); + if (eb_i != 0.0) { + on_eb[i] = 1.0 / eb_i; + } else { + on_eb[i] = 0.0; + } + // if needed the bonding energy is accumulated: + if (eflag_either) { + if (eflag_atom) { eatom[i] -= eb_i; } + if (eflag_global) { eng_vdwl -= eb_i; } + } + } + } + // this communication stores the denominators in the ghosts atoms, + // this is needed because of how forces are calculated + comm->forward_comm(this); + + // SECOND LOOP: given on_eb[i] calculates forces and energies + for (ii = 0; ii < inum; ++ii) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + jtype = type[j]; + + del[0] = xtmp - x[j][0]; + del[1] = ytmp - x[j][1]; + del[2] = ztmp - x[j][2]; + + dijsq = del[0] * del[0] + del[1] * del[1] + del[2] * del[2]; + if (dijsq < cutOffEnd2[itype][jtype]) { + dij = sqrt(dijsq); + if (dij < cutOffStart[itype][jtype]) { + espo = 1.0 - dij / r0[itype][jtype]; + aexpp = exp(p[itype][jtype] * espo) * A[itype][jtype]; + Fr = (2.0 * aexpp) * (p[itype][jtype] / r0[itype][jtype]); + qsiexpq = (QSI[itype][jtype] * QSI[itype][jtype]) * exp(2.0 * q[itype][jtype] * espo); + Fb = -qsiexpq * q[itype][jtype] / r0[itype][jtype]; + } else { + polyval = dij - cutOffEnd[itype][jtype]; + polyval2 = polyval * polyval; + polyval3 = polyval2 * polyval; + polyval4 = polyval3 * polyval; + polyval5 = polyval4 * polyval; + aexpp = a5[itype][jtype] * polyval5 + a4[itype][jtype] * polyval4 + + a3[itype][jtype] * polyval3; + Fr = -2.0 * + (5.0 * a5[itype][jtype] * polyval4 + 4.0 * a4[itype][jtype] * polyval3 + + 3.0 * a3[itype][jtype] * polyval2); + qsiexpq = x5[itype][jtype] * polyval5 + x4[itype][jtype] * polyval4 + + x3[itype][jtype] * polyval3; + Fb = ((5.0 * x5[itype][jtype] * polyval4 + 4.0 * x4[itype][jtype] * polyval3 + + 3.0 * x3[itype][jtype] * polyval2)) * + qsiexpq; + } + + // calculates the module of the pair energy between i and j + fpair = (Fb * (on_eb[i] + on_eb[j]) + Fr) / dij; + + f[i][0] += del[0] * fpair; + f[i][1] += del[1] * fpair; + f[i][2] += del[2] * fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= del[0] * fpair; + f[j][1] -= del[1] * fpair; + f[j][2] -= del[2] * fpair; + } + if (evflag) { + ev_tally(i, j, nlocal, newton_pair, 2.0 * aexpp, 0.0, fpair, del[0], del[1], del[2]); + } + } + } + } + if (vflag_fdotr) virial_fdotr_compute(); +} + +/* ---------------------------------------------------------------------- + global settings + ------------------------------------------------------------------------- */ + +void PairSMATB::settings(int narg, char **) +{ + if (narg > 0) error->all(FLERR, "Illegal pair_style command: smatb accepts no options"); +} + +/* ---------------------------------------------------------------------- + allocate all arrays + ------------------------------------------------------------------------- */ + +void PairSMATB::allocate() +{ + const int np1 = atom->ntypes + 1; + + memory->create(setflag, np1, np1, "pair_smatb:setflag"); + for (int i = 1; i < np1; i++) + for (int j = i; j < np1; j++) setflag[i][j] = 0; + + memory->create(cutsq, np1, np1, "pair_smatb:cutsq"); + memory->create(r0, np1, np1, "pair_smatb:r0"); + memory->create(p, np1, np1, "pair_smatb:p"); + memory->create(A, np1, np1, "pair_smatb:A"); + memory->create(q, np1, np1, "pair_smatb:q"); + memory->create(QSI, np1, np1, "pair_smatb:QSI"); + memory->create(cutOffStart, np1, np1, "pair_smatb:cutOffStart"); + memory->create(cutOffEnd, np1, np1, "pair_smatb:cutOffEnd"); + memory->create(cutOffEnd2, np1, np1, "pair_smatb:cutOffEnd2"); + memory->create(a3, np1, np1, "pair_smatb:a1"); + memory->create(a4, np1, np1, "pair_smatb:a2"); + memory->create(a5, np1, np1, "pair_smatb:a5"); + memory->create(x3, np1, np1, "pair_smatb:x1"); + memory->create(x4, np1, np1, "pair_smatb:x2"); + memory->create(x5, np1, np1, "pair_smatb:x3"); + + allocated = 1; +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs + ------------------------------------------------------------------------- */ + +void PairSMATB::coeff(int narg, char **arg) +{ + if (!allocated) { allocate(); } + if (narg != 9) utils::missing_cmd_args(FLERR, "pair_style smatb", error); + + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR, arg[0], 1, atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR, arg[1], 1, atom->ntypes, jlo, jhi, error); + + double myr0 = utils::numeric(FLERR, arg[2], false, lmp); + double myp = utils::numeric(FLERR, arg[3], false, lmp); + double myq = utils::numeric(FLERR, arg[4], false, lmp); + double myA = utils::numeric(FLERR, arg[5], false, lmp); + double myQSI = utils::numeric(FLERR, arg[6], false, lmp); + double mycutOffStart = utils::numeric(FLERR, arg[7], false, lmp); + double mycutOffEnd = utils::numeric(FLERR, arg[8], false, lmp); + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { + r0[i][j] = myr0; + p[i][j] = myp; + A[i][j] = myA; + q[i][j] = myq; + QSI[i][j] = myQSI; + cutOffStart[i][j] = mycutOffStart; + cutOffEnd[i][j] = mycutOffEnd; + + setflag[i][j] = 1; + + count++; + } + } + + if (count == 0) error->all(FLERR, "Incorrect args for pair coefficients"); +} + +/* ------------------------------------------------------------------------ */ + +void PairSMATB::init_style() +{ + if (force->newton_pair == 0) error->all(FLERR, "Pair style smatb requires newton pair on"); + + neighbor->add_request(this); +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i + ------------------------------------------------------------------------- */ + +double PairSMATB::init_one(int i, int j) +{ + if (setflag[i][j] == 0) { + ///@todo implement smatb mixing rules + cutOffStart[i][j] = MIN(cutOffStart[i][i], cutOffStart[j][j]); + cutOffEnd[i][j] = MAX(cutOffEnd[i][i], cutOffEnd[j][j]); + + error->all(FLERR, "All pair coeffs are not set"); + } + + double es = cutOffEnd[i][j] - cutOffStart[i][j]; + double es2 = es * es; + double es3 = es2 * es; + + // variables for poly for p and A + double expp = A[i][j] * exp(p[i][j] * (1. - cutOffStart[i][j] / r0[i][j])); + double ap = -1. / es3; + double bp = p[i][j] / (r0[i][j] * es2); + double cp = -(p[i][j] * p[i][j]) / (es * r0[i][j] * r0[i][j]); + + a5[i][j] = expp * (12. * ap + 6. * bp + cp) / (2. * es2); + a4[i][j] = expp * (15. * ap + 7. * bp + cp) / es; + a3[i][j] = expp * (20. * ap + 8. * bp + cp) / 2.; + + // variables for poly for q and qsi + double expq = QSI[i][j] * exp(q[i][j] * (1. - cutOffStart[i][j] / r0[i][j])); + double aq = -1 / es3; + double bq = q[i][j] / (es2 * r0[i][j]); + double cq = -(q[i][j] * q[i][j]) / (es * r0[i][j] * r0[i][j]); + + x5[i][j] = expq * (12. * aq + 6. * bq + cq) / (2. * es2); + x4[i][j] = expq * (15. * aq + 7. * bq + cq) / es; + x3[i][j] = expq * (20. * aq + 8. * bq + cq) / 2.; + + cutOffEnd2[i][j] = cutOffEnd[i][j] * cutOffEnd[i][j]; + if (i != j) { + setflag[j][i] = 1; + cutOffEnd2[j][i] = cutOffEnd2[i][j]; + + r0[j][i] = r0[i][j]; + p[j][i] = p[i][j]; + q[j][i] = q[i][j]; + A[j][i] = A[i][j]; + QSI[j][i] = QSI[i][j]; + cutOffStart[j][i] = cutOffStart[i][j]; + cutOffEnd[j][i] = cutOffEnd[i][j]; + + a3[j][i] = a3[i][j]; + a4[j][i] = a4[i][j]; + a5[j][i] = a5[i][j]; + x3[j][i] = x3[i][j]; + x4[j][i] = x4[i][j]; + x5[j][i] = x5[i][j]; + } + + return cutOffEnd[i][j]; +} + +/* ---------------------------------------------------------------------- */ + +int PairSMATB::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) +{ + int i, j, m; + + m = 0; + for (i = 0; i < n; ++i) { + j = list[i]; + buf[m++] = on_eb[j]; + } + return m; +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::unpack_forward_comm(int n, int first, double *buf) +{ + int i, m, last; + + m = 0; + last = first + n; + for (i = first; i < last; ++i) { on_eb[i] = buf[m++]; } +} + +/* ---------------------------------------------------------------------- */ + +int PairSMATB::pack_reverse_comm(int n, int first, double *buf) +{ + int i, m, last; + + m = 0; + last = first + n; + for (i = first; i < last; ++i) { buf[m++] = on_eb[i]; } + return m; +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::unpack_reverse_comm(int n, int *list, double *buf) +{ + int i, j, m; + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + on_eb[j] += buf[m++]; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::write_restart_settings(FILE *fp) +{ + fwrite(&offset_flag, sizeof(int), 1, fp); + fwrite(&mix_flag, sizeof(int), 1, fp); + fwrite(&tail_flag, sizeof(int), 1, fp); +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::read_restart_settings(FILE *fp) +{ + int me = comm->me; + size_t result; + if (me == 0) { + result = fread(&offset_flag, sizeof(int), 1, fp); + result = fread(&mix_flag, sizeof(int), 1, fp); + result = fread(&tail_flag, sizeof(int), 1, fp); + } + MPI_Bcast(&offset_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&mix_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&tail_flag, 1, MPI_INT, 0, world); +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::write_restart(FILE *fp) +{ + write_restart_settings(fp); + + int i, j; + for (i = 1; i <= atom->ntypes; i++) { + for (j = i; j <= atom->ntypes; j++) { + fwrite(&setflag[i][j], sizeof(int), 1, fp); + if (setflag[i][j]) { + fwrite(&r0[i][j], sizeof(double), 1, fp); + fwrite(&p[i][j], sizeof(double), 1, fp); + fwrite(&q[i][j], sizeof(double), 1, fp); + fwrite(&A[i][j], sizeof(double), 1, fp); + fwrite(&QSI[i][j], sizeof(double), 1, fp); + fwrite(&cutOffStart[i][j], sizeof(double), 1, fp); + fwrite(&cutOffEnd[i][j], sizeof(double), 1, fp); + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::read_restart(FILE *fp) +{ + read_restart_settings(fp); + + allocate(); + size_t result; + + int i, j; + int me = comm->me; + for (i = 1; i <= atom->ntypes; i++) + for (j = i; j <= atom->ntypes; j++) { + if (me == 0) { result = fread(&setflag[i][j], sizeof(int), 1, fp); } + MPI_Bcast(&setflag[i][j], 1, MPI_INT, 0, world); + if (setflag[i][j]) { + if (me == 0) { + utils::sfread(FLERR, &r0[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &p[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &q[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &A[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &QSI[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cutOffStart[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cutOffEnd[i][j], sizeof(double), 1, fp, nullptr, error); + } + MPI_Bcast(&r0[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&p[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&q[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&A[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&QSI[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cutOffStart[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cutOffEnd[i][j], 1, MPI_DOUBLE, 0, world); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ntypes; i++) { + fprintf(fp, "%d %g %g %g %g %g %g %g\n", i, r0[i][i], p[i][i], q[i][i], A[i][i], QSI[i][i], + cutOffStart[i][i], cutOffEnd[i][i]); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATB::write_data_all(FILE *fp) +{ + for (int i = 1; i <= atom->ntypes; i++) { + for (int j = i; j <= atom->ntypes; j++) { + fprintf(fp, "%d %d %g %g %g %g %g %g %g\n", i, j, r0[i][j], p[i][j], q[i][j], A[i][j], + QSI[i][j], cutOffStart[i][j], cutOffEnd[i][j]); + } + } +} diff --git a/src/SMTBQ/pair_smatb.h b/src/SMTBQ/pair_smatb.h new file mode 100644 index 0000000000..198ea10559 --- /dev/null +++ b/src/SMTBQ/pair_smatb.h @@ -0,0 +1,80 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/ Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- +This pair style is written by Daniele Rapetti (iximiel@gmail.com) +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(smatb,PairSMATB); +// clang-format on +#else + +#ifndef LMP_PAIR_SMATB_H +#define LMP_PAIR_SMATB_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairSMATB : public Pair { + public: + PairSMATB(class LAMMPS *); + ~PairSMATB() override; + void compute(int, int) override; + void settings(int, char **) override; + void coeff(int, char **) override; + void init_style() override; + double init_one(int, int) override; + void write_restart(FILE *) override; + void read_restart(FILE *) override; + void write_restart_settings(FILE *) override; + void read_restart_settings(FILE *) override; + void write_data(FILE *) override; + void write_data_all(FILE *) override; + int pack_forward_comm(int, int *, double *, int, int *) override; + void unpack_forward_comm(int, int, double *) override; + int pack_reverse_comm(int, int, double *) override; + void unpack_reverse_comm(int, int *, double *) override; + + protected: + virtual void allocate(); + // allocated size of per-atom arrays + int nmax; + //allocated to store up calculation values + double *on_eb; + // interaction radius, user-given + double **r0; + // parameters user-given + double **p; + double **A; + double **q; + double **QSI; + //extremes of the cut off, user given + double **cutOffStart; + double **cutOffEnd; + //squared cut off end, calculated + double **cutOffEnd2; + //polynomial for cutoff linking to zero: Ae^p substitution + double **a3; + double **a4; + double **a5; + //polynomial for cutoff linking to zero: QSIe^q substitution + double **x3; + double **x4; + double **x5; +}; +} // namespace LAMMPS_NS +#endif +#endif diff --git a/src/SMTBQ/pair_smatb_single.cpp b/src/SMTBQ/pair_smatb_single.cpp new file mode 100644 index 0000000000..759ad4216b --- /dev/null +++ b/src/SMTBQ/pair_smatb_single.cpp @@ -0,0 +1,503 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Daniele Rapetti (iximiel@gmail.com) +------------------------------------------------------------------------- */ + +#include "pair_smatb_single.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" + +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +PairSMATBSingle::PairSMATBSingle(LAMMPS *_lmp) : + Pair(_lmp), nmax(0), on_eb(nullptr), r0(0), p(0), A(0), q(0), QSI(0), cutOffStart(0), + cutOffEnd(0), cutOffEnd2(0), a3(0), a4(0), a5(0), x3(0), x4(0), x5(0) +{ + single_enable = 0; // 1 if single() routine exists + restartinfo = 1; // 1 if pair style writes restart info + respa_enable = 0; // 1 if inner/middle/outer rRESPA routines + one_coeff = 0; // 1 if allows only one coeff * * call + manybody_flag = 1; // 1 if a manybody potential + no_virial_fdotr_compute = 0; // 1 if does not invoke virial_fdotr_compute() + writedata = 1; // 1 if writes coeffs to data file + ghostneigh = 0; // 1 if pair style needs neighbors of ghosts + + // set comm size needed by this Pair + comm_forward = 1; + comm_reverse = 1; +} + +/* ---------------------------------------------------------------------- */ + +PairSMATBSingle::~PairSMATBSingle() +{ + if (copymode) { return; } + memory->destroy(on_eb); + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::compute(int eflag, int vflag) +{ + int i, j, ii, jj, jnum; + double xtmp, ytmp, ztmp, del[3], fpair; + double dijsq, dij; + double espo, aexpp, qsiexpq, eb_i, Fb, Fr; + double polyval, polyval2, polyval3, polyval4, polyval5; + + if (eflag || vflag) { + ev_setup(eflag, vflag); + eng_vdwl = 0; + } else { + evflag = vflag_fdotr = eflag_global = eflag_atom = 0; + } + + // grow on_eb array if necessary + + if (atom->nmax > nmax) { + nmax = atom->nmax; + memory->grow(on_eb, nmax, "pair_smatb:on_eb"); + } + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + int nall = nlocal + atom->nghost; + + int newton_pair = force->newton_pair; + + // zero out on_eb + memset(on_eb, 0, nall * sizeof(double)); + + int inum = list->inum; + int *ilist = list->ilist; + int *jlist; + int *numneigh = list->numneigh; + int **firstneigh = list->firstneigh; + + // FIRST LOOP: CALCULATES the squared bonding energy and accumulate it in on_eb for each atom + for (ii = 0; ii < inum; ++ii) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (jj = 0; jj < jnum; ++jj) { + j = jlist[jj]; + j &= NEIGHMASK; + del[0] = xtmp - x[j][0]; + del[1] = ytmp - x[j][1]; + del[2] = ztmp - x[j][2]; + dijsq = del[0] * del[0] + del[1] * del[1] + del[2] * del[2]; + + if (dijsq < cutOffEnd2) { + dij = sqrt(dijsq); + if (dij < cutOffStart) { + qsiexpq = (QSI * QSI) * exp(2.0 * q * (1.0 - dij / r0)); + } else { + polyval = dij - cutOffEnd; + polyval3 = polyval * polyval * polyval; + polyval4 = polyval3 * polyval; + polyval5 = polyval4 * polyval; + qsiexpq = x5 * polyval5 + x4 * polyval4 + x3 * polyval3; + qsiexpq = qsiexpq * qsiexpq; + } + on_eb[i] += qsiexpq; + if (newton_pair) on_eb[j] += qsiexpq; + } + } + } + + // communicate the squared bonding energy between the various bins + + if (newton_pair) comm->reverse_comm(this); + + // Support Loop: take the square root of the bonding energy and + // accumulate it in the energy accumulator if needed the store the + // reciprocal in on_eb in order to not do it in the SECOND LOOP + + for (ii = 0; ii < inum; ++ii) { + i = ilist[ii]; + if (i < nlocal) { + eb_i = sqrt(on_eb[i]); + if (eb_i != 0.0) { + on_eb[i] = 1.0 / eb_i; + } else { + on_eb[i] = 0.0; + } + // if needed the bonding energy is accumulated: + if (eflag_either) { + if (eflag_atom) { eatom[i] -= eb_i; } + if (eflag_global) { eng_vdwl -= eb_i; } + } + } + } + // this communication stores the denominators in the ghosts atoms, + // this is needed because of how forces are calculated + comm->forward_comm(this); + + // SECOND LOOP: given on_eb[i] calculates forces and energies + for (ii = 0; ii < inum; ++ii) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + + del[0] = xtmp - x[j][0]; + del[1] = ytmp - x[j][1]; + del[2] = ztmp - x[j][2]; + + dijsq = del[0] * del[0] + del[1] * del[1] + del[2] * del[2]; + if (dijsq < cutOffEnd2) { + dij = sqrt(dijsq); + if (dij < cutOffStart) { + espo = 1.0 - dij / r0; + aexpp = exp(p * espo) * A; + Fr = (2.0 * aexpp) * (p / r0); + qsiexpq = (QSI * QSI) * exp(2.0 * q * espo); + Fb = -qsiexpq * q / r0; + } else { + polyval = dij - cutOffEnd; + polyval2 = polyval * polyval; + polyval3 = polyval2 * polyval; + polyval4 = polyval3 * polyval; + polyval5 = polyval4 * polyval; + aexpp = a5 * polyval5 + a4 * polyval4 + a3 * polyval3; + Fr = -2.0 * (5.0 * a5 * polyval4 + 4.0 * a4 * polyval3 + 3.0 * a3 * polyval2); + qsiexpq = x5 * polyval5 + x4 * polyval4 + x3 * polyval3; + Fb = ((5.0 * x5 * polyval4 + 4.0 * x4 * polyval3 + 3.0 * x3 * polyval2)) * qsiexpq; + } + + // calculates the module of the pair energy between i and j + fpair = (Fb * (on_eb[i] + on_eb[j]) + Fr) / dij; + + f[i][0] += del[0] * fpair; + f[i][1] += del[1] * fpair; + f[i][2] += del[2] * fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= del[0] * fpair; + f[j][1] -= del[1] * fpair; + f[j][2] -= del[2] * fpair; + } + if (evflag) { + ev_tally(i, j, nlocal, newton_pair, 2.0 * aexpp, 0.0, fpair, del[0], del[1], del[2]); + } + } + } + } + if (vflag_fdotr) virial_fdotr_compute(); +} + +/* ---------------------------------------------------------------------- + global settings + ------------------------------------------------------------------------- */ + +void PairSMATBSingle::settings(int narg, char **) +{ + if (narg > 0) error->all(FLERR, "Illegal pair_style command: smatb/single accepts no options"); +} + +/* ---------------------------------------------------------------------- + allocate all arrays + ------------------------------------------------------------------------- */ + +void PairSMATBSingle::allocate() +{ + int n = atom->ntypes; + int natoms = atom->natoms; + + memory->create(setflag, n + 1, n + 1, "pair_smatb:setflag"); + for (int i = 1; i <= n; i++) { + for (int j = i; j <= n; j++) { setflag[i][j] = 0; } + } + + memory->create(cutsq, n + 1, n + 1, "pair_smatb:cutsq"); + + allocated = 1; +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs + ------------------------------------------------------------------------- */ + +void PairSMATBSingle::coeff(int narg, char **arg) +{ + if (!allocated) { allocate(); } + if (narg != 9) utils::missing_cmd_args(FLERR, "pair_style smatb/single", error); + + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR, arg[0], 1, atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR, arg[1], 1, atom->ntypes, jlo, jhi, error); + + r0 = utils::numeric(FLERR, arg[2], false, lmp); + p = utils::numeric(FLERR, arg[3], false, lmp); + q = utils::numeric(FLERR, arg[4], false, lmp); + A = utils::numeric(FLERR, arg[5], false, lmp); + QSI = utils::numeric(FLERR, arg[6], false, lmp); + cutOffStart = utils::numeric(FLERR, arg[7], false, lmp); + cutOffEnd = utils::numeric(FLERR, arg[8], false, lmp); + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { + setflag[i][j] = 1; + + count++; + } + } + + if (count == 0) error->all(FLERR, "Incorrect args for pair coefficients"); +} + +/* ------------------------------------------------------------------------ */ + +void PairSMATBSingle::init_style() +{ + if (force->newton_pair == 0) error->all(FLERR, "Pair style smatb/single requires newton pair on"); + + neighbor->add_request(this); +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i + ------------------------------------------------------------------------- */ + +double PairSMATBSingle::init_one(int i, int j) +{ + if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + //calculating the polynomial linking to zero + double es = cutOffEnd - cutOffStart; + double es2 = es * es; + double es3 = es2 * es; + + //variables for poly for p and A + double expp = A * exp(p * (1. - cutOffStart / r0)); + double ap = -1. / es3; + double bp = p / (r0 * es2); + double cp = -(p * p) / (es * r0 * r0); + + a5 = expp * (12. * ap + 6. * bp + cp) / (2. * es2); + a4 = expp * (15. * ap + 7. * bp + cp) / es; + a3 = expp * (20. * ap + 8. * bp + cp) / 2.; + + //variables for poly for q and qsi + double expq = QSI * exp(q * (1. - cutOffStart / r0)); + double aq = -1 / es3; + double bq = q / (es2 * r0); + double cq = -(q * q) / (es * r0 * r0); + + x5 = expq * (12. * aq + 6. * bq + cq) / (2. * es2); + x4 = expq * (15. * aq + 7. * bq + cq) / es; + x3 = expq * (20. * aq + 8. * bq + cq) / 2.; + + cutOffEnd2 = cutOffEnd * cutOffEnd; + if (i != j) { + setflag[j][i] = 1; + cutOffEnd2 = cutOffEnd2; + + r0 = r0; + p = p; + q = q; + A = A; + QSI = QSI; + cutOffStart = cutOffStart; + cutOffEnd = cutOffEnd; + + a3 = a3; + a4 = a4; + a5 = a5; + x3 = x3; + x4 = x4; + x5 = x5; + } + + return cutOffEnd; +} + +/* ---------------------------------------------------------------------- */ + +int PairSMATBSingle::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) +{ + int i, j, m; + + m = 0; + for (i = 0; i < n; ++i) { + j = list[i]; + buf[m++] = on_eb[j]; + } + return m; +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::unpack_forward_comm(int n, int first, double *buf) +{ + int i, m, last; + + m = 0; + last = first + n; + for (i = first; i < last; ++i) { on_eb[i] = buf[m++]; } +} + +/* ---------------------------------------------------------------------- */ + +int PairSMATBSingle::pack_reverse_comm(int n, int first, double *buf) +{ + int i, m, last; + + m = 0; + last = first + n; + for (i = first; i < last; ++i) { buf[m++] = on_eb[i]; } + return m; +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::unpack_reverse_comm(int n, int *list, double *buf) +{ + int i, j, m; + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + on_eb[j] += buf[m++]; + } +} + +/* ---------------------------------------------------------------------- */ + +//write binary data of this simulation: +void PairSMATBSingle::write_restart_settings(FILE *fp) +{ + fwrite(&offset_flag, sizeof(int), 1, fp); + fwrite(&mix_flag, sizeof(int), 1, fp); + fwrite(&tail_flag, sizeof(int), 1, fp); +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::read_restart_settings(FILE *fp) +{ + int me = comm->me; + size_t result; + if (me == 0) { + result = fread(&offset_flag, sizeof(int), 1, fp); + result = fread(&mix_flag, sizeof(int), 1, fp); + result = fread(&tail_flag, sizeof(int), 1, fp); + } + MPI_Bcast(&offset_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&mix_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&tail_flag, 1, MPI_INT, 0, world); +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::write_restart(FILE *fp) +{ + write_restart_settings(fp); + + int i, j; + for (i = 1; i <= atom->ntypes; i++) { + for (j = i; j <= atom->ntypes; j++) { + fwrite(&setflag[i][j], sizeof(int), 1, fp); + if (setflag[i][j]) { + fwrite(&r0, sizeof(double), 1, fp); + fwrite(&p, sizeof(double), 1, fp); + fwrite(&q, sizeof(double), 1, fp); + fwrite(&A, sizeof(double), 1, fp); + fwrite(&QSI, sizeof(double), 1, fp); + fwrite(&cutOffStart, sizeof(double), 1, fp); + fwrite(&cutOffEnd, sizeof(double), 1, fp); + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::read_restart(FILE *fp) +{ + read_restart_settings(fp); + + allocate(); + size_t result; + + int i, j; + int me = comm->me; + for (i = 1; i <= atom->ntypes; i++) + for (j = i; j <= atom->ntypes; j++) { + if (me == 0) { result = fread(&setflag[i][j], sizeof(int), 1, fp); } + MPI_Bcast(&setflag[i][j], 1, MPI_INT, 0, world); + if (setflag[i][j]) { + if (me == 0) { + utils::sfread(FLERR, &r0, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &p, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &q, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &A, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &QSI, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cutOffStart, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cutOffEnd, sizeof(double), 1, fp, nullptr, error); + } + MPI_Bcast(&r0, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&p, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&q, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&A, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&QSI, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cutOffStart, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cutOffEnd, 1, MPI_DOUBLE, 0, world); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ntypes; i++) { + fprintf(fp, "%d %g %g %g %g %g %g %g\n", i, r0, p, q, A, QSI, cutOffStart, cutOffEnd); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairSMATBSingle::write_data_all(FILE *fp) +{ + for (int i = 1; i <= atom->ntypes; i++) { + for (int j = i; j <= atom->ntypes; j++) { + fprintf(fp, "%d %d %g %g %g %g %g %g %g\n", i, j, r0, p, q, A, QSI, cutOffStart, cutOffEnd); + } + } +} diff --git a/src/SMTBQ/pair_smatb_single.h b/src/SMTBQ/pair_smatb_single.h new file mode 100644 index 0000000000..619192b31f --- /dev/null +++ b/src/SMTBQ/pair_smatb_single.h @@ -0,0 +1,80 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/ Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- +This pair style is written by Daniele Rapetti (iximiel@gmail.com) +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(smatb/single,PairSMATBSingle); +// clang-format on +#else + +#ifndef LMP_PAIR_SMATB_SINGLE_H +#define LMP_PAIR_SMATB_SINGLE_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairSMATBSingle : public Pair { + public: + PairSMATBSingle(class LAMMPS *); + ~PairSMATBSingle() override; + void compute(int, int) override; + void settings(int, char **) override; + void coeff(int, char **) override; + void init_style() override; + double init_one(int, int) override; + void write_restart(FILE *) override; + void read_restart(FILE *) override; + void write_restart_settings(FILE *) override; + void read_restart_settings(FILE *) override; + void write_data(FILE *) override; + void write_data_all(FILE *) override; + int pack_forward_comm(int, int *, double *, int, int *) override; + void unpack_forward_comm(int, int, double *) override; + int pack_reverse_comm(int, int, double *) override; + void unpack_reverse_comm(int, int *, double *) override; + + protected: + virtual void allocate(); + // allocated size of per-atom arrays + int nmax; + //allocated to store up calculation values + double *on_eb{nullptr}; + // interaction radius, user-given + double r0; + // parameters user-given + double p; + double A; + double q; + double QSI; + //cut offs, user given + double cutOffStart; + double cutOffEnd; + //squared cut off end, calculated + double cutOffEnd2; + //polynomial for cutoff linking to zero: Ae^p substitution + double a3; + double a4; + double a5; + //polynomial for cutoff linking to zero: QSIe^q substitution + double x3; + double x4; + double x5; +}; +} // namespace LAMMPS_NS +#endif +#endif diff --git a/src/angle.cpp b/src/angle.cpp index 6fdb9307cb..0756ce1fbd 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -31,6 +31,7 @@ Angle::Angle(LAMMPS *_lmp) : Pointers(_lmp) energy = 0.0; virial[0] = virial[1] = virial[2] = virial[3] = virial[4] = virial[5] = 0.0; writedata = 1; + reinitflag = 1; allocated = 0; suffix_flag = Suffix::NONE; diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index edaa5c9866..c54e569c3a 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -428,7 +428,7 @@ void FixAdapt::init() if (ad->angle == nullptr ) error->all(FLERR,"Fix adapt angle style does not exist"); - void *ptr = ad->angle->extract(ad->aparam,ad->bdim); + void *ptr = ad->angle->extract(ad->aparam,ad->adim); if (ptr == nullptr) error->all(FLERR,"Fix adapt angle style param not supported"); diff --git a/src/input.cpp b/src/input.cpp index 6c4fc56776..a28bd48296 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1195,11 +1195,9 @@ void Input::shell() if (me == 0) { for (int i = 1; i < narg; i++) { rv = (platform::mkdir(arg[i]) < 0) ? errno : 0; - MPI_Reduce(&rv,&err,1,MPI_INT,MPI_MAX,0,world); - errno = err; - if (err != 0) - error->warning(FLERR, "Shell command 'mkdir {}' failed with error '{}'", - arg[i],utils::getsyserror()); + if (rv != 0) + error->warning(FLERR, "Shell command 'mkdir {}' failed with error '{}'", arg[i], + utils::getsyserror()); } } } else if (strcmp(arg[0],"mv") == 0) { diff --git a/src/math_special.cpp b/src/math_special.cpp index da99c5850a..fd47aec9e9 100644 --- a/src/math_special.cpp +++ b/src/math_special.cpp @@ -706,6 +706,7 @@ static const double fm_exp2_p[] = { double MathSpecial::exp2_x86(double x) { +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) double ipart, fpart, px, qx; udi_t epart; @@ -726,6 +727,9 @@ double MathSpecial::exp2_x86(double x) x = 1.0 + 2.0*(px/(qx-px)); return epart.f*x; +#else + return pow(2.0, x); +#endif } double MathSpecial::fm_exp(double x) diff --git a/src/math_special.h b/src/math_special.h index fa39d46321..51462922ac 100644 --- a/src/math_special.h +++ b/src/math_special.h @@ -20,21 +20,61 @@ namespace LAMMPS_NS { namespace MathSpecial { - // tabulated factorial function + /*! Fast tabulated factorial function + * + * This function looks up pre-computed factorial values for arguments of n = 0 + * to a maximum of 167, which is the maximal value representable by a double + * precision floating point number. For other values of n a NaN value is returned. + * + * \param n argument (valid: 0 <= n <= 167) + * \return value of n! as double precision number or NaN */ - extern double factorial(const int); + extern double factorial(const int n); + + /*! Fast implementation of 2^x without argument checks for little endian CPUs + * + * This function implements an optimized version of pow(2.0, x) that does not + * check for valid arguments and thus may only be used where arguments are well + * behaved. The implementation makes assumptions about the layout of double + * precision floating point numbers in memory and thus will only work on little + * endian CPUs. If little endian cannot be safely detected, the result of + * calling pow(2.0, x) will be returned. This function also is the basis for + * the fast exponential fm_exp(x). + * + * \param x argument + * \return value of 2^x as double precision number */ + + extern double exp2_x86(double x); + + /*! Fast implementation of exp(x) for little endian CPUs + * + * This function implements an optimized version of exp(x) for little endian CPUs. + * It calls the exp2_x86(x) function with a suitable prefactor to x to return exp(x). + * The implementation makes assumptions about the layout of double + * precision floating point numbers in memory and thus will only work on little + * endian CPUs. If little endian cannot be safely detected, the result of + * calling the exp(x) implementation in the standard math library will be returned. + * + * \param x argument + * \return value of e^x as double precision number */ + + extern double fm_exp(double x); // support function for scaled error function complement extern double erfcx_y100(const double y100); - // fast 2**x function without argument checks for little endian CPUs - extern double exp2_x86(double x); - - // fast e**x function for little endian CPUs, falls back to libc on other platforms - extern double fm_exp(double x); - - // scaled error function complement exp(x*x)*erfc(x) for coul/long styles + /*! Fast scaled error function complement exp(x*x)*erfc(x) for coul/long styles + * + * This is a portable fast implementation of exp(x*x)*erfc(x) that can be used + * in coul/long pair styles as a replacement for the polynomial expansion that + * is/was widely used. Unlike the polynomial expansion, that is only accurate + * at the level of single precision floating point it provides full double precision + * accuracy, but at comparable speed (unlike the erfc() implementation shipped + * with GNU standard math library). + * + * \param x argument + * \return value of e^(x*x)*erfc(x) */ static inline double my_erfcx(const double x) { @@ -44,7 +84,15 @@ namespace MathSpecial { return 2.0 * exp(x * x) - erfcx_y100(400.0 / (4.0 - x)); } - // exp(-x*x) for coul/long styles + /*! Fast implementation of exp(-x*x) for little endian CPUs for coul/long styles + * + * This function implements an optimized version of exp(-x*x) based on exp2_x86() + * for use with little endian CPUs. If little endian cannot be safely detected, + * the result of calling the exp(-x*x) implementation in the standard math + * library will be returned. + * + * \param x argument + * \return value of e^(-x*x) as double precision number */ static inline double expmsq(double x) { @@ -57,18 +105,34 @@ namespace MathSpecial { #endif } - // x**2, use instead of pow(x,2.0) + /*! Fast inline version of pow(x, 2.0) + * + * \param x argument + * \return x*x */ static inline double square(const double &x) { return x * x; } - // x**3, use instead of pow(x,3.0) + /*! Fast inline version of pow(x, 3.0) + * + * \param x argument + * \return x*x */ + static inline double cube(const double &x) { return x * x * x; } - // return -1.0 for odd n, 1.0 for even n, like pow(-1.0,n) + /* Fast inline version of pow(-1.0, n) + * + * \param n argument (integer) + * \return -1 if n is odd, 1.0 if n is even */ + static inline double powsign(const int n) { return (n & 1) ? -1.0 : 1.0; } - // optimized version of pow(x,n) with n being integer - // up to 10x faster than pow(x,y) + /* Fast inline version of pow(x,n) for integer n + * + * This is a version of pow(x,n) optimized for n being integer. + * Speedups of up to 10x faster than pow(x,y) have been measured. + * + * \param n argument (integer) + * \return value of x^n */ static inline double powint(const double &x, const int n) { @@ -84,7 +148,12 @@ namespace MathSpecial { return (n > 0) ? yy : 1.0 / yy; } - // optimized version of (sin(x)/x)**n with n being a _positive_ integer + /* Fast inline version of (sin(x)/x)^n as used by PPPM kspace styles + * + * This is an optimized function to compute (sin(x)/x)^n as frequently used by PPPM. + * + * \param n argument (integer). Expected to be positive. + * \return value of (sin(x)/x)^n */ static inline double powsinxx(const double &x, int n) { diff --git a/src/utils.cpp b/src/utils.cpp index 3bc8c761c6..690bb10b2b 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -19,11 +19,13 @@ #include "error.h" #include "fix.h" #include "fmt/chrono.h" +#include "input.h" #include "memory.h" #include "modify.h" #include "text_file_reader.h" #include "universe.h" #include "update.h" +#include "variable.h" #include #include @@ -631,7 +633,7 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod // match compute, fix, or custom property array reference with a '*' wildcard // number range in the first pair of square brackets - if (strmatch(word, "^[cf]_\\w+\\[\\d*\\*\\d*\\]") || + if (strmatch(word, "^[cfv]_\\w+\\[\\d*\\*\\d*\\]") || strmatch(word, "^[id]2_\\w+\\[\\d*\\*\\d*\\]")) { // split off the compute/fix/property ID, the wildcard and trailing text @@ -669,7 +671,7 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod } } - // fix + // fix } else if (word[0] == 'f') { auto fix = lmp->modify->get_fix_by_id(id); @@ -692,8 +694,25 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod } } - // only match custom array reference with a '*' wildcard - // number range in the first pair of square brackets + // vector variable + + } else if (word[0] == 'v') { + int index = lmp->input->variable->find(id.c_str()); + + // check for global vector/array, peratom array, local array + + if (index >= 0) { + if (mode == 0 && lmp->input->variable->vectorstyle(index)) { + utils::bounds(file, line, wc, 1, MAXSMALLINT, nlo, nhi, lmp->error); + if (nhi < MAXSMALLINT) { + nmax = nhi; + expandflag = 1; + } + } + } + + // only match custom array reference with a '*' wildcard + // number range in the first pair of square brackets } else if ((word[0] == 'i') || (word[0] == 'd')) { int flag, cols; @@ -716,6 +735,7 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod if (expandflag) { // expand wild card string to nlo/nhi numbers + utils::bounds(file, line, wc, 1, nmax, nlo, nhi, lmp->error); if (newarg + nhi - nlo + 1 > maxarg) { diff --git a/src/utils.h b/src/utils.h index f7f269a97d..6726240d0d 100644 --- a/src/utils.h +++ b/src/utils.h @@ -56,8 +56,7 @@ namespace utils { * \param cmd name of the failing command * \param error pointer to Error class instance (for abort) or nullptr */ - [[noreturn]] void missing_cmd_args(const std::string &file, int line, const std::string &cmd, - Error *error); + void missing_cmd_args(const std::string &file, int line, const std::string &cmd, Error *error); /* Internal function handling the argument list for logmesg(). */ diff --git a/tools/singularity/fedora36_mingw.def b/tools/singularity/fedora36_mingw.def new file mode 100644 index 0000000000..79213e9e92 --- /dev/null +++ b/tools/singularity/fedora36_mingw.def @@ -0,0 +1,125 @@ +BootStrap: docker +From: fedora:36 + +%post + dnf -y update + dnf -y install vim-enhanced git file make cmake patch which file Lmod \ + ninja-build clang clang-tools-extra libomp-devel libubsan libasan libtsan \ + diffutils dos2unix findutils rsync python-devel libjpeg-devel libpng-devel \ + ccache gcc-c++ gcc-gfortran gdb valgrind eigen3-devel openblas-devel \ + openmpi-devel mpich-devel fftw-devel voro++-devel gsl-devel hdf5-devel \ + netcdf-devel netcdf-cxx-devel netcdf-mpich-devel netcdf-openmpi-devel \ + readline-devel python3-pyyaml python3-Cython \ + mingw-filesystem-base mingw32-nsis mingw-binutils-generic \ + mingw32-filesystem mingw32-pkg-config \ + mingw64-filesystem mingw64-pkg-config \ + mingw32-crt mingw32-headers mingw32-binutils \ + mingw64-crt mingw64-headers mingw64-binutils \ + mingw32-cpp mingw32-gcc mingw32-gcc-gfortran mingw32-gcc-c++ \ + mingw64-cpp mingw64-gcc mingw64-gcc-gfortran mingw64-gcc-c++ \ + mingw32-libgomp mingw64-libgomp \ + mingw32-winpthreads mingw64-winpthreads \ + mingw32-eigen3 mingw64-eigen3 \ + mingw32-fftw mingw64-fftw \ + mingw32-libjpeg-turbo mingw64-libjpeg-turbo \ + mingw32-libpng mingw64-libpng \ + mingw32-python3 mingw64-python3 \ + mingw32-python3-numpy mingw64-python3-numpy \ + mingw32-python3-pyyaml mingw64-python3-pyyaml \ + mingw32-python3-setuptools mingw64-python3-setuptools \ + mingw32-readline mingw64-readline \ + mingw32-termcap mingw64-termcap \ + mingw32-zlib mingw64-zlib \ + mingw32-zstd mingw64-zstd \ + enchant python3-virtualenv doxygen latexmk \ + texlive-latex-fonts texlive-pslatex texlive-collection-latexrecommended \ + texlive-latex texlive-latexconfig doxygen-latex texlive-collection-latex \ + texlive-latex-bin texlive-lualatex-math texlive-fncychap texlive-tabulary \ + texlive-framed texlive-wrapfig texlive-upquote texlive-capt-of \ + texlive-needspace texlive-titlesec texlive-anysize texlive-dvipng texlive-xindy \ + blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel \ + zstd libzstd-devel yaml-cpp-devel + dnf clean all + + # enable Lmod and load MPI + source /usr/share/lmod/lmod/init/profile + module purge + module load mpi + + # manually install Plumed + mkdir plumed + cd plumed + version=2.7.4 + curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz + tar -xzf plumed.tar.gz + cd plumed-${version} + ./configure --disable-doc --prefix=/usr + make + make install + # fix up installation for CentOS and Fedora + mv -v /usr/lib64/pkgconfig/plumed* /usr/share/pkgconfig/ + cd ../../ + rm -rvf plumed + + # create missing termcap pkgconfig files + cat > /usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/termcap.pc < /usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/termcap.pc <$CUSTOM_PROMPT_ENV <$CUSTOM_PROMPT_ENV < + +// whether to print verbose output (i.e. not capturing LAMMPS screen output). +bool verbose = false; + +namespace LAMMPS_NS { + +class Advanced_utils : public LAMMPSTest { +protected: + Error *error; + + void SetUp() override + { + testbinary = "AdvancedUtils"; + LAMMPSTest::SetUp(); + error = lmp->error; + } + + void atomic_system() + { + BEGIN_HIDE_OUTPUT(); + command("units real"); + command("lattice sc 1.0 origin 0.125 0.125 0.125"); + command("region box block -2 2 -2 2 -2 2"); + command("create_box 8 box"); + command("create_atoms 1 box"); + command("pair_style zero 3.5"); + command("pair_coeff * *"); + command("mass * 1.0"); + command("region left block -2.0 -1.0 INF INF INF INF"); + command("region right block 0.5 2.0 INF INF INF INF"); + command("region top block INF INF -2.0 -1.0 INF INF"); + command("set region left type 2"); + command("set region right type 3"); + END_HIDE_OUTPUT(); + } +}; + +TEST_F(Advanced_utils, missing_cmd_args) +{ + auto output = CAPTURE_OUTPUT([&] { + utils::missing_cmd_args(FLERR, "dummy", nullptr); + }); + EXPECT_EQ(output, ""); + + TEST_FAILURE("ERROR: Illegal dummy command: missing argument", + utils::missing_cmd_args(FLERR, "dummy", error);); +}; + +TEST_F(Advanced_utils, logmesg) +{ + auto output = CAPTURE_OUTPUT([&] { + utils::logmesg(lmp, "test message"); + }); + EXPECT_EQ(output, "test message"); + + output = CAPTURE_OUTPUT([&] { + utils::logmesg(lmp, "test message from test {}", testbinary); + }); + EXPECT_EQ(output, "test message from test " + testbinary); +}; + +// death tests only. the other cases are tested in the basic utils unit tester +TEST_F(Advanced_utils, bounds_int_fail) +{ + int nlo, nhi; + TEST_FAILURE("ERROR: Invalid range string: 1x ", + utils::bounds(FLERR, "1x", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: -1 ", + utils::bounds(FLERR, "-1", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: \\+1 ", + utils::bounds(FLERR, "+1", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: 1:3 ", + utils::bounds(FLERR, "1:3", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: \\? ", + utils::bounds(FLERR, "?", -10, 5, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: 3\\*:2 ", + utils::bounds(FLERR, "3*:2", -10, 5, nlo, nhi, error);); +} + +TEST_F(Advanced_utils, bounds_bigint_fail) +{ + bigint nlo, nhi; + TEST_FAILURE("ERROR: Invalid range string: 1x ", + utils::bounds(FLERR, "1x", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: -1 ", + utils::bounds(FLERR, "-1", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: \\+1 ", + utils::bounds(FLERR, "+1", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: 1:3 ", + utils::bounds(FLERR, "1:3", 1, 10, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: \\? ", + utils::bounds(FLERR, "?", -10, 5, nlo, nhi, error);); + TEST_FAILURE("ERROR: Invalid range string: 3\\*:2 ", + utils::bounds(FLERR, "3*:2", -10, 5, nlo, nhi, error);); +} + +TEST_F(Advanced_utils, expand_args) +{ + atomic_system(); + BEGIN_CAPTURE_OUTPUT(); + command("compute temp all temp"); + command("variable temp vector c_temp"); + command("variable step equal step"); + command("variable pe equal pe"); + command("variable pe equal pe"); + command("variable epair equal epair"); + command("compute gofr all rdf 20 1 1 1 2"); + command("fix 1 all ave/time 1 1 1 v_step v_pe v_epair"); + command("fix 2 all nve"); + command("run 1 post no"); + auto output = END_CAPTURE_OUTPUT(); + + char **args, **earg; + constexpr int oarg = 9; + args = new char *[oarg]; + args[0] = utils::strdup("v_step"); + args[1] = utils::strdup("c_temp"); + args[2] = utils::strdup("f_1[*]"); + args[3] = utils::strdup("c_temp[2*4]"); + args[4] = utils::strdup("v_temp[*4]"); + args[5] = utils::strdup("c_gofr[3*]"); + args[6] = utils::strdup("c_gofr[1][*]"); + args[7] = utils::strdup("c_gofr[*2][2]"); + args[8] = utils::strdup("c_gofr[*][*]"); + + auto narg = utils::expand_args(FLERR, oarg, args, 0, earg, lmp); + EXPECT_EQ(narg, 16); + EXPECT_STREQ(earg[0], "v_step"); + EXPECT_STREQ(earg[1], "c_temp"); + EXPECT_STREQ(earg[2], "f_1[1]"); + EXPECT_STREQ(earg[3], "f_1[2]"); + EXPECT_STREQ(earg[4], "f_1[3]"); + EXPECT_STREQ(earg[5], "c_temp[2]"); + EXPECT_STREQ(earg[6], "c_temp[3]"); + EXPECT_STREQ(earg[7], "c_temp[4]"); + EXPECT_STREQ(earg[8], "v_temp[1]"); + EXPECT_STREQ(earg[9], "v_temp[2]"); + EXPECT_STREQ(earg[10], "v_temp[3]"); + EXPECT_STREQ(earg[11], "v_temp[4]"); + EXPECT_STREQ(earg[12], "c_gofr[3*]"); + EXPECT_STREQ(earg[13], "c_gofr[1][*]"); + EXPECT_STREQ(earg[14], "c_gofr[*2][2]"); + EXPECT_STREQ(earg[15], "c_gofr[*][*]"); + + for (int i = 0; i < narg; ++i) + delete[] earg[i]; + lmp->memory->sfree(earg); + + narg = utils::expand_args(FLERR, oarg, args, 1, earg, lmp); + EXPECT_EQ(narg, 16); + EXPECT_NE(args, earg); + EXPECT_STREQ(earg[0], "v_step"); + EXPECT_STREQ(earg[1], "c_temp"); + EXPECT_STREQ(earg[2], "f_1[*]"); + EXPECT_STREQ(earg[3], "c_temp[2*4]"); + EXPECT_STREQ(earg[4], "v_temp[*4]"); + EXPECT_STREQ(earg[5], "c_gofr[3]"); + EXPECT_STREQ(earg[6], "c_gofr[4]"); + EXPECT_STREQ(earg[7], "c_gofr[5]"); + EXPECT_STREQ(earg[8], "c_gofr[1][*]"); + EXPECT_STREQ(earg[9], "c_gofr[1][2]"); + EXPECT_STREQ(earg[10], "c_gofr[2][2]"); + EXPECT_STREQ(earg[11], "c_gofr[1][*]"); + EXPECT_STREQ(earg[12], "c_gofr[2][*]"); + EXPECT_STREQ(earg[13], "c_gofr[3][*]"); + EXPECT_STREQ(earg[14], "c_gofr[4][*]"); + EXPECT_STREQ(earg[15], "c_gofr[5][*]"); + + for (int i = 0; i < narg; ++i) + delete[] earg[i]; + lmp->memory->sfree(earg); + + args[3][9] = '9'; + TEST_FAILURE("ERROR: Numeric index 9 is out of bounds \\(1-6\\).*", + utils::expand_args(FLERR, oarg, args, 0, earg, lmp);); + + args[3][9] = '4'; + args[5][7] = '9'; + TEST_FAILURE("ERROR: Numeric index 9 is out of bounds \\(1-5\\).*", + utils::expand_args(FLERR, oarg, args, 1, earg, lmp);); + + args[5][7] = '3'; + delete[] args[4]; + args[4] = utils::strdup("v_temp[2*]"); + narg = utils::expand_args(FLERR, oarg, args, 0, earg, lmp); + EXPECT_EQ(narg, 13); + EXPECT_STREQ(earg[0], "v_step"); + EXPECT_STREQ(earg[1], "c_temp"); + EXPECT_STREQ(earg[2], "f_1[1]"); + EXPECT_STREQ(earg[3], "f_1[2]"); + EXPECT_STREQ(earg[4], "f_1[3]"); + EXPECT_STREQ(earg[5], "c_temp[2]"); + EXPECT_STREQ(earg[6], "c_temp[3]"); + EXPECT_STREQ(earg[7], "c_temp[4]"); + EXPECT_STREQ(earg[8], "v_temp[2*]"); + EXPECT_STREQ(earg[9], "c_gofr[3*]"); + EXPECT_STREQ(earg[10], "c_gofr[1][*]"); + EXPECT_STREQ(earg[11], "c_gofr[*2][2]"); + EXPECT_STREQ(earg[12], "c_gofr[*][*]"); + + for (int i = 0; i < narg; ++i) + delete[] earg[i]; + lmp->memory->sfree(earg); + for (int i = 0; i < oarg; ++i) + delete[] args[i]; + delete[] args; +} + +} // namespace LAMMPS_NS + +int main(int argc, char **argv) +{ + MPI_Init(&argc, &argv); + ::testing::InitGoogleMock(&argc, argv); + + if (platform::mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) + std::cout << "Warning: using OpenMPI without exceptions. Death tests will be skipped\n"; + + // handle arguments passed via environment variable + if (const char *var = getenv("TEST_ARGS")) { + std::vector env = utils::split_words(var); + for (auto arg : env) { + if (arg == "-v") { + verbose = true; + } + } + } + + if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; + + int rv = RUN_ALL_TESTS(); + MPI_Finalize(); + return rv; +} diff --git a/unittest/cplusplus/test_error_class.cpp b/unittest/cplusplus/test_error_class.cpp index 27318646be..a94e6a3e41 100644 --- a/unittest/cplusplus/test_error_class.cpp +++ b/unittest/cplusplus/test_error_class.cpp @@ -1,4 +1,4 @@ -// unit tests for issuing command to a LAMMPS instance through the Input class +// unit tests for public member functions of the Error class #include "error.h" #include "info.h" @@ -129,8 +129,7 @@ int main(int argc, char **argv) ::testing::InitGoogleMock(&argc, argv); if (platform::mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) - std::cout << "Warning: using OpenMPI without exceptions. " - "Death tests will be skipped\n"; + std::cout << "Warning: using OpenMPI without exceptions. Death tests will be skipped\n"; // handle arguments passed via environment variable if (const char *var = getenv("TEST_ARGS")) { diff --git a/unittest/force-styles/tests/atomic-pair-smatb.yaml b/unittest/force-styles/tests/atomic-pair-smatb.yaml new file mode 100644 index 0000000000..1a1bd60d38 --- /dev/null +++ b/unittest/force-styles/tests/atomic-pair-smatb.yaml @@ -0,0 +1,95 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Wed Apr 27 17:35:13 2022 +epsilon: 6e-12 +skip_tests: single +prerequisites: ! | + pair smatb +pre_commands: ! | + variable units index metal + variable newton_pair delete + variable newton_pair index on +post_commands: ! "" +input_file: in.metal +pair_style: smatb +pair_coeff: ! | + 1 1 2.88 10.35 4.178 0.210 1.818 4.07293506 4.9883063257983666 + 1 2 2.725 10.70 2.805 0.0977 1.2275 4.08707719 4.4340500673763259 + 2 2 2.56 10.55 2.43 0.0894 1.2799 3.62038672 4.4340500673763259 +extract: ! "" +natoms: 32 +init_vdwl: -60.168389119061764 +init_coul: 0 +init_stress: ! |2- + 3.0379713999046641e+02 2.8481689618050700e+02 2.7487901025801546e+02 1.2210883607368261e+01 -4.6310157292178644e+00 4.6132589248268313e-01 +init_forces: ! |2 + 1 1.7537039354439259e+00 7.0360956531760914e+00 -8.4184005958845576e-01 + 2 -9.6588965012743466e-01 -4.2968327220274549e+00 9.9999262128352517e-01 + 3 -2.2460353121901719e+00 1.0242304966158118e+01 -1.8443560888714017e+00 + 4 9.9448733303045811e-01 7.5230397435187024e-01 -6.0766236587933242e-01 + 5 3.2183954634823486e+00 1.5733656263362944e+01 4.7039945398761146e-01 + 6 2.8052970436237228e+00 4.8969292026494609e+00 2.9489788602236294e-01 + 7 -5.7345085273481313e+00 8.6530112130150911e+00 7.7447706601282529e-01 + 8 -2.7028241379012670e+00 -1.2472144397235256e+00 3.5063865351057539e+00 + 9 -2.2386799966388922e+00 -5.1178927074297116e+00 -3.6574951500303547e+00 + 10 -4.0842175514437216e+00 -9.2805347046989155e+00 -9.5216421574104011e+00 + 11 -3.0158013348581383e+00 -9.8825164063184836e+00 4.7066807600425307e+00 + 12 2.9355737505075075e-01 -9.1277559819075993e+00 1.7503554943451509e+00 + 13 6.5442807463873454e-01 3.5771666022763327e-01 -2.9268279206132601e+00 + 14 2.9546102292027019e+00 -2.1076657421595297e+00 2.4027353745102911e+00 + 15 -1.4362459620281001e+00 -1.4469338088460937e-01 1.2638040704141933e+00 + 16 1.1853600123947110e+01 -8.2217359454928722e+00 3.5602820971226925e+00 + 17 2.9760114434025717e+00 9.1510881878371890e+00 2.6527712778949613e+00 + 18 -3.8448816734858200e+00 -3.8596834411195530e-01 -1.5363106241864222e+00 + 19 -5.4287609604186988e+00 8.3639132891808646e-02 1.2597633537120057e+00 + 20 1.8993344143373079e+00 1.7539397493690578e+00 -2.3674883662900768e+00 + 21 9.3202877569111724e+00 1.0161906623748195e+01 2.5117245084501487e+00 + 22 -5.4286006790341602e-02 -4.1235834232008373e-01 -1.6165289278166828e-01 + 23 5.1618239402933046e+00 7.8084801332958875e+00 -7.8617666396584083e+00 + 24 2.1573958095505019e+00 3.3064758348776766e+00 1.0356666170852131e+00 + 25 2.7317865068673508e-01 -6.7983594715200391e-01 -8.4962145425034485e-01 + 26 -6.1973411118185515e+00 -9.9363067654978252e+00 1.1125063212404200e+01 + 27 8.8836361676639608e-01 -2.5101152574520498e+00 -1.5693011315761736e+00 + 28 -1.5415779635281726e+00 3.0301797542504927e-01 1.5248141023284689e+00 + 29 2.7349816106722007e+00 8.8545204263186583e-01 -8.5526109552538948e-02 + 30 -1.0720483420459732e+00 -4.4498068532010109e+00 -2.2225391974890889e+00 + 31 1.1773042862086689e+00 -3.7757672138358065e+00 2.8670718827673392e-01 + 32 -1.0553662576625207e+01 -9.5490168588044995e+00 -4.0724914608207419e+00 +run_vdwl: -60.20669005164827 +run_coul: 0 +run_stress: ! |2- + 3.0366990231859160e+02 2.8472030171897950e+02 2.7473728347285567e+02 1.2172424459197687e+01 -4.6332954461814584e+00 4.7608342060898434e-01 +run_forces: ! |2 + 1 1.7287621761096983e+00 7.0355573735520842e+00 -8.4682174175985714e-01 + 2 -9.6697895447504500e-01 -4.2958415607798441e+00 1.0015306640771833e+00 + 3 -2.2449153785930140e+00 1.0220034215661133e+01 -1.8504820220633480e+00 + 4 9.9601791340276336e-01 7.5369431710262291e-01 -6.0681572641646842e-01 + 5 3.2060009999484147e+00 1.5701015711784372e+01 4.8372081899056063e-01 + 6 2.8080670120413069e+00 4.8912991510058559e+00 2.8963381062351951e-01 + 7 -5.7324770842913582e+00 8.6591358821788482e+00 7.6431887086981398e-01 + 8 -2.7059540524354420e+00 -1.2467200304482609e+00 3.5070033937113965e+00 + 9 -2.2338690489351816e+00 -5.1254178402905834e+00 -3.6627325643998292e+00 + 10 -4.0440304555481070e+00 -9.2663471307481604e+00 -9.4950789175699022e+00 + 11 -3.0095603324750355e+00 -9.8809272965546722e+00 4.6968379350949254e+00 + 12 2.9955821111103709e-01 -9.1186689644052663e+00 1.7487225514885398e+00 + 13 6.4891903429679598e-01 3.5328774712317623e-01 -2.9200027226328809e+00 + 14 2.9573134095573934e+00 -2.0910918248790211e+00 2.3937660891560109e+00 + 15 -1.4362727166791407e+00 -1.4487584341495263e-01 1.2659041092021559e+00 + 16 1.1811093106525520e+01 -8.2096829056411114e+00 3.5467098338575100e+00 + 17 2.9812217984029723e+00 9.1459474011872697e+00 2.6544874139680337e+00 + 18 -3.8455925628350474e+00 -3.8293266140015725e-01 -1.5378864958810305e+00 + 19 -5.4246332382008848e+00 8.2734848602692174e-02 1.2542661008733695e+00 + 20 1.8971229950794164e+00 1.7555326782428182e+00 -2.3672155825569949e+00 + 21 9.3028027186473548e+00 1.0133810518512346e+01 2.5079668062515421e+00 + 22 -5.2108622808623904e-02 -4.0963871892230036e-01 -1.5978127490210359e-01 + 23 5.1748427747828964e+00 7.8093248331208418e+00 -7.8361064692451841e+00 + 24 2.1561221337678749e+00 3.3060392424596703e+00 1.0375590296124864e+00 + 25 2.7439938289817345e-01 -6.7913212538661649e-01 -8.4934088300559951e-01 + 26 -6.1703634942784520e+00 -9.9078856414327738e+00 1.1113100533969693e+01 + 27 8.8899668170198953e-01 -2.5084240247927481e+00 -1.5752281408111217e+00 + 28 -1.5419740545035272e+00 3.0574247513776465e-01 1.5244579333305823e+00 + 29 2.7318838331391233e+00 8.8556581077732033e-01 -8.1366934099631305e-02 + 30 -1.0707952569409716e+00 -4.4481845742260617e+00 -2.2189658111567914e+00 + 31 1.1734335189797629e+00 -3.7753076875705340e+00 2.8648052295520054e-01 + 32 -1.0557032447392665e+01 -9.5476433755557508e+00 -4.0686411315317814e+00 +... diff --git a/unittest/force-styles/tests/atomic-pair-smatb_same.yaml b/unittest/force-styles/tests/atomic-pair-smatb_same.yaml new file mode 100644 index 0000000000..4ecc086a57 --- /dev/null +++ b/unittest/force-styles/tests/atomic-pair-smatb_same.yaml @@ -0,0 +1,93 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Wed Apr 27 17:51:25 2022 +epsilon: 6e-12 +skip_tests: single +prerequisites: ! | + pair smatb +pre_commands: ! | + variable units index metal + variable newton_pair delete + variable newton_pair index on +post_commands: ! "" +input_file: in.metal +pair_style: smatb +pair_coeff: ! | + * * 2.88 10.35 4.178 0.210 1.818 4.07293506 4.9883063257983666 +extract: ! "" +natoms: 32 +init_vdwl: 15.546009002462199 +init_coul: 0 +init_stress: ! |2- + 7.0981045919895291e+02 6.9464048009855617e+02 6.8185854046738905e+02 1.8940099448628423e+01 -2.3190641785495831e+00 -7.6126579722972734e+00 +init_forces: ! |2 + 1 1.8383788817685609e+00 7.3043414500016803e+00 1.2928059118046571e+00 + 2 -2.6848648395616506e+00 -7.8218002510265290e+00 5.1835989139783809e+00 + 3 -4.1262133070389613e+00 2.0356333849891929e+01 -5.0300134853162675e+00 + 4 2.1640213680130582e+00 -8.2080827254125310e-01 -5.7189855300172958e+00 + 5 5.1336080958834502e+00 1.4999943174537506e+01 4.1898025714112999e+00 + 6 4.5017623545159724e+00 3.6176208409156039e+00 -4.4379897612576352e-01 + 7 -6.2917785937694219e+00 9.6471529013643753e+00 -1.0169471822201503e+00 + 8 -6.9079266006711242e+00 -6.2411913330296631e+00 4.0631933657348354e+00 + 9 1.4448974765969274e+00 -6.3335992210787921e+00 -2.7877666693063965e+00 + 10 -3.2369455571053383e+00 -1.4726480521388170e+01 -1.2343244613879385e+01 + 11 -4.4279873426372749e+00 -5.8875813372324703e+00 4.2645243184789097e+00 + 12 2.7168432086644443e+00 -9.2808529346155240e+00 -4.2510938219210220e-01 + 13 -2.0372275262801081e+00 2.2026130441803748e+00 -4.7893800758259584e+00 + 14 6.1358565129828193e+00 -2.4215787035807863e+00 7.4237482521334002e+00 + 15 -3.2151583983209826e+00 2.8722155568519296e+00 -3.1022228268650602e+00 + 16 1.1834167029249446e+01 -9.9960409045212177e+00 4.0046914221724927e+00 + 17 4.4438667082387253e+00 1.4015434663357324e+01 1.1980157677253445e-01 + 18 -1.5049446792950388e+01 -2.9866974100159291e+00 -7.3487669643132998e+00 + 19 -1.5962776779061105e+01 -7.7159633670829013e+00 4.0578908190472625e+00 + 20 2.6368639403789449e+00 2.1948034299735144e+00 -3.2117143706849434e+00 + 21 1.6938751336137905e+01 5.3405439576559601e+00 3.9965661174944200e-01 + 22 4.6915262682186748e-01 -8.7314686216914801e+00 -1.2388516494108810e+00 + 23 4.7426470160406025e+00 1.2927761843820045e+01 -8.4044784783918658e+00 + 24 1.2732138070191686e+01 9.8600435340252197e+00 8.6676713483852375e+00 + 25 7.4659209593593703e+00 1.1048037573717906e-01 -5.0287486768790597e+00 + 26 -5.0656394516203669e+00 -1.5673717710206070e+01 1.3291597641889949e+01 + 27 4.4816496229054108e+00 -4.8760375214009000e-01 3.1769655817027243e-01 + 28 1.7501136457128652e+00 5.5544282266261300e+00 7.7052630849006061e+00 + 29 4.4375276260835363e+00 1.0588320818463746e+01 -5.0996447319488158e-01 + 30 -4.6722349677858155e+00 -3.1632380030448481e+00 -8.9559874574015321e+00 + 31 -2.1137799706905263e+00 -1.2576277946084598e+01 7.8183097013203859e+00 + 32 -2.0076186352052531e+01 -6.7271373781221957e+00 -2.4442712859248417e+00 +run_vdwl: 15.467597736353799 +run_coul: 0 +run_stress: ! |2- + 7.0958747804689210e+02 6.9441827563947470e+02 6.8163127749154512e+02 1.8878502566994296e+01 -2.3370443631780007e+00 -7.6034095912045760e+00 +run_forces: ! |2 + 1 1.8060069687912315e+00 7.2937921411443272e+00 1.2874043790398257e+00 + 2 -2.6860686380065211e+00 -7.8171831729036949e+00 5.1804211817416146e+00 + 3 -4.1171784798928526e+00 2.0287394801872782e+01 -5.0380109293520263e+00 + 4 2.1656515555309701e+00 -8.1400307560916696e-01 -5.7145340820348807e+00 + 5 5.1215865715331210e+00 1.4962842274862354e+01 4.1990209437793720e+00 + 6 4.5053950543110819e+00 3.6131448405817745e+00 -4.5093219067517526e-01 + 7 -6.2879800842830242e+00 9.6521438182158885e+00 -1.0299290710899491e+00 + 8 -6.9178598166543104e+00 -6.2386160865726810e+00 4.0623272209295660e+00 + 9 1.4558477052948295e+00 -6.3449931159549564e+00 -2.7980116422532566e+00 + 10 -3.1947087252955644e+00 -1.4694132852113814e+01 -1.2296068939837111e+01 + 11 -4.4213006161890327e+00 -5.8917488565993494e+00 4.2536421369191544e+00 + 12 2.7297061846000523e+00 -9.2628857408236485e+00 -4.2352406239391233e-01 + 13 -2.0463406900814625e+00 2.1917055360874724e+00 -4.7773710542900174e+00 + 14 6.1383962160687062e+00 -2.3802746888087309e+00 7.3930657535424977e+00 + 15 -3.2106271078248252e+00 2.8691911150262972e+00 -3.0935315047336651e+00 + 16 1.1775118023237834e+01 -9.9744044265688689e+00 3.9903927678211364e+00 + 17 4.4470872747424268e+00 1.3995945810173936e+01 1.2365235440776301e-01 + 18 -1.5026673304996480e+01 -2.9750422082331016e+00 -7.3424362144564483e+00 + 19 -1.5930045931183475e+01 -7.7015474120118768e+00 4.0406518181177002e+00 + 20 2.6298049917805058e+00 2.2000986429230047e+00 -3.2110928815587529e+00 + 21 1.6909713615092866e+01 5.3101658559139251e+00 4.0868602173987068e-01 + 22 4.7983382632912780e-01 -8.7146552778884860e+00 -1.2319261458206390e+00 + 23 4.7543321502399483e+00 1.2910146662851659e+01 -8.3714393526052007e+00 + 24 1.2703010580857182e+01 9.8446813695739301e+00 8.6611807480415717e+00 + 25 7.4606294163504421e+00 1.1676144511890918e-01 -5.0227835859998491e+00 + 26 -5.0389376565333173e+00 -1.5622579837196479e+01 1.3265181089097052e+01 + 27 4.4802107201737105e+00 -4.8768004812534205e-01 3.0515995799100715e-01 + 28 1.7426613249450380e+00 5.5559456274721297e+00 7.6944148346751184e+00 + 29 4.4190985096740434e+00 1.0572340858974512e+01 -4.9630774662960464e-01 + 30 -4.6643835948427661e+00 -3.1602285684767137e+00 -8.9347962499921074e+00 + 31 -2.1238163435419626e+00 -1.2568441864236553e+01 7.8082109733945497e+00 + 32 -2.0058169700227520e+01 -6.7278835686694558e+00 -2.4407165275151792e+00 +... diff --git a/unittest/force-styles/tests/atomic-pair-smatb_single.yaml b/unittest/force-styles/tests/atomic-pair-smatb_single.yaml new file mode 100644 index 0000000000..c3751fed04 --- /dev/null +++ b/unittest/force-styles/tests/atomic-pair-smatb_single.yaml @@ -0,0 +1,93 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Wed Apr 27 17:43:01 2022 +epsilon: 6e-12 +skip_tests: single +prerequisites: ! | + pair smatb/single +pre_commands: ! | + variable units index metal + variable newton_pair delete + variable newton_pair index on +post_commands: ! "" +input_file: in.metal +pair_style: smatb/single +pair_coeff: ! | + * * 2.88 10.35 4.178 0.210 1.818 4.07293506 4.9883063257983666 +extract: ! "" +natoms: 32 +init_vdwl: 15.546009002462199 +init_coul: 0 +init_stress: ! |2- + 7.0981045919895291e+02 6.9464048009855617e+02 6.8185854046738905e+02 1.8940099448628423e+01 -2.3190641785495831e+00 -7.6126579722972734e+00 +init_forces: ! |2 + 1 1.8383788817685609e+00 7.3043414500016803e+00 1.2928059118046571e+00 + 2 -2.6848648395616506e+00 -7.8218002510265290e+00 5.1835989139783809e+00 + 3 -4.1262133070389613e+00 2.0356333849891929e+01 -5.0300134853162675e+00 + 4 2.1640213680130582e+00 -8.2080827254125310e-01 -5.7189855300172958e+00 + 5 5.1336080958834502e+00 1.4999943174537506e+01 4.1898025714112999e+00 + 6 4.5017623545159724e+00 3.6176208409156039e+00 -4.4379897612576352e-01 + 7 -6.2917785937694219e+00 9.6471529013643753e+00 -1.0169471822201503e+00 + 8 -6.9079266006711242e+00 -6.2411913330296631e+00 4.0631933657348354e+00 + 9 1.4448974765969274e+00 -6.3335992210787921e+00 -2.7877666693063965e+00 + 10 -3.2369455571053383e+00 -1.4726480521388170e+01 -1.2343244613879385e+01 + 11 -4.4279873426372749e+00 -5.8875813372324703e+00 4.2645243184789097e+00 + 12 2.7168432086644443e+00 -9.2808529346155240e+00 -4.2510938219210220e-01 + 13 -2.0372275262801081e+00 2.2026130441803744e+00 -4.7893800758259584e+00 + 14 6.1358565129828193e+00 -2.4215787035807863e+00 7.4237482521334002e+00 + 15 -3.2151583983209826e+00 2.8722155568519296e+00 -3.1022228268650602e+00 + 16 1.1834167029249446e+01 -9.9960409045212177e+00 4.0046914221724927e+00 + 17 4.4438667082387253e+00 1.4015434663357324e+01 1.1980157677253445e-01 + 18 -1.5049446792950388e+01 -2.9866974100159291e+00 -7.3487669643132998e+00 + 19 -1.5962776779061105e+01 -7.7159633670829013e+00 4.0578908190472625e+00 + 20 2.6368639403789449e+00 2.1948034299735144e+00 -3.2117143706849434e+00 + 21 1.6938751336137905e+01 5.3405439576559601e+00 3.9965661174944195e-01 + 22 4.6915262682186748e-01 -8.7314686216914801e+00 -1.2388516494108810e+00 + 23 4.7426470160406025e+00 1.2927761843820045e+01 -8.4044784783918658e+00 + 24 1.2732138070191686e+01 9.8600435340252197e+00 8.6676713483852375e+00 + 25 7.4659209593593703e+00 1.1048037573717906e-01 -5.0287486768790597e+00 + 26 -5.0656394516203669e+00 -1.5673717710206070e+01 1.3291597641889949e+01 + 27 4.4816496229054108e+00 -4.8760375214009000e-01 3.1769655817027243e-01 + 28 1.7501136457128652e+00 5.5544282266261300e+00 7.7052630849006061e+00 + 29 4.4375276260835363e+00 1.0588320818463746e+01 -5.0996447319488158e-01 + 30 -4.6722349677858155e+00 -3.1632380030448481e+00 -8.9559874574015321e+00 + 31 -2.1137799706905263e+00 -1.2576277946084598e+01 7.8183097013203859e+00 + 32 -2.0076186352052531e+01 -6.7271373781221957e+00 -2.4442712859248417e+00 +run_vdwl: 15.467597736353799 +run_coul: 0 +run_stress: ! |2- + 7.0958747804689210e+02 6.9441827563947470e+02 6.8163127749154512e+02 1.8878502566994296e+01 -2.3370443631780007e+00 -7.6034095912045760e+00 +run_forces: ! |2 + 1 1.8060069687912315e+00 7.2937921411443272e+00 1.2874043790398257e+00 + 2 -2.6860686380065211e+00 -7.8171831729036949e+00 5.1804211817416146e+00 + 3 -4.1171784798928526e+00 2.0287394801872782e+01 -5.0380109293520263e+00 + 4 2.1656515555309701e+00 -8.1400307560916696e-01 -5.7145340820348807e+00 + 5 5.1215865715331210e+00 1.4962842274862354e+01 4.1990209437793720e+00 + 6 4.5053950543110819e+00 3.6131448405817745e+00 -4.5093219067517526e-01 + 7 -6.2879800842830242e+00 9.6521438182158885e+00 -1.0299290710899491e+00 + 8 -6.9178598166543104e+00 -6.2386160865726810e+00 4.0623272209295660e+00 + 9 1.4558477052948295e+00 -6.3449931159549564e+00 -2.7980116422532566e+00 + 10 -3.1947087252955644e+00 -1.4694132852113814e+01 -1.2296068939837111e+01 + 11 -4.4213006161890327e+00 -5.8917488565993494e+00 4.2536421369191544e+00 + 12 2.7297061846000523e+00 -9.2628857408236485e+00 -4.2352406239391233e-01 + 13 -2.0463406900814625e+00 2.1917055360874724e+00 -4.7773710542900174e+00 + 14 6.1383962160687062e+00 -2.3802746888087309e+00 7.3930657535424977e+00 + 15 -3.2106271078248252e+00 2.8691911150262972e+00 -3.0935315047336651e+00 + 16 1.1775118023237834e+01 -9.9744044265688672e+00 3.9903927678211364e+00 + 17 4.4470872747424268e+00 1.3995945810173936e+01 1.2365235440776301e-01 + 18 -1.5026673304996480e+01 -2.9750422082331016e+00 -7.3424362144564483e+00 + 19 -1.5930045931183475e+01 -7.7015474120118768e+00 4.0406518181177002e+00 + 20 2.6298049917805058e+00 2.2000986429230047e+00 -3.2110928815587529e+00 + 21 1.6909713615092866e+01 5.3101658559139251e+00 4.0868602173987068e-01 + 22 4.7983382632912785e-01 -8.7146552778884860e+00 -1.2319261458206390e+00 + 23 4.7543321502399483e+00 1.2910146662851659e+01 -8.3714393526052007e+00 + 24 1.2703010580857182e+01 9.8446813695739301e+00 8.6611807480415717e+00 + 25 7.4606294163504421e+00 1.1676144511890918e-01 -5.0227835859998500e+00 + 26 -5.0389376565333173e+00 -1.5622579837196479e+01 1.3265181089097052e+01 + 27 4.4802107201737105e+00 -4.8768004812534205e-01 3.0515995799100759e-01 + 28 1.7426613249450380e+00 5.5559456274721297e+00 7.6944148346751184e+00 + 29 4.4190985096740434e+00 1.0572340858974512e+01 -4.9630774662960464e-01 + 30 -4.6643835948427661e+00 -3.1602285684767137e+00 -8.9347962499921074e+00 + 31 -2.1238163435419626e+00 -1.2568441864236553e+01 7.8082109733945497e+00 + 32 -2.0058169700227520e+01 -6.7278835686694558e+00 -2.4407165275151792e+00 +... diff --git a/unittest/utils/test_utils.cpp b/unittest/utils/test_utils.cpp index 900ce6814c..5967ac087a 100644 --- a/unittest/utils/test_utils.cpp +++ b/unittest/utils/test_utils.cpp @@ -746,6 +746,12 @@ TEST(Utils, boundsbig_case3) ASSERT_EQ(nhi, -1); } +TEST(Utils, errorurl) +{ + auto errmesg = utils::errorurl(10); + ASSERT_THAT(errmesg, Eq("\nFor more information see https://docs.lammps.org/err0010")); +} + TEST(Utils, getsyserror) { #if defined(__linux__)