Updates to fix code-block at top, math, and anything else I found

This commit is contained in:
Karl Hammond
2022-08-15 20:17:36 -05:00
parent 0222da9f2b
commit b4cdf5ce23
28 changed files with 228 additions and 210 deletions

View File

@ -10,7 +10,7 @@ Syntax
angle_style style angle_style style
* style = *none* or *hybrid* or *charmm* or *class2* or *cosine* or *cosine/squared* or *harmonic* * style = *none* or *zero* or *hybrid* or *amoeba* or *charmm* or *class2* or *class2/p6* or *cosine* or *cosine/buck6d* or *cosine/delta* or *cosine/periodic* or *cosine/shift* or *cosine/shift/exp* or *cosine/squared* or *cross* or *dipole* or *fourier* or *fourier/simple* or *gaussian* or *harmonic* or *mm3* or *quartic* or *spica* or *table*
Examples Examples
"""""""" """"""""

View File

@ -6,7 +6,7 @@ balance command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
balance thresh style args ... keyword args ... balance thresh style args ... keyword args ...

View File

@ -10,7 +10,7 @@ Syntax
bond_style style args bond_style style args
* style = *none* or *hybrid* or *class2* or *fene* or *fene/expand* or *harmonic* or *morse* or *nonlinear* or *quartic* * style = *none* or *zero* or *hybrid* or *bpm/rotational* or *bpm/spring* or *class2* or *fene* or *fene/expand* or *fene/nm* or *gaussian* or *gromos* or *harmonic* or *harmonic/shift* or *harmonic/shift/cut* or *morse* or *nonlinear* or *oxdna/fene* or *oxdena2/fene* or *oxrna2/fene* or *quartic* or *special* or *table*
* args = none for any style except *hybrid* * args = none for any style except *hybrid*

View File

@ -6,7 +6,7 @@ boundary command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
boundary x y z boundary x y z

View File

@ -6,7 +6,7 @@ box command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
box keyword value ... box keyword value ...

View File

@ -6,18 +6,18 @@ clear command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
clear clear
Examples Examples
"""""""" """"""""
.. parsed-literal:: .. code-block:: LAMMPS
(commands for 1st simulation) # (commands for 1st simulation)
clear clear
(commands for 2nd simulation) # (commands for 2nd simulation)
Description Description
""""""""""" """""""""""

View File

@ -10,7 +10,7 @@ Syntax
comm_modify keyword value ... comm_modify keyword value ...
* zero or more keyword/value pairs may be appended * one or more keyword/value pairs may be appended
* keyword = *mode* or *cutoff* or *cutoff/multi* or *multi/reduce* or *group* or *vel* * keyword = *mode* or *cutoff* or *cutoff/multi* or *multi/reduce* or *group* or *vel*
.. parsed-literal:: .. parsed-literal::

View File

@ -6,7 +6,7 @@ compute command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID style args compute ID group-ID style args
@ -198,10 +198,10 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
* :doc:`dipole <compute_dipole>` - dipole vector and total dipole * :doc:`dipole <compute_dipole>` - dipole vector and total dipole
* :doc:`dipole/chunk <compute_dipole_chunk>` - dipole vector and total dipole for each chunk * :doc:`dipole/chunk <compute_dipole_chunk>` - dipole vector and total dipole for each chunk
* :doc:`displace/atom <compute_displace_atom>` - displacement of each atom * :doc:`displace/atom <compute_displace_atom>` - displacement of each atom
* :doc:`dpd <compute_dpd>` - * :doc:`dpd <compute_dpd>` - total values of internal conductive energy, internal mechanical energy, chemical energy, and harmonic average of internal temperature
* :doc:`dpd/atom <compute_dpd_atom>` - * :doc:`dpd/atom <compute_dpd_atom>` - per-particle values of internal conductive energy, internal mechanical energy, chemical energy, and internal temperature
* :doc:`edpd/temp/atom <compute_edpd_temp_atom>` - per-atom temperature for each eDPD particle in a group * :doc:`edpd/temp/atom <compute_edpd_temp_atom>` - per-atom temperature for each eDPD particle in a group
* :doc:`efield/atom <compute_efield_atom>` - * :doc:`efield/atom <compute_efield_atom>` - electric field at each atom
* :doc:`entropy/atom <compute_entropy_atom>` - pair entropy fingerprint of each atom * :doc:`entropy/atom <compute_entropy_atom>` - pair entropy fingerprint of each atom
* :doc:`erotate/asphere <compute_erotate_asphere>` - rotational energy of aspherical particles * :doc:`erotate/asphere <compute_erotate_asphere>` - rotational energy of aspherical particles
* :doc:`erotate/rigid <compute_erotate_rigid>` - rotational energy of rigid bodies * :doc:`erotate/rigid <compute_erotate_rigid>` - rotational energy of rigid bodies
@ -261,25 +261,25 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
* :doc:`rigid/local <compute_rigid_local>` - extract rigid body attributes * :doc:`rigid/local <compute_rigid_local>` - extract rigid body attributes
* :doc:`saed <compute_saed>` - electron diffraction intensity on a mesh of reciprocal lattice nodes * :doc:`saed <compute_saed>` - electron diffraction intensity on a mesh of reciprocal lattice nodes
* :doc:`slice <compute_slice>` - extract values from global vector or array * :doc:`slice <compute_slice>` - extract values from global vector or array
* :doc:`smd/contact/radius <compute_smd_contact_radius>` - * :doc:`smd/contact/radius <compute_smd_contact_radius>` - contact radius for Smooth Mach Dynamics
* :doc:`smd/damage <compute_smd_damage>` - damage status of SPH particles in Smooth Mach Dynamics * :doc:`smd/damage <compute_smd_damage>` - damage status of SPH particles in Smooth Mach Dynamics
* :doc:`smd/hourglass/error <compute_smd_hourglass_error>` - * :doc:`smd/hourglass/error <compute_smd_hourglass_error>` - error associated with approximated relative separation in Smooth Mach Dynamics
* :doc:`smd/internal/energy <compute_smd_internal_energy>` - per-particle enthalpy in Smooth Mach Dynamics * :doc:`smd/internal/energy <compute_smd_internal_energy>` - per-particle enthalpy in Smooth Mach Dynamics
* :doc:`smd/plastic/strain <compute_smd_plastic_strain>` - equivalent plastic strain per particle in Smooth Mach Dynamics * :doc:`smd/plastic/strain <compute_smd_plastic_strain>` - equivalent plastic strain per particle in Smooth Mach Dynamics
* :doc:`smd/plastic/strain/rate <compute_smd_plastic_strain_rate>` - time rate of the equivalent plastic strain in Smooth Mach Dynamics * :doc:`smd/plastic/strain/rate <compute_smd_plastic_strain_rate>` - time rate of the equivalent plastic strain in Smooth Mach Dynamics
* :doc:`smd/rho <compute_smd_rho>` - per-particle mass density in Smooth Mach Dynamics * :doc:`smd/rho <compute_smd_rho>` - per-particle mass density in Smooth Mach Dynamics
* :doc:`smd/tlsph/defgrad <compute_smd_tlsph_defgrad>` - deformation gradient in Smooth Mach Dynamics * :doc:`smd/tlsph/defgrad <compute_smd_tlsph_defgrad>` - deformation gradient in Smooth Mach Dynamics
* :doc:`smd/tlsph/dt <compute_smd_tlsph_dt>` - CFL-stable time increment per particle in Smooth Mach Dynamics * :doc:`smd/tlsph/dt <compute_smd_tlsph_dt>` - CFL-stable time increment per particle in Smooth Mach Dynamics
* :doc:`smd/tlsph/num/neighs <compute_smd_tlsph_num_neighs>` - * :doc:`smd/tlsph/num/neighs <compute_smd_tlsph_num_neighs>` - number of particles inside the smoothing kernel radius for Smooth Mach Dynamics
* :doc:`smd/tlsph/shape <compute_smd_tlsph_shape>` - * :doc:`smd/tlsph/shape <compute_smd_tlsph_shape>` - current shape of the volume of a particle for Smooth Mach Dynamics
* :doc:`smd/tlsph/strain <compute_smd_tlsph_strain>` - * :doc:`smd/tlsph/strain <compute_smd_tlsph_strain>` - Green--Lagrange strain tensor for Smooth Mach Dynamics
* :doc:`smd/tlsph/strain/rate <compute_smd_tlsph_strain_rate>` - * :doc:`smd/tlsph/strain/rate <compute_smd_tlsph_strain_rate>` - rate of strain for Smooth Mach Dynamics
* :doc:`smd/tlsph/stress <compute_smd_tlsph_stress>` - per-particle Cauchy stress tensor for SPH particles * :doc:`smd/tlsph/stress <compute_smd_tlsph_stress>` - per-particle Cauchy stress tensor for SPH particles
* :doc:`smd/triangle/vertices <compute_smd_triangle_vertices>` - * :doc:`smd/triangle/vertices <compute_smd_triangle_vertices>` - coordinates of vertices corresponding to the triangle elements of a mesh for Smooth Mach Dynamics
* :doc:`smd/ulsph/effm <compute_smd_ulsph_effm>` - per-particle effective shear modulus * :doc:`smd/ulsph/effm <compute_smd_ulsph_effm>` - per-particle effective shear modulus
* :doc:`smd/ulsph/num/neighs <compute_smd_ulsph_num_neighs>` - * :doc:`smd/ulsph/num/neighs <compute_smd_ulsph_num_neighs>` - number of neighbor particles inside the smoothing kernel radius for Smooth Mach Dynamics
* :doc:`smd/ulsph/strain <compute_smd_ulsph_strain>` - * :doc:`smd/ulsph/strain <compute_smd_ulsph_strain>` - logarithmic strain tensor for Smooth Mach Dynamics
* :doc:`smd/ulsph/strain/rate <compute_smd_ulsph_strain_rate>` - * :doc:`smd/ulsph/strain/rate <compute_smd_ulsph_strain_rate>` - logarithmic strain rate for Smooth Mach Dynamics
* :doc:`smd/ulsph/stress <compute_smd_ulsph_stress>` - per-particle Cauchy stress tensor and von Mises equivalent stress in Smooth Mach Dynamics * :doc:`smd/ulsph/stress <compute_smd_ulsph_stress>` - per-particle Cauchy stress tensor and von Mises equivalent stress in Smooth Mach Dynamics
* :doc:`smd/vol <compute_smd_vol>` - per-particle volumes and their sum in Smooth Mach Dynamics * :doc:`smd/vol <compute_smd_vol>` - per-particle volumes and their sum in Smooth Mach Dynamics
* :doc:`snap <compute_sna_atom>` - gradients of SNAP energy and forces w.r.t. linear coefficients and related quantities for fitting SNAP potentials * :doc:`snap <compute_sna_atom>` - gradients of SNAP energy and forces w.r.t. linear coefficients and related quantities for fitting SNAP potentials

View File

@ -6,7 +6,7 @@ compute ackland/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID ackland/atom keyword/value compute ID group-ID ackland/atom keyword/value
@ -17,7 +17,7 @@ Syntax
.. parsed-literal:: .. parsed-literal::
*legacy* yes/no = use (\ *yes*\ ) or do not use (\ *no*\ ) legacy ackland algorithm implementation *legacy* args = *yes* or *no* = use (\ *yes*\ ) or do not use (\ *no*\ ) legacy Ackland algorithm implementation
Examples Examples
"""""""" """"""""

View File

@ -6,7 +6,7 @@ compute adf command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID adf Nbin itype1 jtype1 ktype1 Rjinner1 Rjouter1 Rkinner1 Rkouter1 ... compute ID group-ID adf Nbin itype1 jtype1 ktype1 Rjinner1 Rjouter1 Rkinner1 Rkouter1 ...
@ -177,8 +177,8 @@ Output info
""""""""""" """""""""""
This compute calculates a global array with the number of rows = This compute calculates a global array with the number of rows =
*Nbins*, and the number of columns = 1 + 2\*Ntriples, where Ntriples is the *Nbins* and the number of columns = :math:`1 + 2 \times` *Ntriples*, where *Ntriples*
number of I,J,K triples specified. The first column has the bin is the number of I,J,K triples specified. The first column has the bin
coordinate (angle-related ordinate at midpoint of bin). Each subsequent column has coordinate (angle-related ordinate at midpoint of bin). Each subsequent column has
the two ADF values for a specific set of (\ *itypeN*,\ *jtypeN*,\ *ktypeN*\ ) the two ADF values for a specific set of (\ *itypeN*,\ *jtypeN*,\ *ktypeN*\ )
interactions, as described above. These values can be used interactions, as described above. These values can be used
@ -192,10 +192,10 @@ The first column of array values is the angle-related ordinate, either
the angle in degrees or radians, or the cosine of the angle. Each the angle in degrees or radians, or the cosine of the angle. Each
subsequent pair of columns gives the first and second kinds of ADF subsequent pair of columns gives the first and second kinds of ADF
for a specific set of (\ *itypeN*,\ *jtypeN*,\ *ktypeN*\ ). The values for a specific set of (\ *itypeN*,\ *jtypeN*,\ *ktypeN*\ ). The values
in the first ADF column are normalized numbers >= 0.0, in the first ADF column are normalized numbers :math:`\ge 0.0`,
whose integral w.r.t. the ordinate is 1, whose integral w.r.t. the ordinate is 1,
i.e. the first ADF is a normalized probability distribution. i.e. the first ADF is a normalized probability distribution.
The values in the second ADF column are also numbers >= 0.0. The values in the second ADF column are also numbers :math:`\ge 0.0`.
They are the cumulative density distribution of angles per atom. They are the cumulative density distribution of angles per atom.
By definition, this ADF is monotonically increasing from zero to By definition, this ADF is monotonically increasing from zero to
a maximum value equal to the average total number of a maximum value equal to the average total number of

View File

@ -6,7 +6,7 @@ compute angle command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID angle compute ID group-ID angle
@ -35,12 +35,12 @@ the hybrid sub-styles.
Output info Output info
""""""""""" """""""""""
This compute calculates a global vector of length N where N is the number of This compute calculates a global vector of length *N*, where *N* is the number
sub_styles defined by the :doc:`angle_style hybrid <angle_style>` command, of sub_styles defined by the :doc:`angle_style hybrid <angle_style>` command,
which can be accessed by indices 1-N. These values can be used by any command which can be accessed by indices 1 through *N*. These values can be used by
that uses global scalar or vector values from a compute as input. See the any command that uses global scalar or vector values from a compute as input.
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
options. output options.
The vector values are "extensive" and will be in energy The vector values are "extensive" and will be in energy
:doc:`units <units>`. :doc:`units <units>`.

View File

@ -6,7 +6,7 @@ compute angle/local command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID angle/local value1 value2 ... keyword args ... compute ID group-ID angle/local value1 value2 ... keyword args ...
@ -47,7 +47,7 @@ interactions. The number of datums generated, aggregated across all
processors, equals the number of angles in the system, modified by the processors, equals the number of angles in the system, modified by the
group parameter as explained below. group parameter as explained below.
The value *theta* is the angle for the 3 atoms in the interaction. The value *theta* is the angle for the three atoms in the interaction.
The value *eng* is the interaction energy for the angle. The value *eng* is the interaction energy for the angle.
@ -65,8 +65,8 @@ Note that the value of theta for each angle which stored in the
internal variable is in radians, not degrees. internal variable is in radians, not degrees.
As an example, these commands can be added to the bench/in.rhodo As an example, these commands can be added to the bench/in.rhodo
script to compute the cosine and cosine\^2 of every angle in the system script to compute the cosine and cosine-squared of every angle in the
and output the statistics in various ways: system and output the statistics in various ways:
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -83,19 +83,20 @@ and output the statistics in various ways:
fix 10 all ave/histo 10 10 100 -1 1 20 c_2[3] mode vector file tmp.histo fix 10 all ave/histo 10 10 100 -1 1 20 c_2[3] mode vector file tmp.histo
The :doc:`dump local <dump>` command will output the energy, angle, The :doc:`dump local <dump>` command will output the potential energy
cosine(angle), cosine\^2(angle) for every angle in the system. The (:math:`\phi`), the angle (:math:`\theta`), :math:`\cos(\theta`), and
:doc:`thermo_style <thermo_style>` command will print the average of :math:`\cos^2(\theta)` for every angle :math:`\theta` in the system.
those quantities via the :doc:`compute reduce <compute_reduce>` command The :doc:`thermo_style <thermo_style>` command will print the
with thermo output. And the :doc:`fix ave/histo <fix_ave_histo>` average of those quantities via the :doc:`compute reduce <compute_reduce>`
command will histogram the cosine(angle) values and write them to a command with thermo output. And the :doc:`fix ave/histo <fix_ave_histo>`
command will histogram the :math:`\cos(\theta)` values and write them to a
file. file.
---------- ----------
The local data stored by this command is generated by looping over all The local data stored by this command is generated by looping over all
the atoms owned on a processor and their angles. An angle will only the atoms owned on a processor and their angles. An angle will only
be included if all 3 atoms in the angle are in the specified compute be included if all three atoms in the angle are in the specified compute
group. Any angles that have been broken (see the group. Any angles that have been broken (see the
:doc:`angle_style <angle_style>` command) by setting their angle type to :doc:`angle_style <angle_style>` command) by setting their angle type to
0 are not included. Angles that have been turned off (see the :doc:`fix shake <fix_shake>` or :doc:`delete_bonds <delete_bonds>` commands) by 0 are not included. Angles that have been turned off (see the :doc:`fix shake <fix_shake>` or :doc:`delete_bonds <delete_bonds>` commands) by

View File

@ -6,7 +6,7 @@ compute angmom/chunk command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID angmom/chunk chunkID compute ID group-ID angmom/chunk chunkID
@ -72,13 +72,13 @@ Output info
""""""""""" """""""""""
This compute calculates a global array where the number of rows = the This compute calculates a global array where the number of rows = the
number of chunks *Nchunk* as calculated by the specified :doc:`compute chunk/atom <compute_chunk_atom>` command. The number of columns = number of chunks *Nchunk* as calculated by the specified :doc:`compute chunk/atom <compute_chunk_atom>` command. The number of columns = 3 for the three
3 for the 3 xyz components of the angular momentum for each chunk. (*x*, *y*, *z*) components of the angular momentum for each chunk.
These values can be accessed by any command that uses global array These values can be accessed by any command that uses global array
values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options. options.
The array values are "intensive". The array values will be in The array values are "intensive." The array values will be in
mass-velocity-distance :doc:`units <units>`. mass-velocity-distance :doc:`units <units>`.
Restrictions Restrictions

View File

@ -9,7 +9,7 @@ Accelerator Variants: *ave/sphere/atom/kk*
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID ave/sphere/atom keyword values ... compute ID group-ID ave/sphere/atom keyword values ...
@ -37,13 +37,13 @@ Description
Define a computation that calculates the local mass density and Define a computation that calculates the local mass density and
temperature for each atom based on its neighbors inside a spherical temperature for each atom based on its neighbors inside a spherical
cutoff. If an atom has M neighbors, then its local mass density is cutoff. If an atom has :math:`M` neighbors, then its local mass density is
calculated as the sum of its mass and its M neighbor masses, divided calculated as the sum of its mass and its :math:`M` neighbor masses, divided
by the volume of the cutoff sphere (or circle in 2d). The local by the volume of the cutoff sphere (or circle in 2d). The local
temperature of the atom is calculated as the temperature of the temperature of the atom is calculated as the temperature of the
collection of M+1 atoms, after subtracting the center-of-mass velocity collection of :math:`M+1` atoms, after subtracting the center-of-mass velocity
of the M+1 atoms from each of the M+1 atom's velocities. This is of the :math:`M+1` atoms from each of the :math:`M+1` atom's velocities. This
effectively the thermal velocity of the neighborhood of the central is effectively the thermal velocity of the neighborhood of the central
atom, similar to :doc:`compute temp/com <compute_temp_com>`. atom, similar to :doc:`compute temp/com <compute_temp_com>`.
The optional keyword *cutoff* defines the distance cutoff used when The optional keyword *cutoff* defines the distance cutoff used when

View File

@ -6,7 +6,7 @@ compute basal/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID basal/atom compute ID group-ID basal/atom
@ -47,12 +47,12 @@ in examples/PACKAGES/basal.
Output info Output info
""""""""""" """""""""""
This compute calculates a per-atom array with 3 columns, which can be This compute calculates a per-atom array with three columns, which can be
accessed by indices 1-3 by any command that uses per-atom values from accessed by indices 1--3 by any command that uses per-atom values from
a compute as input. See the :doc:`Howto output <Howto_output>` doc page a compute as input. See the :doc:`Howto output <Howto_output>` doc page
for an overview of LAMMPS output options. for an overview of LAMMPS output options.
The per-atom vector values are unitless since the 3 columns represent The per-atom vector values are unitless since the three columns represent
components of a unit vector. components of a unit vector.
Restrictions Restrictions

View File

@ -6,7 +6,7 @@ compute body/local command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID body/local input1 input2 ... compute ID group-ID body/local input1 input2 ...
@ -33,7 +33,7 @@ Description
""""""""""" """""""""""
Define a computation that calculates properties of individual body Define a computation that calculates properties of individual body
sub-particles. The number of datums generated, aggregated across all sub-particles. The number of data generated, aggregated across all
processors, equals the number of body sub-particles plus the number of processors, equals the number of body sub-particles plus the number of
non-body particles in the system, modified by the group parameter as non-body particles in the system, modified by the group parameter as
explained below. See the :doc:`Howto body <Howto_body>` page for explained below. See the :doc:`Howto body <Howto_body>` page for
@ -41,8 +41,8 @@ more details on using body particles.
The local data stored by this command is generated by looping over all The local data stored by this command is generated by looping over all
the atoms. An atom will only be included if it is in the group. If the atoms. An atom will only be included if it is in the group. If
the atom is a body particle, then its N sub-particles will be looped the atom is a body particle, then its :math:`N` sub-particles will be looped
over, and it will contribute N datums to the count of datums. If it over, and it will contribute :math:`N` data to the count of data. If it
is not a body particle, it will contribute 1 datum. is not a body particle, it will contribute 1 datum.
For both body particles and non-body particles, the *id* keyword For both body particles and non-body particles, the *id* keyword
@ -64,8 +64,8 @@ by the :doc:`atom_style body <atom_style>`, determines how many fields
exist and what they are. See the :doc:`Howto_body <Howto_body>` doc exist and what they are. See the :doc:`Howto_body <Howto_body>` doc
page for details of the different styles. page for details of the different styles.
Here is an example of how to output body information using the :doc:`dump local <dump>` command with this compute. If fields 1,2,3 for the Here is an example of how to output body information using the :doc:`dump local <dump>` command with this compute. If fields 1, 2, and 3 for the
body sub-particles are x,y,z coordinates, then the dump file will be body sub-particles are (*x*, *y*, *z*) coordinates, then the dump file will be
formatted similar to the output of a :doc:`dump atom or custom <dump>` formatted similar to the output of a :doc:`dump atom or custom <dump>`
command. command.
@ -79,7 +79,7 @@ Output info
This compute calculates a local vector or local array depending on the This compute calculates a local vector or local array depending on the
number of keywords. The length of the vector or number of rows in the number of keywords. The length of the vector or number of rows in the
array is the number of datums as described above. If a single keyword array is the number of data as described above. If a single keyword
is specified, a local vector is produced. If two or more keywords are is specified, a local vector is produced. If two or more keywords are
specified, a local array is produced where the number of columns = the specified, a local array is produced where the number of columns = the
number of keywords. The vector or array can be accessed by any number of keywords. The vector or array can be accessed by any

View File

@ -6,7 +6,7 @@ compute bond command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID bond compute ID group-ID bond
@ -35,10 +35,13 @@ or more of the hybrid sub-styles.
Output info Output info
""""""""""" """""""""""
This compute calculates a global vector of length N where N is the This compute calculates a global vector of length :math:`N`, where :math:`N`
number of sub_styles defined by the :doc:`bond_style hybrid <bond_style>` command, which can be accessed by indices 1-N. is the number of sub_styles defined by the
:doc:`bond_style hybrid <bond_style>` command,
which can be accessed by indices 1 through :math:`N`.
These values can be used by any command that uses global scalar or These values can be used by any command that uses global scalar or
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options. options.
The vector values are "extensive" and will be in energy The vector values are "extensive" and will be in energy

View File

@ -6,7 +6,7 @@ compute bond/local command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID bond/local value1 value2 ... keyword args ... compute ID group-ID bond/local value1 value2 ... keyword args ...
@ -35,8 +35,8 @@ Syntax
.. parsed-literal:: .. parsed-literal::
*set* args = dist name *set* args = *dist* name
dist = only currently allowed arg *dist* = only currently allowed arg
name = name of variable to set with distance (dist) name = name of variable to set with distance (dist)
Examples Examples
@ -49,7 +49,7 @@ Examples
compute 1 all bond/local dist fx fy fz compute 1 all bond/local dist fx fy fz
compute 1 all angle/local dist v_distsq set dist d compute 1 all bond/local dist v_distsq set dist d
Description Description
""""""""""" """""""""""
@ -82,32 +82,34 @@ relative to the center of mass (COM) velocity of the 2 atoms in the
bond. bond.
The value *engvib* is the vibrational kinetic energy of the two atoms The value *engvib* is the vibrational kinetic energy of the two atoms
in the bond, which is simply 1/2 m1 v1\^2 + 1/2 m2 v2\^2, where v1 and in the bond, which is simply :math:`\frac12 m_1 v_1^2 + \frac12 m_2 v_2^2,`
v2 are the magnitude of the velocity of the 2 atoms along the bond where :math:`v_1` and :math:`v_2` are the magnitude of the velocity of the two
direction, after the COM velocity has been subtracted from each. atoms along the bond direction, after the COM velocity has been subtracted from
The value *engrot* is the rotational kinetic energy of the two atoms
in the bond, which is simply 1/2 m1 v1\^2 + 1/2 m2 v2\^2, where v1 and
v2 are the magnitude of the velocity of the 2 atoms perpendicular to
the bond direction, after the COM velocity has been subtracted from
each. each.
The value *engtrans* is the translational kinetic energy associated The value *engrot* is the rotational kinetic energy of the two atoms
with the motion of the COM of the system itself, namely 1/2 (m1+m2) in the bond, which is simply :math:`\frac12 m_1 v_1^2 + \frac12 m_2 v_2^2,`
Vcm\^2 where Vcm = magnitude of the velocity of the COM. where :math:`v_1` and :math:`v_2` are the magnitude of the velocity of the two
atoms perpendicular to the bond direction, after the COM velocity has been
subtracted from each.
Note that these 3 kinetic energy terms are simply a partitioning of The value *engtrans* is the translational kinetic energy associated
the summed kinetic energy of the 2 atoms themselves. I.e. total KE = with the motion of the COM of the system itself, namely :math:`\frac12(m_1+m_2)
1/2 m1 v1\^2 + 1/2 m2 v2\^2 = engvib + engrot + engtrans, where v1,v2 V_{\mathrm{cm}}^2`, where `Vcm` = magnitude of the velocity of the COM.
are the magnitude of the velocities of the 2 atoms, without any
adjustment for the COM velocity. Note that these three kinetic energy terms are simply a partitioning of
the summed kinetic energy of the two atoms themselves. That is, the total
kinetic energy is
:math:`\frac12 m_1 v_1^2 + \frac12 m_2 v_2^2` = engvib + engrot + engtrans,
where :math:`v_1` and :math:`v_2` are the magnitude of the velocities of the
two atoms, without any adjustment for the COM velocity.
The value *omega* is the magnitude of the angular velocity of the The value *omega* is the magnitude of the angular velocity of the
two atoms around their COM position. two atoms around their COM position.
The value *velvib* is the magnitude of the relative velocity of the The value *velvib* is the magnitude of the relative velocity of the
two atoms in the bond towards each other. A negative value means the two atoms in the bond towards each other. A negative value means the
2 atoms are moving toward each other; a positive value means they are two atoms are moving toward each other; a positive value means they are
moving apart. moving apart.
The value *v_name* can be used together with the *set* keyword to The value *v_name* can be used together with the *set* keyword to
@ -121,7 +123,7 @@ directly. The *set* keyword is used to identify the name of this
other variable associated with theta. other variable associated with theta.
As an example, these commands can be added to the bench/in.rhodo As an example, these commands can be added to the bench/in.rhodo
script to compute the distance\^2 of every bond in the system and script to compute the length\^2 of every bond in the system and
output the statistics in various ways: output the statistics in various ways:
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -138,12 +140,12 @@ output the statistics in various ways:
fix 10 all ave/histo 10 10 100 0 6 20 c_2[3] mode vector file tmp.histo fix 10 all ave/histo 10 10 100 0 6 20 c_2[3] mode vector file tmp.histo
The :doc:`dump local <dump>` command will output the energy, distance, The :doc:`dump local <dump>` command will output the energy, length,
distance\^2 for every bond in the system. The and length\^2 for every bond in the system. The
:doc:`thermo_style <thermo_style>` command will print the average of :doc:`thermo_style <thermo_style>` command will print the average of
those quantities via the :doc:`compute reduce <compute_reduce>` command those quantities via the :doc:`compute reduce <compute_reduce>` command
with thermo output. And the :doc:`fix ave/histo <fix_ave_histo>` with thermo output, and the :doc:`fix ave/histo <fix_ave_histo>`
command will histogram the distance\^2 values and write them to a file. command will histogram the length\^2 values and write them to a file.
---------- ----------

View File

@ -6,20 +6,26 @@ compute born/matrix command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID born/matrix keyword value ... compute ID group-ID born/matrix keyword value ...
* ID, group-ID are documented in :doc:`compute <compute>` command * ID, group-ID are documented in :doc:`compute <compute>` command
* born/matrix = style name of this compute command * born/matrix = style name of this compute command
* zero or more keyword/value pairs may be appended * zero or more keywords or keyword/value pairs may be appended
.. parsed-literal:: .. parsed-literal::
keyword = *numdiff* keyword = *numdiff* or *pair* or *bond* or *angle* or *dihedral* or *improper*
*numdiff* values = delta virial-ID *numdiff* values = delta virial-ID
delta = magnitude of strain (dimensionless) delta = magnitude of strain (dimensionless)
virial-ID = ID of pressure compute for virial (string) virial-ID = ID of pressure compute for virial (string)
(*numdiff* cannot be used with any other keyword)
*pair* = compute pair-wise contributions
*bond* = compute bonding contributions
*angle* = compute angle contributions
*dihedral* = compute dihedral contributions
*improper* = compute improper contributions
Examples Examples
"""""""" """"""""
@ -36,8 +42,8 @@ Description
.. versionadded:: 4May2022 .. versionadded:: 4May2022
Define a compute that calculates Define a compute that calculates
:math:`\frac{\partial{}^2U}{\partial\varepsilon_{i}\partial\varepsilon_{j}}` the :math:`\frac{\partial{}^2U}{\partial\varepsilon_{i}\partial\varepsilon_{j}},` the
second derivatives of the potential energy :math:`U` w.r.t. strain second derivatives of the potential energy :math:`U` with respect to the strain
tensor :math:`\varepsilon` elements. These values are related to: tensor :math:`\varepsilon` elements. These values are related to:
.. math:: .. math::
@ -69,14 +75,14 @@ whose 21 independent elements are output in this order:
.. math:: .. math::
\begin{matrix} \begin{bmatrix}
C_{1} & C_{7} & C_{8} & C_{9} & C_{10} & C_{11} \\ C_{1} & C_{7} & C_{8} & C_{9} & C_{10} & C_{11} \\
C_{7} & C_{2} & C_{12} & C_{13} & C_{14} & C_{15} \\ C_{7} & C_{2} & C_{12} & C_{13} & C_{14} & C_{15} \\
\vdots & C_{12} & C_{3} & C_{16} & C_{17} & C_{18} \\ \vdots & C_{12} & C_{3} & C_{16} & C_{17} & C_{18} \\
\vdots & C_{13} & C_{16} & C_{4} & C_{19} & C_{20} \\ \vdots & C_{13} & C_{16} & C_{4} & C_{19} & C_{20} \\
\vdots & \vdots & \vdots & C_{19} & C_{5} & C_{21} \\ \vdots & \vdots & \vdots & C_{19} & C_{5} & C_{21} \\
\vdots & \vdots & \vdots & \vdots & C_{21} & C_{6} \vdots & \vdots & \vdots & \vdots & C_{21} & C_{6}
\end{matrix} \end{bmatrix}
in this matrix the indices of :math:`C_{k}` value are the corresponding element in this matrix the indices of :math:`C_{k}` value are the corresponding element
:math:`k` in the global vector output by this compute. Each term comes from the sum :math:`k` in the global vector output by this compute. Each term comes from the sum
@ -169,14 +175,14 @@ requiring that it use the virial keyword e.g.
**Output info:** **Output info:**
This compute calculates a global vector with 21 values that are This compute calculates a global vector with 21 values that are
the second derivatives of the potential energy w.r.t. strain. the second derivatives of the potential energy with respect to strain.
The values are in energy units. The values are in energy units.
The values are ordered as explained above. These values can be used The values are ordered as explained above. These values can be used
by any command that uses global values from a compute as input. See by any command that uses global values from a compute as input. See
the :doc:`Howto output <Howto_output>` doc page for an overview of the :doc:`Howto output <Howto_output>` doc page for an overview of
LAMMPS output options. LAMMPS output options.
The array values calculated by this compute are all "extensive". The array values calculated by this compute are all "extensive."
Restrictions Restrictions
"""""""""""" """"""""""""
@ -188,7 +194,7 @@ the :doc:`Build package <Build_package>` page for more info.
The Born term can be decomposed as a product of two terms. The first one is a The Born term can be decomposed as a product of two terms. The first one is a
general term which depends on the configuration. The second one is specific to general term which depends on the configuration. The second one is specific to
every interaction composing your force field (non-bonded, bonds, angle...). every interaction composing your force field (non-bonded, bonds, angle, ...).
Currently not all LAMMPS interaction styles implement the *born_matrix* method Currently not all LAMMPS interaction styles implement the *born_matrix* method
giving first and second order derivatives and LAMMPS will exit with an error if giving first and second order derivatives and LAMMPS will exit with an error if
this compute is used with such interactions unless the *numdiff* option is this compute is used with such interactions unless the *numdiff* option is

View File

@ -6,13 +6,13 @@ compute centro/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID centro/atom lattice keyword value ... compute ID group-ID centro/atom lattice keyword value ...
* ID, group-ID are documented in :doc:`compute <compute>` command * ID, group-ID are documented in :doc:`compute <compute>` command
centro/atom = style name of this compute command * centro/atom = style name of this compute command
lattice = *fcc* or *bcc* or N = # of neighbors per atom to include * lattice = *fcc* or *bcc* or N = # of neighbors per atom to include
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *axes* * keyword = *axes*
@ -83,12 +83,13 @@ atoms with smallest contributions to the centrosymmetry parameter,
i.e. the two most symmetric pairs of atoms. The third vector is i.e. the two most symmetric pairs of atoms. The third vector is
normal to the first two by the right-hand rule. All three vectors are normal to the first two by the right-hand rule. All three vectors are
normalized to unit length. For FCC crystals, the first two vectors normalized to unit length. For FCC crystals, the first two vectors
will lie along a <110> direction, while the third vector will lie will lie along a :math:`\langle110\rangle` direction, while the third vector
along either a <100> or <111> direction. For HCP crystals, the first will lie along either a :math:`\langle100\rangle` or :math:`\langle111\rangle`
two vectors will lie along <1000> directions, while the third vector direction. For HCP crystals, the first two vectors will lie along
will lie along <0001>. This provides a simple way to measure local :math:`\langle1000\rangle` directions, while the third vector
orientation in HCP structures. In general, the *axes* keyword can be will lie along :math:`\langle0001\rangle`. This provides a simple way to
used to estimate the orientation of symmetry axes in the neighborhood measure local orientation in HCP structures. In general, the *axes* keyword
can be used to estimate the orientation of symmetry axes in the neighborhood
of any atom. of any atom.
Only atoms within the cutoff of the pairwise neighbor list are Only atoms within the cutoff of the pairwise neighbor list are
@ -96,7 +97,7 @@ considered as possible neighbors. Atoms not in the compute group are
included in the :math:`N` neighbors used in this calculation. included in the :math:`N` neighbors used in this calculation.
The neighbor list needed to compute this quantity is constructed each The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (e.g. each time a snapshot of atoms time the calculation is performed (e.g., each time a snapshot of atoms
is dumped). Thus it can be inefficient to compute/dump this quantity is dumped). Thus it can be inefficient to compute/dump this quantity
too frequently or to have multiple compute/dump commands, each with a too frequently or to have multiple compute/dump commands, each with a
*centro/atom* style. *centro/atom* style.
@ -111,11 +112,11 @@ options.
If the *axes* keyword setting is *yes*, then a per-atom array is If the *axes* keyword setting is *yes*, then a per-atom array is
calculated. The first column is the centrosymmetry parameter. The calculated. The first column is the centrosymmetry parameter. The
next three columns are the x, y, and z components of the first next three columns are the *x*, *y*, and *z* components of the first
symmetry axis, followed by the second, and third symmetry axes in symmetry axis, followed by the second, and third symmetry axes in
columns 5-7 and 8-10. columns 5--7 and 8--10.
The centrosymmetry values are unitless values >= 0.0. Their magnitude The centrosymmetry values are unitless values :math:`\ge 0.0`. Their magnitude
depends on the lattice style due to the number of contributing neighbor depends on the lattice style due to the number of contributing neighbor
pairs in the summation in the formula above. And it depends on the pairs in the summation in the formula above. And it depends on the
local defects surrounding the central atom, as described above. For local defects surrounding the central atom, as described above. For

View File

@ -6,7 +6,7 @@ compute chunk/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID chunk/atom style args keyword values ... compute ID group-ID chunk/atom style args keyword values ...
@ -150,14 +150,14 @@ The *binning* styles perform a spatial binning of atoms, and assign an
atom the chunk ID corresponding to the bin number it is in. *Nchunk* atom the chunk ID corresponding to the bin number it is in. *Nchunk*
is set to the number of bins, which can change if the simulation box is set to the number of bins, which can change if the simulation box
size changes. This also depends on the setting of the *units* size changes. This also depends on the setting of the *units*
keyword; e.g. for *reduced* units the number of chunks may not change keyword (e.g., for *reduced* units the number of chunks may not change
even if the box size does. even if the box size does).
The *bin/1d*, *bin/2d*, and *bin/3d* styles define bins as 1d layers The *bin/1d*, *bin/2d*, and *bin/3d* styles define bins as 1d layers
(slabs), 2d pencils, or 3d boxes. The *dim*, *origin*, and *delta* (slabs), 2d pencils, or 3d boxes. The *dim*, *origin*, and *delta*
settings are specified 1, 2, or 3 times. For 2d or 3d bins, there is settings are specified 1, 2, or 3 times. For 2d or 3d bins, there is
no restriction on specifying dim = x before dim = y or z, or dim = y no restriction on specifying dim = *x* before dim = *y* or *z*, or dim = *y*
before dim = z. Bins in a particular *dim* have a bin size in that before dim = *z*. Bins in a particular *dim* have a bin size in that
dimension given by *delta*\ . In each dimension, bins are defined dimension given by *delta*\ . In each dimension, bins are defined
relative to a specified *origin*, which may be the lower/upper edge of relative to a specified *origin*, which may be the lower/upper edge of
the simulation box (in that dimension), or its center point, or a the simulation box (in that dimension), or its center point, or a
@ -170,10 +170,11 @@ boxes aligned with the xyz coordinate axes. For triclinic
(non-orthogonal) simulation boxes, the bin faces are parallel to the (non-orthogonal) simulation boxes, the bin faces are parallel to the
tilted faces of the simulation box. See the :doc:`Howto triclinic <Howto_triclinic>` page for a discussion of the tilted faces of the simulation box. See the :doc:`Howto triclinic <Howto_triclinic>` page for a discussion of the
geometry of triclinic boxes in LAMMPS. As described there, a tilted geometry of triclinic boxes in LAMMPS. As described there, a tilted
simulation box has edge vectors a,b,c. In that nomenclature, bins in simulation box has edge vectors :math:`\vec a`, :math:`\vec b`, and
the x dimension have faces with normals in the "b" cross "c" :math:`\vec c`. In that nomenclature, bins in
direction. Bins in y have faces normal to the "a" cross "c" the *x* dimension have faces with normals in the :math:`\vec b \times \vec c`
direction. And bins in z have faces normal to the "a" cross "b" direction, bins in *y* have faces normal to the :math:`\vec a \times \vec c`
direction, and bins in *z* have faces normal to the :math:`\vec a \times \vec b`
direction. Note that in order to define the size and position of direction. Note that in order to define the size and position of
these bins in an unambiguous fashion, the *units* option must be set these bins in an unambiguous fashion, the *units* option must be set
to *reduced* when using a triclinic simulation box, as noted below. to *reduced* when using a triclinic simulation box, as noted below.
@ -181,46 +182,46 @@ to *reduced* when using a triclinic simulation box, as noted below.
The meaning of *origin* and *delta* for triclinic boxes is as follows. The meaning of *origin* and *delta* for triclinic boxes is as follows.
Consider a triclinic box with bins that are 1d layers or slabs in the Consider a triclinic box with bins that are 1d layers or slabs in the
x dimension. No matter how the box is tilted, an *origin* of 0.0 x dimension. No matter how the box is tilted, an *origin* of 0.0
means start layers at the lower "b" cross "c" plane of the simulation means start layers at the lower :math:`\vec b \times \vec c` plane of the
box and an *origin* of 1.0 means to start layers at the upper "b" simulation box and an *origin* of 1.0 means to start layers at the upper
cross "c" face of the box. A *delta* value of 0.1 in *reduced* units :math:`\vec b \times \vec c` face of the box. A *delta* value of 0.1 in
means there will be 10 layers from 0.0 to 1.0, regardless of the *reduced* units means there will be 10 layers from 0.0 to 1.0, regardless of
current size or shape of the simulation box. the current size or shape of the simulation box.
The *bin/sphere* style defines a set of spherical shell bins around The *bin/sphere* style defines a set of spherical shell bins around
the origin (\ *xorig*,\ *yorig*,\ *zorig*\ ), using *nsbin* bins with radii the origin (\ *xorig*,\ *yorig*,\ *zorig*\ ), using *nsbin* bins with radii
equally spaced between *srmin* and *srmax*\ . This is effectively a 1d equally spaced between *srmin* and *srmax*\ . This is effectively a 1d
vector of bins. For example, if *srmin* = 1.0 and *srmax* = 10.0 and vector of bins. For example, if *srmin* = 1.0 and *srmax* = 10.0 and
*nsbin* = 9, then the first bin spans 1.0 < r < 2.0, and the last bin *nsbin* = 9, then the first bin spans :math:`1.0 < r < 2.0`, and the last bin
spans 9.0 < r 10.0. The geometry of the bins is the same whether the spans :math:`9.0 < r < 10.0`. The geometry of the bins is the same whether the
simulation box is orthogonal or triclinic; i.e. the spherical shells simulation box is orthogonal or triclinic (i.e., the spherical shells
are not tilted or scaled differently in different dimensions to are not tilted or scaled differently in different dimensions to
transform them into ellipsoidal shells. transform them into ellipsoidal shells).
The *bin/cylinder* style defines bins for a cylinder oriented along The *bin/cylinder* style defines bins for a cylinder oriented along
the axis *dim* with the axis coordinates in the other two radial the axis *dim* with the axis coordinates in the other two radial
dimensions at (\ *c1*,\ *c2*\ ). For dim = x, c1/c2 = y/z; for dim = y, dimensions at (\ *c1*,\ *c2*\ ). For dim = *x*, :math:`c_1/c_2 = y/z`;
c1/c2 = x/z; for dim = z, c1/c2 = x/y. This is effectively a 2d array for dim = *y*, :math:`c_1/c_2 = x/z`; for dim = *z*,
of bins. The first dimension is along the cylinder axis, the second :math:`c_1/c_2 = x/y`. This is effectively a 2d array of bins. The first
dimension is radially outward from the cylinder axis. The bin size dimension is along the cylinder axis, the second dimension is radially outward
and positions along the cylinder axis are specified by the *origin* from the cylinder axis. The bin size and positions along the cylinder axis are
and *delta* values, the same as for the *bin/1d*, *bin/2d*, and specified by the *origin* and *delta* values, the same as for the *bin/1d*,
*bin/3d* styles. There are *ncbin* concentric circle bins in the *bin/2d*, and *bin/3d* styles. There are *ncbin* concentric circle bins in the
radial direction from the cylinder axis with radii equally spaced radial direction from the cylinder axis with radii equally spaced
between *crmin* and *crmax*\ . For example, if *crmin* = 1.0 and between *crmin* and *crmax*\ . For example, if *crmin* = 1.0 and
*crmax* = 10.0 and *ncbin* = 9, then the first bin spans 1.0 < r < *crmax* = 10.0 and *ncbin* = 9, then the first bin spans :math:`1.0 < r < 2.0`
2.0, and the last bin spans 9.0 < r 10.0. The geometry of the bins in and the last bin spans :math:`9.0 < r < 10.0`. The geometry of the bins in
the radial dimensions is the same whether the simulation box is the radial dimensions is the same whether the simulation box is
orthogonal or triclinic; i.e. the concentric circles are not tilted or orthogonal or triclinic (i.e., the concentric circles are not tilted or
scaled differently in the two different dimensions to transform them scaled differently in the two different dimensions to transform them
into ellipses. into ellipses).
The created bins (and hence the chunk IDs) are numbered consecutively The created bins (and hence the chunk IDs) are numbered consecutively
from 1 to the number of bins = *Nchunk*\ . For *bin2d* and *bin3d*, the from 1 to the number of bins = *Nchunk*\ . For *bin2d* and *bin3d*, the
numbering varies most rapidly in the first dimension (which could be numbering varies most rapidly in the first dimension (which could be
x, y, or z), next rapidly in the second dimension, and most slowly in the *x*, *y*, or *z*), next rapidly in the second dimension, and most slowly in the
third dimension. For *bin/sphere*, the bin with smallest radii is chunk third dimension. For *bin/sphere*, the bin with smallest radii is chunk
1 and the bni with largest radii is chunk Nchunk = *ncbin*\ . For 1 and the bin with largest radii is chunk Nchunk = *ncbin*\ . For
*bin/cylinder*, the numbering varies most rapidly in the dimension *bin/cylinder*, the numbering varies most rapidly in the dimension
along the cylinder axis and most slowly in the radial direction. along the cylinder axis and most slowly in the radial direction.
@ -236,8 +237,8 @@ assigned to the atom.
---------- ----------
The *type* style uses the atom type as the chunk ID. *Nchunk* is set The *type* style uses the atom type as the chunk ID. *Nchunk* is set
to the number of atom types defined for the simulation, e.g. via the to the number of atom types defined for the simulation (e.g., via the
:doc:`create_box <create_box>` or :doc:`read_data <read_data>` commands. :doc:`create_box <create_box>` or :doc:`read_data <read_data>` commands).
---------- ----------
@ -264,8 +265,8 @@ on a quantity calculated and stored by a compute, fix, or variable.
In each case, it must be a per-atom quantity. In each case the In each case, it must be a per-atom quantity. In each case the
referenced floating point values are converted to an integer chunk ID referenced floating point values are converted to an integer chunk ID
as follows. The floating point value is truncated (rounded down) to as follows. The floating point value is truncated (rounded down) to
an integer value. If the integer value is <= 0, then a chunk ID of 0 an integer value. If the integer value is :math:`\le 0`, then a chunk ID of 0
is assigned to the atom. If the integer value is > 0, it becomes the is assigned to the atom. If the integer value is :math:`> 0`, it becomes the
chunk ID to the atom. *Nchunk* is set to the largest chunk ID. Note chunk ID to the atom. *Nchunk* is set to the largest chunk ID. Note
that this excludes atoms which are not in the specified group or that this excludes atoms which are not in the specified group or
optional region. optional region.
@ -362,7 +363,7 @@ If *limit* is set to *Nc* = 0, then no limit is imposed on *Nchunk*,
though the *compress* keyword can still be used to reduce *Nchunk*, as though the *compress* keyword can still be used to reduce *Nchunk*, as
described below. described below.
If *Nc* > 0, then the effect of the *limit* keyword depends on whether If *Nc* :math:`>` 0, then the effect of the *limit* keyword depends on whether
the *compress* keyword is also used with a setting of *yes*, and the *compress* keyword is also used with a setting of *yes*, and
whether the *compress* keyword is specified before the *limit* keyword whether the *compress* keyword is specified before the *limit* keyword
or after. or after.
@ -374,7 +375,7 @@ First, here is what occurs if *compress yes* is not set. If *limit*
is set to *Nc max*, then *Nchunk* is reset to the smaller of *Nchunk* is set to *Nc max*, then *Nchunk* is reset to the smaller of *Nchunk*
and *Nc*\ . If *limit* is set to *Nc exact*, then *Nchunk* is reset to and *Nc*\ . If *limit* is set to *Nc exact*, then *Nchunk* is reset to
*Nc*, whether the original *Nchunk* was larger or smaller than *Nc*\ . *Nc*, whether the original *Nchunk* was larger or smaller than *Nc*\ .
If *Nchunk* shrank due to the *limit* setting, then atom chunk IDs > If *Nchunk* shrank due to the *limit* setting, then atom chunk IDs :math:`>`
*Nchunk* will be reset to 0 or *Nchunk*, depending on the setting of *Nchunk* will be reset to 0 or *Nchunk*, depending on the setting of
the *discard* keyword. If *Nchunk* grew, there will simply be some the *discard* keyword. If *Nchunk* grew, there will simply be some
chunks with no atoms assigned to them. chunks with no atoms assigned to them.
@ -384,22 +385,22 @@ If *compress yes* is set, and the *compress* keyword comes before the
described below, which resets *Nchunk*\ . The *limit* keyword is then described below, which resets *Nchunk*\ . The *limit* keyword is then
applied to the new *Nchunk* value, exactly as described in the applied to the new *Nchunk* value, exactly as described in the
preceding paragraph. Note that in this case, all atoms will end up preceding paragraph. Note that in this case, all atoms will end up
with chunk IDs <= *Nc*, but their original values (e.g. molecule ID or with chunk IDs :math:`\le` *Nc*, but their original values (e.g., molecule ID
compute/fix/variable) may have been > *Nc*, because of the compression or compute/fix/variable) may have been :math:`>` *Nc*, because of the
operation. compression operation.
If *compress yes* is set, and the *compress* keyword comes after the If *compress yes* is set, and the *compress* keyword comes after the
*limit* keyword, then the *limit* value of *Nc* is applied first to *limit* keyword, then the *limit* value of *Nc* is applied first to
the uncompressed value of *Nchunk*, but only if *Nc* < *Nchunk* the uncompressed value of *Nchunk*, but only if *Nc* :math:`<` *Nchunk*
(whether *Nc max* or *Nc exact* is used). This effectively means all (whether *Nc max* or *Nc exact* is used). This effectively means all
atoms with chunk IDs > *Nc* have their chunk IDs reset to 0 or *Nc*, atoms with chunk IDs :math:`>` *Nc* have their chunk IDs reset to 0 or *Nc*,
depending on the setting of the *discard* keyword. The compression depending on the setting of the *discard* keyword. The compression
operation is then performed, which may shrink *Nchunk* further. If operation is then performed, which may shrink *Nchunk* further. If
the new *Nchunk* < *Nc* and *limit* = *Nc exact* is specified, then the new *Nchunk* :math:`<` *Nc* and *limit* = *Nc exact* is specified, then
*Nchunk* is reset to *Nc*, which results in extra chunks with no atoms *Nchunk* is reset to *Nc*, which results in extra chunks with no atoms
assigned to them. Note that in this case, all atoms will end up with assigned to them. Note that in this case, all atoms will end up with
chunk IDs <= *Nc*, and their original values (e.g. molecule ID or chunk IDs :math:`\le` *Nc*, and their original values (e.g., molecule ID or
compute/fix/variable value) will also have been <= *Nc*\ . compute/fix/variable value) will also have been :math:`\le` *Nc*\ .
---------- ----------
@ -601,7 +602,7 @@ be used. For non-orthogonal (triclinic) simulation boxes, only the
*reduced* option may be used. *reduced* option may be used.
A *box* value selects standard distance units as defined by the A *box* value selects standard distance units as defined by the
:doc:`units <units>` command, e.g. Angstroms for units = real or metal. :doc:`units <units>` command (e.g., Ångströms for units = *real* or *metal*).
A *lattice* value means the distance units are in lattice spacings. A *lattice* value means the distance units are in lattice spacings.
The :doc:`lattice <lattice>` command must have been previously used to The :doc:`lattice <lattice>` command must have been previously used to
define the lattice spacing. A *reduced* value means normalized define the lattice spacing. A *reduced* value means normalized
@ -615,8 +616,8 @@ scaled by the lattice spacing or reduced value of the *x* dimension.
Note that for the *bin/cylinder* style, the radii *crmin* and *crmax* Note that for the *bin/cylinder* style, the radii *crmin* and *crmax*
are scaled by the lattice spacing or reduced value of the first are scaled by the lattice spacing or reduced value of the first
dimension perpendicular to the cylinder axis. E.g. y for an x-axis dimension perpendicular to the cylinder axis (e.g., *y* for an *x*-axis
cylinder, x for a y-axis cylinder, and x for a z-axis cylinder. cylinder, *x* for a *y*-axis cylinder, and *x* for a *z*-axis cylinder).
---------- ----------

View File

@ -6,7 +6,7 @@ compute chunk/spread/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID chunk/spread/atom chunkID input1 input2 ... compute ID group-ID chunk/spread/atom chunkID input1 input2 ...

View File

@ -14,7 +14,7 @@ compute aggregate/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID cluster/atom cutoff compute ID group-ID cluster/atom cutoff
compute ID group-ID fragment/atom keyword value ... compute ID group-ID fragment/atom keyword value ...

View File

@ -6,7 +6,7 @@ compute cna/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID cna/atom cutoff compute ID group-ID cna/atom cutoff
@ -44,20 +44,22 @@ performed on mono-component systems.
The CNA calculation can be sensitive to the specified cutoff value. The CNA calculation can be sensitive to the specified cutoff value.
You should insure the appropriate nearest neighbors of an atom are You should insure the appropriate nearest neighbors of an atom are
found within the cutoff distance for the presumed crystal structure. found within the cutoff distance for the presumed crystal structure
E.g. 12 nearest neighbor for perfect FCC and HCP crystals, 14 nearest (e.g., 12 nearest neighbor for perfect FCC and HCP crystals, 14 nearest
neighbors for perfect BCC crystals. These formulas can be used to neighbors for perfect BCC crystals). These formulas can be used to
obtain a good cutoff distance: obtain a good cutoff distance:
.. math:: .. math::
r_{c}^{fcc} = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) \mathrm{a} \simeq 0.8536 \:\mathrm{a} \\ r_{c}^{\mathrm{fcc}} = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) a
r_{c}^{bcc} = & \frac{1}{2}(\sqrt{2} + 1) \mathrm{a} \simeq 1.207 \:\mathrm{a} \\ \approx 0.8536 a \\
r_{c}^{hcp} = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) \mathrm{a} r_{c}^{\mathrm{bcc}} = & \frac{1}{2}(\sqrt{2} + 1) a
\approx 1.207 a \\
r_{c}^{\mathrm{hcp}} = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) a
where a is the lattice constant for the crystal structure concerned where :math:`a` is the lattice constant for the crystal structure concerned
and in the HCP case, x = (c/a) / 1.633, where 1.633 is the ideal c/a and in the HCP case, :math:`x = (c/a) / 1.633`, where 1.633 is the ideal
for HCP crystals. :math:`c/a` for HCP crystals.
Also note that since the CNA calculation in LAMMPS uses the neighbors Also note that since the CNA calculation in LAMMPS uses the neighbors
of an owned atom to find the nearest neighbors of a ghost atom, the of an owned atom to find the nearest neighbors of a ghost atom, the

View File

@ -6,7 +6,7 @@ compute cnp/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID cnp/atom cutoff compute ID group-ID cnp/atom cutoff
@ -28,7 +28,7 @@ Define a computation that calculates the Common Neighborhood
Parameter (CNP) for each atom in the group. In solid-state systems Parameter (CNP) for each atom in the group. In solid-state systems
the CNP is a useful measure of the local crystal structure the CNP is a useful measure of the local crystal structure
around an atom and can be used to characterize whether the around an atom and can be used to characterize whether the
atom is part of a perfect lattice, a local defect (e.g. a dislocation atom is part of a perfect lattice, a local defect (e.g., a dislocation
or stacking fault), or at a surface. or stacking fault), or at a surface.
The value of the CNP parameter will be 0.0 for atoms not in the The value of the CNP parameter will be 0.0 for atoms not in the
@ -40,7 +40,7 @@ This parameter is computed using the following formula from
.. math:: .. math::
Q_{i} = \frac{1}{n_i}\sum_{j = 1}^{n_i} \left | \sum_{k = 1}^{n_{ij}} \vec{R}_{ik} + \vec{R}_{jk} \right | ^{2} Q_{i} = \frac{1}{n_i}\sum_{j = 1}^{n_i} \left\lVert \sum_{k = 1}^{n_{ij}} \vec{R}_{ik} + \vec{R}_{jk} \right\rVert^{2}
where the index *j* goes over the :math:`n_i` nearest neighbors of atom where the index *j* goes over the :math:`n_i` nearest neighbors of atom
*i*, and the index *k* goes over the :math:`n_{ij}` common nearest neighbors *i*, and the index *k* goes over the :math:`n_{ij}` common nearest neighbors
@ -58,13 +58,15 @@ obtain a good cutoff distance:
.. math:: .. math::
r_{c}^{fcc} = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) \mathrm{a} \simeq 0.8536 \:\mathrm{a} \\ r_{c}^{\mathrm{fcc}} = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) a
r_{c}^{bcc} = & \frac{1}{2}(\sqrt{2} + 1) \mathrm{a} \simeq 1.207 \:\mathrm{a} \\ \approx 0.8536 a \\
r_{c}^{hcp} = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) \mathrm{a} r_{c}^{\mathrm{bcc}} = & \frac{1}{2}(\sqrt{2} + 1) a
\approx 1.207 a \\
r_{c}^{\mathrm{hcp}} = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) a
where a is the lattice constant for the crystal structure concerned where :math:`a` is the lattice constant for the crystal structure concerned
and in the HCP case, x = (c/a) / 1.633, where 1.633 is the ideal c/a and in the HCP case, :math:`x = (c/a) / 1.633`, where 1.633 is the ideal
for HCP crystals. :math:`c/a` for HCP crystals.
Also note that since the CNP calculation in LAMMPS uses the neighbors Also note that since the CNP calculation in LAMMPS uses the neighbors
of an owned atom to find the nearest neighbors of a ghost atom, the of an owned atom to find the nearest neighbors of a ghost atom, the
@ -81,7 +83,7 @@ cutoff is the argument used with the compute cnp/atom command. LAMMPS
will issue a warning if this is not the case. will issue a warning if this is not the case.
The neighbor list needed to compute this quantity is constructed each The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (e.g. each time a snapshot of atoms time the calculation is performed (e.g., each time a snapshot of atoms
is dumped). Thus it can be inefficient to compute/dump this quantity is dumped). Thus it can be inefficient to compute/dump this quantity
too frequently or to have multiple compute/dump commands, each with a too frequently or to have multiple compute/dump commands, each with a
*cnp/atom* style. *cnp/atom* style.
@ -103,9 +105,9 @@ values:
BCC lattice = 0.0 BCC lattice = 0.0
HCP lattice = 4.4 HCP lattice = 4.4
FCC (111) surface ~ 13.0 FCC (111) surface = 13.0
FCC (100) surface ~ 26.5 FCC (100) surface = 26.5
FCC dislocation core ~ 11 FCC dislocation core = 11
Restrictions Restrictions
"""""""""""" """"""""""""

View File

@ -6,7 +6,7 @@ compute com command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID com compute ID group-ID com
@ -28,7 +28,7 @@ of atoms, including all effects due to atoms passing through periodic
boundaries. boundaries.
A vector of three quantities is calculated by this compute, which A vector of three quantities is calculated by this compute, which
are the x,y,z coordinates of the center of mass. are the :math:`(x,y,z)` coordinates of the center of mass.
.. note:: .. note::
@ -44,11 +44,11 @@ Output info
""""""""""" """""""""""
This compute calculates a global vector of length 3, which can be This compute calculates a global vector of length 3, which can be
accessed by indices 1-3 by any command that uses global vector values accessed by indices 1--3 by any command that uses global vector values
from a compute as input. See the :doc:`Howto output <Howto_output>` doc from a compute as input. See the :doc:`Howto output <Howto_output>` doc
page for an overview of LAMMPS output options. page for an overview of LAMMPS output options.
The vector values are "intensive". The vector values will be in The vector values are "intensive." The vector values will be in
distance :doc:`units <units>`. distance :doc:`units <units>`.
Restrictions Restrictions

View File

@ -10,7 +10,7 @@ compute centroid/stress/atom command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID style temp-ID keyword ... compute ID group-ID style temp-ID keyword ...

View File

@ -10,7 +10,7 @@ Syntax
dihedral_style style dihedral_style style
* style = *none* or *hybrid* or *charmm* or *class2* or *harmonic* or *helix* or *multi/harmonic* or *opls* * style = *none* or *zero* or *hybrid* or *charmm* or *charmmfsw* or *class2* or *osine/shift/exp* or *fourier* or *harmonic* or *helix* or *multi/harmonic* or *nharmonic* or *opls* or *spherical* or *table* or *table/cut*
Examples Examples
"""""""" """"""""