Merge branch 'develop' of github.com:lammps/lammps into kk_sort

This commit is contained in:
Stan Gerald Moore
2023-04-26 17:07:39 -06:00
130 changed files with 3040 additions and 4307 deletions

View File

@ -23,7 +23,6 @@ General howto
Howto_library
Howto_couple
Howto_mdi
Howto_bpm
Howto_broken_bonds
Settings howto
@ -83,6 +82,7 @@ Packages howto
Howto_spherical
Howto_granular
Howto_body
Howto_bpm
Howto_polarizable
Howto_coreshell
Howto_drude

View File

@ -136,10 +136,21 @@ Indices and tables
:class: note
The HTML version of the manual makes use of advanced features present
in "modern" web browsers. This can lead to incompatibilities with older
web browsers (released more than 4 years ago) and specific vendor browsers
(e.g. Internet Explorer on Windows; Microsoft Edge works well though)
in "modern" web browsers. This leads to incompatibilities with older
web browsers and specific vendor browsers (e.g. Internet Explorer on Windows)
where parts of the pages are not rendered as expected (e.g. the layout is
broken or mathematical expressions not typeset). In that case we
recommend to install/use a different/newer web browser or use
the `PDF version of the manual <https://docs.lammps.org/Manual.pdf>`_.
The following web browser versions have been verified to work as
expected on Linux, macOS, and Windows where available:
- Safari version 11.1 and later
- Firefox version 54 and later
- Chrome version 54 and later
- Opera version 41 and later
- Edge version 80 and later
Also Android version 7.1 and later and iOS version 11 and later have
been verified to render this website as expected.

View File

@ -38,8 +38,8 @@ Packages versus individual files
The remainder of this chapter describes how to add new "style" files of
various kinds to LAMMPS. Packages are simply collections of one or more
such new class files which are invoked as a new style within a LAMMPS
input script. In some cases also collections of supporting functions or
classes are included as separate files in a package, especially when
input script. In some cases collections of supporting functions or
classes are also included as separate files in a package, especially when
they can be shared between multiple styles. If designed correctly, these
additions typically do not require any changes to the core code of
LAMMPS; they are simply add-on files that are compiled with the rest of
@ -88,8 +88,8 @@ Once you have prepared everything, see the :doc:`LAMMPS GitHub Tutorial
new files through a GitHub pull request yourself. If you are unable or
unwilling to submit via GitHub yourself, you may also submit patch files
or full files to the LAMMPS developers and ask them to submit a pull
request on GitHub on your behalf. Then create a gzipped tar file of
all changed or added files or a corresponding patch file using
request on GitHub on your behalf. If this is the case, create a gzipped
tar file of all new or changed files or a corresponding patch file using
'diff -u' or 'diff -c' format and compress it with gzip. Please only
use gzip compression, as this works well and is available on all platforms.

View File

@ -80,8 +80,8 @@ There are also several type-specific methods
- Optional method to test when particles are in contact. By default, this is when particles overlap.
* - ``GranSubModNormal->pulloff_distance()``
- Optional method to return the distance at which particles stop interacting. By default, this is when particles no longer overlap.
* - ``GranSubModNormal->calculate_area()``
- Optional method to return the surface area of the contact. By default, this returns the geometric cross section.
* - ``GranSubModNormal->calculate_radius()``
- Optional method to return the radius of the contact. By default, this returns the radius of the geometric cross section.
* - ``GranSubModNormal->set_fncrit()``
- Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, this is the current total normal force including damping.
* - ``GranSubModNormal->calculate_forces()``
@ -105,9 +105,7 @@ set of files ``gran_sub_mod_custom.h``:
#ifdef GranSubMod_CLASS
// clang-format off
GranSubModStyle(hooke/piecewise,
GranSubModNormalHookePiecewise,
NORMAL);
GranSubModStyle(hooke/piecewise,GranSubModNormalHookePiecewise,NORMAL);
// clang-format on
#else
@ -119,15 +117,14 @@ set of files ``gran_sub_mod_custom.h``:
namespace LAMMPS_NS {
namespace Granular_NS {
class GranSubModNormalHookePiecewise : public GranSubModNormal {
public:
GranSubModNormalHookePiecewise(class GranularModel *, class LAMMPS *);
void coeffs_to_local() override;
double calculate_forces();
protected:
double k1, k2, delta_switch;
};
class GranSubModNormalHookePiecewise : public GranSubModNormal {
public:
GranSubModNormalHookePiecewise(class GranularModel *, class LAMMPS *);
void coeffs_to_local() override;
double calculate_forces() override;
protected:
double k1, k2, delta_switch;
};
} // namespace Granular_NS
} // namespace LAMMPS_NS
@ -147,7 +144,8 @@ and ``gran_sub_mod_custom.cpp``
using namespace LAMMPS_NS;
using namespace Granular_NS;
GranSubModNormalHookePiecewise::GranSubModNormalHookePiecewise(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp)
GranSubModNormalHookePiecewise::GranSubModNormalHookePiecewise(GranularModel *gm, LAMMPS *lmp) :
GranSubModNormal(gm, lmp)
{
num_coeffs = 4;
}

View File

@ -40,13 +40,14 @@ conditions. This is the GNU public license in version 2 (not 3 or later)
for the publicly distributed versions, e.g. on the LAMMPS homepage or on
GitHub. On request we also make a version of LAMMPS available under
LGPL 2.1 terms; this will usually be the latest available or a previous
stable version with a few LGPL 2.1 incompatible files removed.
stable version with a few LGPL 2.1 incompatible files removed. More details
are found on the :doc:`LAMMPS open-source license page <Intro_opensource>`.
Your new source files should have the LAMMPS copyright, GPL notice, and
your name and email address at the top, like other user-contributed
LAMMPS source files.
Contributions may be under a different license for long as that
Contributions may be under a different license as long as that
license does not conflict with the aforementioned terms. Contributions
that use code with a conflicting license can be split into two parts:
@ -58,7 +59,7 @@ that use code with a conflicting license can be split into two parts:
Please note, that this split licensed mode may complicate including the
contribution in binary packages.
Using Pull Requests on GitHub (preferred)
Using pull requests on GitHub (preferred)
-----------------------------------------
All contributions to LAMMPS are processed as pull requests on GitHub
@ -71,7 +72,7 @@ depends on the amount of time required to prepare the pull request and
free time available by the LAMMPS developer in question to spend on this
task.
Integration Testing (strict)
Integration testing (strict)
----------------------------
Contributed code, like all pull requests, must pass the automated
@ -159,7 +160,7 @@ decks.
similar is acceptable when used to avoid unwanted domain decomposition
of empty volumes).
- outside of the log files no generated output should be included
- outside of the log files, no generated output should be included
- custom thermo_style settings may not include output measuring CPU or other time
as that makes comparing the thermo output between different runs more complicated.
@ -169,7 +170,7 @@ decks.
- the total file size of all the inputs and outputs should be small
- where possible potential files from the "potentials" folder or data
- where possible, potential files from the "potentials" folder or data
file from other folders should be re-used through symbolic links
Howto document (optional)
@ -187,7 +188,7 @@ your documentation, README files and examples, and the easier you make
it for people to get started, the more likely it is that users will try
out your new feature.
Programming Style Requirements (varied)
Programming style requirements (varied)
---------------------------------------
The LAMMPS developers aim to employ a consistent programming style and
@ -231,7 +232,7 @@ list all non-conforming lines. By adding the `-f` flag to the command
line, they will modify the flagged files to try removing the detected
issues.
Indentation and Placement of Braces (strongly preferred)
Indentation and placement of braces (strongly preferred)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LAMMPS uses 2 characters per indentation level and lines should be
@ -240,7 +241,7 @@ kept within 100 characters wide.
For new files added to the "src" tree, a `clang-format
<https://clang.llvm.org/docs/ClangFormat.html>`_ configuration file is
provided under the name `.clang-format`. This file is compatible with
clang-format version 8 and later. With that file present files can be
clang-format version 8 and later. With that file present, files can be
reformatted according to the configuration with a command like:
`clang-format -i new-file.cpp`. Ideally, this is done while writing the
code or before a pull request is submitted. Blocks of code where the
@ -302,7 +303,7 @@ The core of LAMMPS is written in C++11 in a style that can be mostly
described as "C with classes". Advanced C++ features like operator
overloading or excessive use of templates are avoided with the intent to
keep the code readable to programmers that have limited C++ programming
experience. C++ constructs are acceptable when they help improving the
experience. C++ constructs are acceptable when they help improve the
readability and reliability of the code, e.g. when using the
`std::string` class instead of manipulating pointers and calling the
string functions of the C library. In addition a collection of
@ -313,7 +314,7 @@ portability are provided.
Included Fortran code has to be compatible with the Fortran 2003
standard. Python code must be compatible with Python 3.5. Large parts
or LAMMPS (including the :ref:`PYTHON package <PKG-PYTHON>`) are also
of LAMMPS (including the :ref:`PYTHON package <PKG-PYTHON>`) are also
compatible with Python 2.7. Compatibility with Python 2.7 is
desirable, but compatibility with Python 3.5 is **required**.
@ -432,7 +433,7 @@ you are uncertain, please ask.
- Please use clang-format only to reformat files that you have
contributed. For header files containing a ``SomeStyle(keyword,
ClassName)`` macros it is required to have this macro embedded with a
pair of ``// clang-format off``, ``// clang-format on`` commends and
pair of ``// clang-format off``, ``// clang-format on`` comments and
the line must be terminated with a semi-colon (;). Example:
.. code-block:: c++

View File

@ -187,16 +187,22 @@ Both the scalar and vector values calculated by this compute are
Restrictions
""""""""""""
This compute is part of the TALLY package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
This compute is part of the TALLY package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Not all pair styles can be evaluated in a pairwise mode as required by
this compute. For example, 3-body and other many-body potentials,
such as :doc:`Tersoff <pair_tersoff>` and
:doc:`Stillinger-Weber <pair_sw>` cannot be used. :doc:`EAM <pair_eam>`
potentials only include the pair potential portion of the EAM
interaction when used by this compute, not the embedding term. Also
bonded or Kspace interactions do not contribute to this compute.
this compute. For example, 3-body and other many-body potentials, such
as :doc:`Tersoff <pair_tersoff>` and :doc:`Stillinger-Weber <pair_sw>`
cannot be used. :doc:`EAM <pair_eam>` potentials only include the pair
potential portion of the EAM interaction when used by this compute, not
the embedding term. Also bonded or Kspace interactions do not
contribute to this compute.
These computes are not compatible with accelerated pair styles from the
GPU, INTEL, KOKKOS, or OPENMP packages. They will either create an error
or print a warning when required data was not tallied in the required way
and thus the data acquisition functions from these computes not called.
When used with dynamic groups, a :doc:`run 0 <run>` command needs to
be inserted in order to initialize the dynamic groups before accessing

View File

@ -18,18 +18,21 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command
* edpd/source or tdpd/source = style name of this fix command
* index (only specified for tdpd/source) = index of chemical species (1 to Nspecies)
* keyword = *sphere* or *cuboid*
* keyword = *sphere* or *cuboid* or *region*
.. parsed-literal::
*sphere* values = cx,cy,cz,radius,source
*sphere* args = cx cy cz radius source
cx,cy,cz = x,y,z center of spherical domain (distance units)
radius = radius of a spherical domain (distance units)
source = heat source or concentration source (flux units, see below)
*cuboid* values = cx,cy,cz,dLx,dLy,dLz,source
cx,cy,cz = x,y,z lower left corner of a cuboid domain (distance units)
*cuboid* values = cx cy cz dLx dLy dLz source
cx,cy,cz = x,y,z center of a cuboid domain (distance units)
dLx,dLy,dLz = x,y,z side length of a cuboid domain (distance units)
source = heat source or concentration source (flux units, see below)
*region* values = region-ID source
region = ID of region for heat or concentration source
source = heat source or concentration source (flux units, see below)
Examples
""""""""
@ -40,6 +43,7 @@ Examples
fix 1 all edpd/source cuboid 0.0 0.0 0.0 20.0 10.0 10.0 -0.01
fix 1 all tdpd/source 1 sphere 5.0 0.0 0.0 5.0 0.01
fix 1 all tdpd/source 2 cuboid 0.0 0.0 0.0 20.0 10.0 10.0 0.01
fix 1 all tdpd/source 1 region lower -0.01
Description
"""""""""""
@ -57,37 +61,50 @@ heat conduction with a source term (see Fig.12 in :ref:`(Li2014) <Li2014b>`)
or diffusion with a source term (see Fig.1 in :ref:`(Li2015) <Li2015b>`), as
an analog of a periodic Poiseuille flow problem.
If the *sphere* keyword is used, the *cx,cy,cz,radius* defines a
spherical domain to apply the source flux to.
.. deprecated:: TBD
If the *cuboid* keyword is used, the *cx,cy,cz,dLx,dLy,dLz* defines a
cuboid domain to apply the source flux to.
The *sphere* and *cuboid* keywords will be removed in a future version
of LAMMPS. The same functionality and more can be achieved with a region.
If the *sphere* keyword is used, the *cx, cy, cz, radius* values define
a spherical domain to apply the source flux to.
If the *cuboid* keyword is used, the *cx, cy, cz, dLx, dLy, dLz* define
a cuboid domain to apply the source flux to.
If the *region* keyword is used, the *region-ID* selects which
:doc:`region <region>` to apply the source flux to.
----------
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various :doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
No information of these fixes is written to :doc:`binary restart files
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
relevant to these fixes. No global or per-atom quantities are stored by
these fixes for access by various :doc:`output commands <Howto_output>`.
No parameter of these fixes can be used with the *start/stop* keywords
of the :doc:`run <run>` command. These fixes are not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the DPD-MESO package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
These fixes are part of the DPD-MESO package. They are only enabled if
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Fix *edpd/source* must be used with the :doc:`pair_style edpd <pair_mesodpd>` command. Fix *tdpd/source* must be used with the
Fix *edpd/source* must be used with the :doc:`pair_style edpd
<pair_mesodpd>` command. Fix *tdpd/source* must be used with the
:doc:`pair_style tdpd <pair_mesodpd>` command.
Related commands
""""""""""""""""
:doc:`pair_style edpd <pair_mesodpd>`, :doc:`pair_style tdpd <pair_mesodpd>`,
:doc:`compute edpd/temp/atom <compute_edpd_temp_atom>`, :doc:`compute tdpd/cc/atom <compute_tdpd_cc_atom>`
:doc:`compute edpd/temp/atom <compute_edpd_temp_atom>`,
:doc:`compute tdpd/cc/atom <compute_tdpd_cc_atom>`
Default
"""""""

View File

@ -280,24 +280,24 @@ invoked by the :doc:`minimize <minimize>` command.
Restrictions
""""""""""""
This command is part of the MDI package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package
This fix is part of the MDI package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
To use LAMMPS as an MDI driver in conjunction with other MDI-enabled
codes (MD or QM codes), the :doc:`units <units>` command should be
used to specify *real* or *metal* units. This will ensure the correct
unit conversions between LAMMPS and MDI units. The other code will
also perform similar unit conversions into its preferred units.
codes (MD or QM codes), the :doc:`units <units>` command should be used
to specify *real* or *metal* units. This will ensure the correct unit
conversions between LAMMPS and MDI units. The other code will also
perform similar unit conversions into its preferred units.
LAMMPS can also be used as an MDI driver in other unit choices it
supports, e.g. *lj*, but then no unit conversion to MDI units is
performed.
If this fix is used in conjuction with a QM code that does not support
periodic boundary conditions (more specifically, a QM code that does
not support the ``>CELL`` MDI command), the LAMMPS system must be
fully non-periodic. I.e. no dimension of the system can be periodic.
If this fix is used in conjunction with a QM code that does not support
periodic boundary conditions (more specifically, a QM code that does not
support the ``>CELL`` MDI command), the LAMMPS system must be fully
non-periodic. I.e. no dimension of the system can be periodic.
Related commands
""""""""""""""""

View File

@ -251,20 +251,20 @@ minimization, invoked by the :doc:`minimize <minimize>` command.
Restrictions
""""""""""""
This command is part of the MDI package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package
This command is part of the MDI package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
To use LAMMPS as an MDI driver in conjunction with other MDI-enabled
codes (MD or QM codes), the :doc:`units <units>` command should be
used to specify *real* or *metal* units. This will ensure the correct
unit conversions between LAMMPS and MDI units. The other code will
also perform similar unit conversions into its preferred units.
codes (MD or QM codes), the :doc:`units <units>` command should be used
to specify *real* or *metal* units. This will ensure the correct unit
conversions between LAMMPS and MDI units. The other code will also
perform similar unit conversions into its preferred units.
If this fix is used in conjuction with a QM code that does not support
periodic boundary conditions (more specifically, a QM code that does
not support the ``>CELL`` MDI command), the LAMMPS system must be
fully non-periodic. I.e. no dimension of the system can be periodic.
If this fix is used in conjunction with a QM code that does not support
periodic boundary conditions (more specifically, a QM code that does not
support the ``>CELL`` MDI command), the LAMMPS system must be fully
non-periodic. I.e. no dimension of the system can be periodic.
Related commands
""""""""""""""""

View File

@ -650,13 +650,13 @@ For *heat* *area*, the heat
.. math::
Q = k_{s} a \Delta T
Q = k_{s} A \Delta T
where :math:`\Delta T` is the difference in the two particles' temperature,
:math:`k_{s}` is a non-negative numeric value for the conductivity, and
:math:`a` is the area of the contact and depends on the normal force model.
:math:`A` is the area of the contact and depends on the normal force model.
Note that the option *none* must either be used in all or none of of the
*pair_coeff* calls. See :doc:`fix heat/flow <fix_heat_flow>` and