Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4b49cfb
Allow KOKKOS computes to pack/unpack forward comm buffers on device
stanmoore1 Feb 26, 2026
ef4c6c1
Update docs
stanmoore1 Feb 26, 2026
e6bae80
Fix a few issues in new code
stanmoore1 Feb 26, 2026
af40e59
Merge branch 'develop' into kk_compute_comm
stanmoore1 Feb 27, 2026
f0c0830
simplify logic
stanmoore1 Feb 27, 2026
1bada70
whitespace
stanmoore1 Mar 2, 2026
75f507a
add new energy bitmask entry
akohlmey Mar 12, 2026
08d202b
support for optionally computing only energy step one
akohlmey Mar 12, 2026
c131ee5
support for optionally computing only energy step two
akohlmey Mar 12, 2026
86aa104
be more paranoid. don't assume ENERGY_GLOBAL is set when ENERGY_ONLY …
akohlmey Mar 12, 2026
c87fec9
don't need eflag/vflag as class members.
akohlmey Mar 12, 2026
df59e55
correct comments
akohlmey Mar 12, 2026
f90a6a1
Move model to the GPU device
canoalberto Mar 20, 2026
2813646
relax epsilon for ARM64
akohlmey Mar 26, 2026
b71c160
Merge branch 'develop' into collected-small-fixes
akohlmey Mar 26, 2026
d88282e
Fix superellipsoid normal computation and refactor vertex scaling
Copilot Mar 26, 2026
4376c17
Merge remote-tracking branch 'github/develop' into collected-small-fixes
akohlmey Mar 26, 2026
b194fae
make references unique, reformat, small grammar corrections
akohlmey Mar 26, 2026
2eeb4f5
remove dead code
akohlmey Mar 26, 2026
b99e2e0
make more consistent with rest of LAMMPS, apply suggestions from stat…
akohlmey Mar 26, 2026
4b9b1b8
Merge remote-tracking branch 'github/develop' into collected-small-fixes
akohlmey Mar 26, 2026
eb97d86
update for superellipsoids
akohlmey Mar 26, 2026
f40e2c0
add missing include statement
akohlmey Mar 26, 2026
e48e75d
bugfix
akohlmey Mar 26, 2026
c0ae4ff
expand visualization howto with information about superellipsoids and…
akohlmey Mar 26, 2026
dbd05b3
whitespace
akohlmey Mar 26, 2026
2ab7758
assign some more code owners
akohlmey Mar 26, 2026
0880157
add/update version tags for superellipsoids
akohlmey Mar 26, 2026
9fb0a82
address issues reported by coverity scan
akohlmey Mar 27, 2026
080508a
Merge remote-tracking branch 'github/develop' into collected-small-fixes
akohlmey Mar 27, 2026
0a6f0db
small spelling and formatting fixes, add version tag and reformat par…
akohlmey Mar 27, 2026
5cbccea
Merge remote-tracking branch 'github/develop' into collected-small-fixes
akohlmey Mar 27, 2026
fc67ea1
add sanity checks to fix adapt for diameters so mass is not zero and …
akohlmey Mar 27, 2026
508a813
correct logic
akohlmey Mar 28, 2026
79a3358
correct example path
akohlmey Mar 28, 2026
d6805f1
correct issues reported by clang static code analysis
akohlmey Mar 28, 2026
ab1c30d
apply clang-format
akohlmey Mar 28, 2026
cd55412
remove dead code
akohlmey Mar 28, 2026
9b8fba6
must store and read nterms_max in restart for use with KOKKOS
akohlmey Mar 28, 2026
514fe44
whitespace
akohlmey Mar 28, 2026
d598473
improve visual quality at lower triangle counts
akohlmey Mar 28, 2026
3a1a74b
update image examples using recent code improvements
akohlmey Mar 28, 2026
f2f7f28
Add KOKKOS package version of dihedral style nharmonic
Copilot Mar 29, 2026
798c6ff
add nterms_max to dihedral nharmonic same as for dihedral fourier
akohlmey Mar 29, 2026
a1c3e2c
hoist invariant assignment out of loop
akohlmey Mar 29, 2026
75260ba
whitespace
akohlmey Mar 29, 2026
16e3393
write nterms_max to restart and read it back
akohlmey Mar 29, 2026
82410af
use nterms_max from base class
akohlmey Mar 29, 2026
451c223
add KOKKOS memory allocation bugfix for destructor
akohlmey Mar 29, 2026
b854b7e
clarify instructions on .. versionadded:: versus .. versionchanged::
akohlmey Mar 29, 2026
1568ec3
Merge pull request #4914 from akohlmey/compute-energy-only
akohlmey Mar 30, 2026
98971b0
Merge pull request #4933 from akohlmey/dihedral-nharmonic-kokkos
akohlmey Mar 30, 2026
7de109e
Merge pull request #4901 from stanmoore1/kk_compute_comm
akohlmey Mar 30, 2026
8d4a4ba
Merge pull request #4924 from canoalberto/develop
akohlmey Mar 30, 2026
2bf8c4e
Merge pull request #4929 from akohlmey/collected-small-fixes
akohlmey Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/src/KIM/ @ellio167
/src/KOKKOS/ @stanmoore1
/src/MANIFOLD/ @Pakketeretet2
/src/MBX/ @Miniland1333
/src/MDI/ @taylor-a-barnes @sjplimp
/src/MEAM/ @martok
/src/MESONT/ @iafoss
Expand Down Expand Up @@ -55,6 +56,7 @@
/src/UEF/ @danicholson

# individual files in packages
/src/ASPHERE/*superellipsoid* @jtclemm @jibril-b-coulibaly @JBil8
/src/GPU/pair_vashishta_gpu.* @andeplane
/src/KOKKOS/pair_vashishta_kokkos.* @andeplane @stanmoore1
/src/KOSSOS/pair_pod_kokkos.* @exapde @stanmoore1
Expand Down
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ lammps/

5. **Documentation:** All new commands or features must be documented. Put `.. versionadded:: TBD` or
`.. versionchanged:: TBD` in front of paragraphs documenting the new or changed functionality.
The `.. versionadded:: TBD` directive should be used with new features or added keywords.
The `.. versionchanged:: TBD` directive should be used when the behavior of a keyword changes.
The `TBD` will be manually replaced with the release version string during the release preparation.
This does not apply when the change is only adding an accelerated version of an existing style.
Instead the corresponding code letter should be added to the respective Commands_\*.rst file.
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Commands_bond.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ OPT.
* :doc:`helix (o) <dihedral_helix>`
* :doc:`lepton (o) <dihedral_lepton>`
* :doc:`multi/harmonic (ko) <dihedral_multi_harmonic>`
* :doc:`nharmonic (o) <dihedral_nharmonic>`
* :doc:`nharmonic (ko) <dihedral_nharmonic>`
* :doc:`opls (iko) <dihedral_opls>`
* :doc:`quadratic (o) <dihedral_quadratic>`
* :doc:`spherical <dihedral_spherical>`
Expand Down
150 changes: 78 additions & 72 deletions doc/src/Howto_spherical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Finite-size spherical and aspherical particles

Typical MD models treat atoms or particles as point masses. Sometimes
it is desirable to have a model with finite-size particles such as
spheroids or ellipsoids or generalized aspherical bodies. The
difference is that such particles have a moment of inertia, rotational
energy, and angular momentum. Rotation is induced by torque coming
from interactions with other particles.
spheroids, ellipsoids, superellipsoids, or generalized aspherical
bodies. The difference is that such particles have a moment of inertia,
rotational energy, and angular momentum. Rotation is induced by torque
coming from interactions with other particles.

LAMMPS has several options for running simulations with these kinds of
particles. The following aspects are discussed in turn:
Expand All @@ -28,13 +28,13 @@ There are several :doc:`atom styles <atom_style>` that allow for
definition of finite-size particles: sphere, dipole, ellipsoid, line,
tri, peri, and body.

The sphere style defines particles that are spheroids and each
The *sphere* style defines particles that are spheroids and each
particle can have a unique diameter and mass (or density). These
particles store an angular velocity (omega) and can be acted upon by
torque. The "set" command can be used to modify the diameter and mass
of individual particles, after then are created.

The dipole style does not actually define finite-size particles, but
The *dipole* style does not actually define finite-size particles, but
is often used in conjunction with spherical particles, via a command
like

Expand All @@ -44,42 +44,45 @@ like

This is because when dipoles interact with each other, they induce
torques, and a particle must be finite-size (i.e. have a moment of
inertia) in order to respond and rotate. See the :doc:`atom_style dipole <atom_style>` command for details. The "set" command can be
used to modify the orientation and length of the dipole moment of
individual particles, after then are created.

The ellipsoid style defines particles that are ellipsoids and thus can
be aspherical. Each particle has a shape, specified by 3 diameters,
and mass (or density). Superellipsoid particles can be defined by
specifying 2 blockiness exponents (block) and adding the `superellipsoid`
keyword to the `atom_style ellipsoid` command. These particles store an angular
momentum and their orientation (quaternion), and can be acted upon by
torque. They do not store an angular velocity (omega), which can be
in a different direction than angular momentum, rather they compute it
as needed. The "set" command can be used to modify the diameter, orientation,
and mass of individual particles, after they are created.
The "set" command can also be used to modify the blockiness of superellipsoid
particles. It also has a brief explanation of what quaternions are.

The line style defines line segment particles with two end points and
inertia) in order to respond and rotate. See the :doc:`atom_style
dipole <atom_style>` command for details. The "set" command can be used
to modify the orientation and length of the dipole moment of individual
particles, after then are created.

The *ellipsoid* style defines particles that are ellipsoids or
superellipsoids and thus can be aspherical. Each particle has a shape,
specified by 3 diameters, and mass (or density). Superellipsoid
particles can be defined by additionally specifying 2 blockiness
exponents (block) and adding the `superellipsoid` keyword to the
:doc:`atom_style ellipsoid <atom_style>` command.

These particles store an angular momentum and their orientation
(quaternion), and can be acted upon by torque. They do not store an
angular velocity (omega), which can be in a different direction than
angular momentum, rather they compute it as needed. The :doc:`set
command <set>` can be used to modify the diameter, orientation, and mass
of individual particles, after they are created. The :doc:`set command
<set>` can also be used to modify the blockiness of superellipsoid
particles. It also has a brief explanation of what quaternions are.

The *line* style defines line segment particles with two end points and
a mass (or density). They can be used in 2d simulations, and they can
be joined together to form rigid bodies which represent arbitrary
polygons.

The tri style defines triangular particles with three corner points
The *tri* style defines triangular particles with three corner points
and a mass (or density). They can be used in 3d simulations, and they
can be joined together to form rigid bodies which represent arbitrary
particles with a triangulated surface.

The peri style is used with :doc:`Peridynamic models <pair_peri>` and
The *peri* style is used with :doc:`Peridynamic models <pair_peri>` and
defines particles as having a volume, that is used internally in the
:doc:`pair_style peri <pair_peri>` potentials.

The body style allows for definition of particles which can represent
complex entities, such as surface meshes of discrete points,
collections of sub-particles, deformable objects, etc. The body style
is discussed in more detail on the :doc:`Howto body <Howto_body>` doc
page.
The *body* style allows for definition of particles which can represent
complex entities, such as surface meshes of discrete points, collections
of sub-particles, deformable objects, etc. The body style is discussed
in more detail on the :doc:`Howto body <Howto_body>` doc page.

Note that if one of these atom styles is used (or multiple styles via
the :doc:`atom_style hybrid <atom_style>` command), not all particles in
Expand All @@ -88,20 +91,21 @@ the system are required to be finite-size or aspherical.
For example, in the ellipsoid style, if the 3 shape parameters are set
to the same value, the particle will be a sphere rather than an
ellipsoid. If the 3 shape parameters are all set to 0.0 or if the
diameter is set to 0.0, it will be a point particle. In the line or
tri style, if the lineflag or triflag is specified as 0, then it
will be a point particle.
diameter is set to 0.0, it will be a point particle. In the line or tri
style, if the lineflag or triflag is specified as 0, then it will be a
point particle. Similarly, if a superellipsoid has both blockiness
parameters set to 1.0, the superellipsoid will be a regular ellipsoid.

Some of the pair styles used to compute pairwise interactions between
finite-size particles also compute the correct interaction with point
particles as well, e.g. the interaction between a point particle and a
finite-size particle or between two point particles. If necessary,
:doc:`pair_style hybrid <pair_hybrid>` can be used to ensure the correct
interactions are computed for the appropriate style of interactions.
Likewise, using groups to partition particles (ellipsoids versus
spheres versus point particles) will allow you to use the appropriate
time integrators and temperature computations for each class of
particles. See the doc pages for various commands for details.
Likewise, using groups to partition particles (ellipsoids versus spheres
versus point particles) will allow you to use the appropriate time
integrators and temperature computations for each class of particles.
See the doc pages for various commands for details.

Also note that for :doc:`2d simulations <dimension>`, atom styles sphere
and ellipsoid still use 3d particles, rather than as circular disks or
Expand Down Expand Up @@ -130,15 +134,15 @@ such interactions. These are the various :doc:`pair styles <pair_style>` that g
* :doc:`pair_style tri/lj <pair_tri_lj>`
* :doc:`pair_style body/nparticle <pair_body_nparticle>`

The granular pair styles are used with spherical particles. The
*granular/superellipsoid* granular pair styles are used with superellipsoid particles.
The dipole pair style is used with the dipole atom style, which could be
applied to spherical or ellipsoidal particles. The GayBerne and
REsquared potentials require ellipsoidal particles, though they will
also work if the 3 shape parameters are the same (a sphere). The
Brownian and lubrication potentials are used with spherical particles.
The line, tri, and body potentials are used with line segment,
triangular, and body particles respectively.
Most of the granular pair styles are used with spherical particles with
the exception of the *granular/superellipsoid* pair style which is used
with superellipsoid particles. The dipole pair style is used with the
dipole atom style, which could be applied to spherical or ellipsoidal
particles. The GayBerne and REsquared potentials require ellipsoidal
particles, though they will also work if the 3 shape parameters are the
same (a sphere). The Brownian and lubrication potentials are used with
spherical particles. The line, tri, and body potentials are used with
line segment, triangular, and body particles respectively.

Time integration
----------------
Expand Down Expand Up @@ -189,13 +193,13 @@ rotational energy of spherical or ellipsoidal particles:
* :doc:`compute erotate/asphere <compute_erotate_asphere>`

These include rotational degrees of freedom in their computation. If
you wish the thermodynamic output of temperature or pressure to use
one of these computes (e.g. for a system entirely composed of
finite-size particles), then the compute can be defined and the
:doc:`thermo_modify <thermo_modify>` command used. Note that by default
thermodynamic quantities will be calculated with a temperature that
only includes translational degrees of freedom. See the
:doc:`thermo_style <thermo_style>` command for details.
you wish the thermodynamic output of temperature or pressure to use one
of these computes (e.g. for a system entirely composed of finite-size
particles), then the compute can be defined and the :doc:`thermo_modify
<thermo_modify>` command used. Note that by default thermodynamic
quantities will be calculated with a temperature that only includes
translational degrees of freedom. See the :doc:`thermo_style
<thermo_style>` command for details.

These commands can be used to output various attributes of finite-size
particles:
Expand All @@ -205,10 +209,10 @@ particles:
* :doc:`dump local <dump>`
* :doc:`compute body/local <compute_body_local>`

Attributes include the dipole moment, the angular velocity, the
angular momentum, the quaternion, the torque, the end-point and
corner-point coordinates (for line and tri particles), and
sub-particle attributes of body particles.
Attributes include the dipole moment, the angular velocity, the angular
momentum, the quaternion, the torque, the end-point and corner-point
coordinates (for line and tri particles), and sub-particle attributes of
body particles.

Rigid bodies composed of finite-size particles
----------------------------------------------
Expand All @@ -221,23 +225,25 @@ constituent particles, and integrates the motion of the rigid body.
If any of the constituent particles of a rigid body are finite-size
particles (spheres or ellipsoids or line segments or triangles), then
their contribution to the inertia tensor of the body is different than
if they were point particles. This means the rotational dynamics of
the rigid body will be different. Thus a model of a dimer is
different if the dimer consists of two point masses versus two
spheroids, even if the two particles have the same mass. Finite-size
particles that experience torque due to their interaction with other
particles will also impart that torque to a rigid body they are part
of.
if they were point particles. This means the rotational dynamics of the
rigid body will be different. Thus a model of a dimer is different if
the dimer consists of two point masses versus two spheroids, even if the
two particles have the same mass. Finite-size particles that experience
torque due to their interaction with other particles will also impart
that torque to a rigid body they are part of.

See the "fix rigid" command for example of complex rigid-body models
it is possible to define in LAMMPS.
See the "fix rigid" command for example of complex rigid-body models it
is possible to define in LAMMPS.

Note that the :doc:`fix shake <fix_shake>` command can also be used to
treat 2, 3, or 4 particles as a rigid body, but it always assumes the
particles are point masses.

Also note that body particles cannot be modeled with the :doc:`fix rigid <fix_rigid>` command. Body particles are treated by LAMMPS
as single particles, though they can store internal state, such as a
list of sub-particles. Individual body particles are typically treated
as rigid bodies, and their motion integrated with a command like :doc:`fix nve/body <fix_nve_body>`. Interactions between pairs of body
particles are computed via a command like :doc:`pair_style body/nparticle <pair_body_nparticle>`.
Also note that body particles cannot be modeled with the :doc:`fix rigid
<fix_rigid>` command. Body particles are treated by LAMMPS as single
particles, though they can store an internal state, such as a list of
sub-particles. Individual body particles are typically treated as rigid
bodies, and their motion integrated with a command like :doc:`fix
nve/body <fix_nve_body>`. Interactions between pairs of body particles
are computed via a command like :doc:`pair_style body/nparticle
<pair_body_nparticle>`.
Loading