From 3c0397f8b913ed19a2cc815b683e90cd54e1cc39 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 13 Aug 2024 20:17:26 -0600 Subject: [PATCH] Edits to modify doc files --- doc/src/Modify_atom.rst | 2 +- doc/src/Modify_contribute.rst | 2 +- doc/src/Modify_gran_sub_mod.rst | 39 +++++++++++++-------------------- doc/src/Modify_overview.rst | 6 ++--- doc/src/Modify_requirements.rst | 2 +- doc/src/Modify_thermo.rst | 2 +- 6 files changed, 22 insertions(+), 31 deletions(-) diff --git a/doc/src/Modify_atom.rst b/doc/src/Modify_atom.rst index 6d278b3816..69695b69c5 100644 --- a/doc/src/Modify_atom.rst +++ b/doc/src/Modify_atom.rst @@ -96,7 +96,7 @@ methods that a new variable name or flag needs to be added to. In ``Atom::peratom_create()`` when using the ``Atom::add_peratom()`` method, a cols argument of 0 is for per-atom vectors, a length > 1 is for per-atom arrays. Note the use of the extra per-thread flag and -the add_peratom_vary() method when last dimension of the array is +the add_peratom_vary() method when the last dimension of the array is variable-length. Adding the variable name to Atom::extract() enables the per-atom data diff --git a/doc/src/Modify_contribute.rst b/doc/src/Modify_contribute.rst index 8992e63c00..78d88ee69d 100644 --- a/doc/src/Modify_contribute.rst +++ b/doc/src/Modify_contribute.rst @@ -1,7 +1,7 @@ Submitting new features for inclusion in LAMMPS =============================================== -We encourage LAMMPS users to submit new features they wrote for LAMMPS +We encourage LAMMPS users to submit new features they write for LAMMPS to be included in the LAMMPS distribution and thus become easily accessible to all LAMMPS users. The LAMMPS source code is managed with git and public development is hosted on `GitHub diff --git a/doc/src/Modify_gran_sub_mod.rst b/doc/src/Modify_gran_sub_mod.rst index 40692952ed..c70f3e0759 100644 --- a/doc/src/Modify_gran_sub_mod.rst +++ b/doc/src/Modify_gran_sub_mod.rst @@ -65,37 +65,28 @@ need to be defined .. list-table:: - * - ``GranSubMod->mix_coeff()`` + * - ``mix_coeff()`` - Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean. - * - ``GranSubMod->coeffs_to_local()`` + * - ``coeffs_to_local()`` - Parses coefficients to define local variables. Run once at model construction. - * - ``GranSubMod->init()`` + * - ``init()`` - Optional method to define local variables after other GranSubMod types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model. -There are also several type-specific methods +The Normal, Damping, Tangential, Twisting, and Rolling sub-models also have a +``calculate_forces()`` method which calculate the respective forces/torques. +Correspondingly, the Heat sub-model has a ``calculate_heat()`` method. Lastly, +the Normal sub-model has a few extra optional methods: .. list-table:: - * - ``GranSubModNormal->touch()`` - - 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_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()`` - - Required method that returns the normal contact force - * - ``GranSubModDamping->calculate_forces()`` - - Required method that returns the normal damping force - * - ``GranSubModTangential->calculate_forces()`` - - Required method that calculates tangential forces/torques - * - ``GranSubModTwisting->calculate_forces()`` - - Required method that calculates twisting friction forces/torques - * - ``GranSubModRolling->calculate_forces()`` - - Required method that calculates rolling friction forces/torques - * - ``GranSubModHeat->calculate_heat()`` - - Required method that returns the rate of heat flow + * - ``touch()`` + - Tests whether particles are in contact. By default, when particles overlap. + * - ``pulloff_distance()`` + - Returns the distance at which particles stop interacting. By default, when particles no longer overlap. + * - ``calculate_radius()`` + - Returns the radius of the contact. By default, the radius of the geometric cross section. + * - ``set_fncrit()`` + - Defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, the current total normal force including damping. As an example, say one wanted to create a new normal force option that consisted of a Hookean force with a piecewise stiffness. This could be done by adding a new diff --git a/doc/src/Modify_overview.rst b/doc/src/Modify_overview.rst index ab1fa43ed4..e2c28a2b1d 100644 --- a/doc/src/Modify_overview.rst +++ b/doc/src/Modify_overview.rst @@ -12,8 +12,8 @@ programming style choices in LAMMPS is :doc:`given elsewhere `. Most of the new features described on the :doc:`Modify ` doc -page require you to write a new C++ derived class (except for -exceptions described below, where you can make small edits to existing +page require you to write a new C++ derived class (excluding exceptions +described below, this can often be done by making small edits to existing files). Creating a new class requires 2 files, a source code file (\*.cpp) and a header file (\*.h). The derived class must provide certain methods to work as a new option. Depending on how different @@ -46,7 +46,7 @@ then your ``pair_foo.h`` file should be structured as follows: // clang-format off PairStyle(foo,PairFoo); #else - // clanf-format on + // clang-format on ... (class definition for PairFoo) ... diff --git a/doc/src/Modify_requirements.rst b/doc/src/Modify_requirements.rst index 0637c860ab..cbcb3eca13 100644 --- a/doc/src/Modify_requirements.rst +++ b/doc/src/Modify_requirements.rst @@ -184,7 +184,7 @@ package so that it is optional. Included Fortran code has to be compatible with the Fortran 2003 standard. Since not all platforms supported by LAMMPS provide good support for compiling Fortran files, it should be considered to rewrite -these parts as C++ code, if possible and thus allow for a wider adoption +these parts as C++ code, if possible, and thus allow for a wider adoption of the contribution. As of January 2023, all previously included Fortran code for the LAMMPS executable has been replaced by equivalent C++ code. diff --git a/doc/src/Modify_thermo.rst b/doc/src/Modify_thermo.rst index 522a806613..3f5edefa4f 100644 --- a/doc/src/Modify_thermo.rst +++ b/doc/src/Modify_thermo.rst @@ -14,7 +14,7 @@ style, but can be adapted using :doc:`thermo_modify line `. The thermo styles (one, multi, etc) are defined by lists of keywords with associated formats for integer and floating point numbers and -identified but an enumerator constant. Adding a new style thus mostly +identified by an enumerator constant. Adding a new style thus mostly requires defining a new list of keywords and the associated formats and then inserting the required output processing where the enumerators are identified. Search for the word "CUSTOMIZATION" with references to