Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collected small changes #3164

Merged
merged 23 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
092720b
correctly compute bond count for shake statistics
akohlmey Mar 1, 2022
2a0e661
enable and apply clang-format
akohlmey Mar 2, 2022
7fb684b
for 2d systems, rigid bodies always have a moment of inertia and no D…
akohlmey Mar 2, 2022
b4da01c
reduce compiler warnings and need for private variables in OpenMP pra…
akohlmey Mar 3, 2022
04dbf30
remove obsolete TODO item
akohlmey Mar 3, 2022
98f83f9
fix typos and make output section more readable
akohlmey Mar 4, 2022
f9c02b9
clarify. improve typesetting
akohlmey Mar 5, 2022
a9eae51
print name of non-existent compute/fix/variable in error message
akohlmey Mar 5, 2022
8945050
cosmetic
akohlmey Mar 5, 2022
83f08ff
small update and correct broken link
akohlmey Mar 5, 2022
a2bf40d
correct mini-ToC links and add missing entry
akohlmey Mar 6, 2022
6edfb49
update .gitignore for recent additions
akohlmey Mar 7, 2022
07059c1
Merge branch 'develop' into collected-small-changes
akohlmey Mar 7, 2022
87613bb
rename doc file to be more generic and match the examples folder
akohlmey Mar 7, 2022
374917f
tweak platform tests for CPU time to avoid bogus failures on windows
akohlmey Mar 8, 2022
c4b23bd
programming style updates use newer/simpler APIs
akohlmey Mar 10, 2022
8e85481
use MathConst::MY_PI instead of inferring it from acos(-1).
akohlmey Mar 10, 2022
0fcf40c
use MathConst::MY_PI more consistently and benefit from it being a co…
akohlmey Mar 10, 2022
0828ae6
Fix a typo in the doc
fujiisoup Mar 10, 2022
fa9683e
Merge remote-tracking branch 'github/develop' into collected-small-ch…
akohlmey Mar 10, 2022
079f755
Merge branch 'develop' of github.com:fujiisoup/lammps into collected-…
akohlmey Mar 10, 2022
ca76ff3
augment cmake library search path to include the CUDA stubs library f…
akohlmey Mar 11, 2022
3a1921b
correct SHAKE bond stats output and avoid division by zero
akohlmey Mar 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions doc/src/Build_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Optional build settings
LAMMPS can be built with several optional settings. Each sub-section
explain how to do this for building both with CMake and make.

* :ref:`C++11 standard compliance <cxx11>` when building all of LAMMPS
* :ref:`FFT library <fft>` for use with the :doc:`kspace_style pppm <kspace_style>` command
* :ref:`Size of LAMMPS integer types <size>`
* :ref:`Read or write compressed files <gzip>`
* :ref:`Output of JPG and PNG files <graphics>` via the :doc:`dump image <dump_image>` command
* :ref:`Output of movie files <graphics>` via the :doc:`dump_movie <dump_image>` command
* :ref:`Memory allocation alignment <align>`
* :ref:`Workaround for long long integers <longlong>`
* :ref:`Error handling exceptions <exceptions>` when using LAMMPS as a library
* `C++11 standard compliance`_ when building all of LAMMPS
* `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command
* `Size of LAMMPS integer types and size limits`_
* `Read or write compressed files`_
* `Output of JPG, PNG, and move files` via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands
* `Memory allocation alignment`_
* `Workaround for long long integers`_
* `Exception handling when using LAMMPS as a library`_ to capture errors
* `Trigger selected floating-point exceptions`_

----------

Expand Down
6 changes: 3 additions & 3 deletions doc/src/Commands_compute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`sph/t/atom <compute_sph_t_atom>`
* :doc:`spin <compute_spin>`
* :doc:`stress/atom <compute_stress_atom>`
* :doc:`stress/cartesian <compute_stress_cartesian>`
* :doc:`stress/cylinder <compute_stress_cartesian>`
* :doc:`stress/cartesian <compute_stress_profile>`
* :doc:`stress/cylinder <compute_stress_profile>`
* :doc:`stress/mop <compute_stress_mop>`
* :doc:`stress/mop/profile <compute_stress_mop>`
* :doc:`stress/spherical <compute_stress_cartesian>`
* :doc:`stress/spherical <compute_stress_profile>`
* :doc:`stress/tally <compute_tally>`
* :doc:`tdpd/cc/atom <compute_tdpd_cc_atom>`
* :doc:`temp (k) <compute_temp>`
Expand Down
23 changes: 11 additions & 12 deletions doc/src/Developer_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ following benefits:
- transparent support for translating unsupported UTF-8 characters to their ASCII equivalents
(the text-to-value conversion functions **only** accept ASCII characters)

In most cases (e.g. potential files) the same data is needed on all
MPI ranks. Then it is best to do the reading and parsing only on MPI
rank 0, and communicate the data later with one or more
``MPI_Bcast()`` calls. For reading generic text and potential
parameter files the custom classes :cpp:class:`TextFileReader
<LAMMPS_NS::TextFileReader>` and :cpp:class:`PotentialFileReader
<LAMMPS_NS::PotentialFileReader>` are available. They allow reading
the file as individual lines for which they can return a tokenizer
class (see below) for parsing the line. Or they can return blocks of
numbers as a vector directly. The documentation on `File reader
classes <file-reader-classes>`_ contains an example for a typical
case.
In most cases (e.g. potential files) the same data is needed on all MPI
ranks. Then it is best to do the reading and parsing only on MPI rank
0, and communicate the data later with one or more ``MPI_Bcast()``
calls. For reading generic text and potential parameter files the
custom classes :cpp:class:`TextFileReader <LAMMPS_NS::TextFileReader>`
and :cpp:class:`PotentialFileReader <LAMMPS_NS::PotentialFileReader>`
are available. They allow reading the file as individual lines for which
they can return a tokenizer class (see below) for parsing the line. Or
they can return blocks of numbers as a vector directly. The
documentation on :ref:`File reader classes <file-reader-classes>`
contains an example for a typical case.

When reading per-atom data, the data on each line of the file usually
needs to include an atom ID so it can be associated with a particular
Expand Down
6 changes: 0 additions & 6 deletions doc/src/Developer_org.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ follows:
- The Timer class logs timing information, output at the end
of a run.

.. TODO section on "Spatial decomposition and parallel operations"
.. diagram of 3d processor grid, brick vs. tiled. local vs. ghost
.. atoms, 6-way communication with pack/unpack functions,
.. PBC as part of the communication, forward and reverse communication
.. rendezvous communication, ring communication.

.. TODO section on "Fixes, Computes, and Variables"
.. how and when data is computed and provided and how it is
.. referenced. flags in Fix/Compute/Variable classes tell
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Developer_utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ A typical code segment would look like this:

----------

.. file-reader-classes:
.. _file-reader-classes:

File reader classes
-------------------
Expand Down
6 changes: 3 additions & 3 deletions doc/src/compute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
* :doc:`sph/t/atom <compute_sph_t_atom>` - per-atom internal temperature of Smooth-Particle Hydrodynamics atoms
* :doc:`spin <compute_spin>` - magnetic quantities for a system of atoms having spins
* :doc:`stress/atom <compute_stress_atom>` - stress tensor for each atom
* :doc:`stress/cartesian <compute_stress_cartesian>` - stress tensor in cartesian coordinates
* :doc:`stress/cylinder <compute_stress_cartesian>` - stress tensor in cylindrical coordinates
* :doc:`stress/cartesian <compute_stress_profile>` - stress tensor in cartesian coordinates
* :doc:`stress/cylinder <compute_stress_profile>` - stress tensor in cylindrical coordinates
* :doc:`stress/mop <compute_stress_mop>` - normal components of the local stress tensor using the method of planes
* :doc:`stress/mop/profile <compute_stress_mop>` - profile of the normal components of the local stress tensor using the method of planes
* :doc:`stress/spherical <compute_stress_cartesian>` - stress tensor in spherical coordinates
* :doc:`stress/spherical <compute_stress_profile>` - stress tensor in spherical coordinates
* :doc:`stress/tally <compute_tally>` - stress between two groups of atoms via the tally callback mechanism
* :doc:`tdpd/cc/atom <compute_tdpd_cc_atom>` - per-atom chemical concentration of a specified species for each tDPD particle
* :doc:`temp <compute_temp>` - temperature of group of atoms
Expand Down
9 changes: 4 additions & 5 deletions doc/src/compute_momentum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ Examples
Description
"""""""""""

Define a computation that calculates the translational momentum
of a group of particles.

The momentum of each particles is computed as m v, where m and v are
the mass and velocity of the particle.
Define a computation that calculates the translational momentum *p*
of a group of particles. It is computed as the sum :math:`\vec{p} = \sum_i m_i \cdot \vec{v}_i`
over all particles in the compute group, where *m* and *v* are
the mass and velocity vector of the particle, respectively.

Output info
"""""""""""
Expand Down
4 changes: 2 additions & 2 deletions doc/src/compute_stress_mop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ command, since those are contributions to the global system pressure.

NOTE 3: The local stress profile generated by compute *stress/mop/profile*
is similar to that obtained by compute
:doc:`stress/cartesian <compute_stress_cartesian>`.
:doc:`stress/cartesian <compute_stress_profile>`.
A key difference
is that compute *stress/mop/profile* considers particles
crossing a set of planes,
Expand Down Expand Up @@ -122,7 +122,7 @@ intra-molecular interactions, and long range (kspace) interactions.
Related commands
""""""""""""""""

:doc:`compute stress/atom <compute_stress_atom>`, :doc:`compute pressure <compute_pressure>`, :doc:`compute stress/cartesian <compute_stress_cartesian>`, :doc:`compute stress/cylinder <compute_stress_cartesian>`, :doc:`compute stress/spherical <compute_stress_cartesian>`
:doc:`compute stress/atom <compute_stress_atom>`, :doc:`compute pressure <compute_pressure>`, :doc:`compute stress/cartesian <compute_stress_profile>`, :doc:`compute stress/cylinder <compute_stress_profile>`, :doc:`compute stress/spherical <compute_stress_profile>`

Default
"""""""
Expand Down
60 changes: 34 additions & 26 deletions doc/src/compute_tally.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Syntax
compute ID group-ID style group2-ID

* ID, group-ID are documented in :doc:`compute <compute>` command
* style = *force/tally* or *heat/flux/tally* or *heat/flux/virial/tally* or * or *pe/tally* or *pe/mol/tally* or *stress/tally*
* style = *force/tally* or *heat/flux/tally* or *heat/flux/virial/tally* or *pe/tally* or *pe/mol/tally* or *stress/tally*
* group2-ID = group ID of second (or same) group

Examples
Expand Down Expand Up @@ -61,7 +61,7 @@ mechanism. Compute *pe/mol/tally* is one such style, that can
- through using this mechanism - separately tally intermolecular
and intramolecular energies. Something that would otherwise be
impossible without integrating this as a core functionality into
the based classes of LAMMPS.
the base classes of LAMMPS.

----------

Expand Down Expand Up @@ -148,30 +148,38 @@ pairwise property computations.
Output info
"""""""""""

Compute *pe/tally* calculates a global scalar (the energy) and a per
atom scalar (the contributions of the single atom to the global
scalar). Compute *pe/mol/tally* calculates a global 4-element vector
containing (in this order): *evdwl* and *ecoul* for intramolecular pairs
and *evdwl* and *ecoul* for intermolecular pairs. Since molecules are
identified by their molecule IDs, the partitioning does not have to be
related to molecules, but the energies are tallied into the respective
slots depending on whether the molecule IDs of a pair are the same or
different. Compute *force/tally* calculates a global scalar (the force
magnitude) and a per atom 3-element vector (force contribution from
each atom). Compute *stress/tally* calculates a global scalar
(average of the diagonal elements of the stress tensor) and a per atom
vector (the 6 elements of stress tensor contributions from the
individual atom). As in :doc:`compute heat/flux <compute_heat_flux>`,
compute *heat/flux/tally* calculates a global vector of length 6,
where the first 3 components are the :math:`x`, :math:`y`, :math:`z`
components of the full heat flow vector,
and the next 3 components are the corresponding components
of just the convective portion of the flow, i.e. the
first term in the equation for :math:`\mathbf{Q}`.
Compute *heat/flux/virial/tally* calculates a global scalar (heat flow)
and a per atom 3-element vector
(contribution to the force acting over atoms in the first group
from individual atoms in both groups).
- Compute *pe/tally* calculates a global scalar (the energy) and a per
atom scalar (the contributions of the single atom to the global
scalar).

- Compute *pe/mol/tally* calculates a global 4-element vector containing
(in this order): *evdwl* and *ecoul* for intramolecular pairs and
*evdwl* and *ecoul* for intermolecular pairs. Since molecules are
identified by their molecule IDs, the partitioning does not have to be
related to molecules, but the energies are tallied into the respective
slots depending on whether the molecule IDs of a pair are the same or
different.

- Compute *force/tally* calculates a global scalar (the force magnitude)
and a per atom 3-element vector (force contribution from each atom).

- Compute *stress/tally* calculates a global scalar
(average of the diagonal elements of the stress tensor) and a per atom
vector (the 6 elements of stress tensor contributions from the
individual atom).

- As in :doc:`compute heat/flux <compute_heat_flux>`,
compute *heat/flux/tally* calculates a global vector of length 6,
where the first 3 components are the :math:`x`, :math:`y`, :math:`z`
components of the full heat flow vector,
and the next 3 components are the corresponding components
of just the convective portion of the flow, i.e. the
first term in the equation for :math:`\mathbf{Q}`.

- Compute *heat/flux/virial/tally* calculates a global scalar (heat flow)
and a per atom 3-element vector
(contribution to the force acting over atoms in the first group
from individual atoms in both groups).

Both the scalar and vector values calculated by this compute are
"extensive".
Expand Down
13 changes: 11 additions & 2 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/Makefile.package
/Makefile.package.settings
/MAKE/MINE
/ADIOS/Makefile.lammps
/Make.py.last
/lmp_*

Expand Down Expand Up @@ -267,6 +268,8 @@
/fix_drag.h
/fix_numdiff.cpp
/fix_numdiff.h
/fix_numdiff_virial.cpp
/fix_numdiff_virial.h
/fix_spring_rg.cpp
/fix_spring_rg.h
/fix_temp_csld.cpp
Expand Down Expand Up @@ -934,6 +937,8 @@
/msm_cg.h
/neb.cpp
/neb.h
/netcdf_units.cpp
/netcdf_units.h
/pair_adp.cpp
/pair_adp.h
/pair_agni.cpp
Expand Down Expand Up @@ -1069,6 +1074,8 @@
/pair_hdnnp.h
/pair_ilp_graphene_hbn.cpp
/pair_ilp_graphene_hbn.h
/pair_ilp_tmd.cpp
/pair_ilp_tmd.h
/pair_kolmogorov_crespi_full.cpp
/pair_kolmogorov_crespi_full.h
/pair_kolmogorov_crespi_z.cpp
Expand Down Expand Up @@ -1175,8 +1182,8 @@
/pair_nm_cut_coul_cut.h
/pair_nm_cut_coul_long.cpp
/pair_nm_cut_coul_long.h
/pait_nm_cut_split.cpp
/pait_nm_cut_split.h
/pair_nm_cut_split.cpp
/pair_nm_cut_split.h
/pair_oxdna_*.cpp
/pair_oxdna_*.h
/pair_oxdna2_*.cpp
Expand All @@ -1202,6 +1209,8 @@
/pair_rebo.h
/pair_resquared.cpp
/pair_resquared.h
/pair_saip_metal.cpp
/pair_saip_metal.h
/pair_sdpd_taitwater_isothermal.cpp
/pair_sdpd_taitwater_isothermal.h
/pair_sph_heatconduction.cpp
Expand Down