Skip to content

Commit 1632169

Browse files
committed
keep applying reviewers commentaries
1 parent 9008bdb commit 1632169

File tree

4 files changed

+37
-10
lines changed

4 files changed

+37
-10
lines changed

docs/sphinx/source/tutorial2/introduction.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ by imposing a constant velocity on the edge atoms. To illustrate the
1616
difference between conventional and reactive force fields, this tutorial
1717
is divided into two parts: in the first part, a conventional molecular
1818
force field (called OPLS-AA :cite:`jorgensenDevelopmentTestingOPLS1996`)
19-
is used and the bonds between the atoms of the CNT are unbreakable. In
19+
is used and the form of the bonded potential ensure that the bonds between the
20+
atoms of the CNT are unbreakable. In
2021
the second part, a reactive force field (called AIREBO :cite:`stuart2000reactive`)
2122
is used, which allows chemical bonds to break under large strain.

docs/sphinx/source/tutorial2/tutorial.rst

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Unbreakable bonds
33

44
With most conventional molecular force fields, the chemical bonds between
55
atoms are defined at the start of the simulation and remain fixed, regardless
6-
of the forces applied to the atoms. These bonds are typically modeled as springs
6+
of the forces applied to the atoms. In this tutorial, these bonds are
7+
explicitly specified in the **.data** file, which is read using the ``read_data`` command (see below).
8+
Bonds are typically modeled as springs
79
with equilibrium distances :math:`r_0` and force constants :math:`k_\text{b}`:
810
:math:`U_\text{b} = k_\text{b} \left( r - r_0 \right)^2`. Additionally, angular and
911
dihedral constraints are often imposed to preserve the molecular structure
@@ -48,7 +50,7 @@ the scripts required for the second part of the tutorial.
4850
file in a text editor of your choice, and copy the previous lines into it.
4951

5052
The chosen unit system is ``real`` (therefore distances are in
51-
Ångströms (Å), times in femtoseconds (fs), and energies in kcal/mol), the
53+
Ångströms (Å), times in femtoseconds (fs), and energies in (kcal/mol)), the
5254
``atom_style`` is ``molecular`` (therefore atoms are point
5355
particles that can form bonds with each other), and the boundary
5456
conditions are fixed. The boundary conditions do not matter here, as
@@ -64,8 +66,8 @@ potential.
6466
The ``bond_style``, ``angle_style``, ``dihedral_style``, and ``improper_style``
6567
commands specify the different potentials used to constrain the relative
6668
positions of the atoms. The ``special_bonds`` command sets the weighting factors
67-
for the Lennard-Jones interactions between atoms directly connected by
68-
one bond, two bonds, and three bonds, respectively. This is done for
69+
for the Lennard-Jones interactions between atoms sitting one,
70+
two, or three bonds away from each other, respectively. This is done for
6971
convenience when parameterizing the force constants for bonds, angles, and
7072
so on. By excluding the non-bonded (Lennard-Jones) interactions for
7173
these pairs, those interactions do not need to be considered when determining
@@ -174,7 +176,9 @@ just before the ``run 0`` command:
174176
set group cnt_mid mol 3
175177
176178
With the three ``set`` commands, we assign unique, otherwise unused
177-
molecule IDs to atoms in those three groups. We will use this IDs later to
179+
molecule IDs to atoms in those three groups. A molecule ID is an
180+
integer that groups atoms into a *molecule* for bookkeeping purposes, and can be
181+
useful for tracking and post-processing. We will use this IDs later to
178182
assign different colors to these groups of atoms.
179183

180184
Run the simulation using LAMMPS. The number of atoms in each group is given in
@@ -235,6 +239,14 @@ The ``fix nve`` commands are applied to the atoms of ``cnt_top`` and
235239
from these groups are recalculated at every step. The ``fix nvt`` does the
236240
same for the ``cnt_mid`` group, while also applying a Nosé-Hoover thermostat
237241
with desired temperature of 300 K :cite:`nose1984unified, hoover1985canonical`.
242+
243+
.. admonition:: Note
244+
:class: non-title-info
245+
246+
The Nosé-Hoover thermostat only controls the temperature of
247+
the atoms belonging to the specified ``cnt_mid`` group. Atoms outside
248+
this group are not affected by the thermostat.
249+
238250
To restrain the motion of the atoms at the edges, let us add the following
239251
commands to **unbreakable.lmp**:
240252

@@ -248,7 +260,10 @@ commands to **unbreakable.lmp**:
248260
The two ``setforce`` commands cancel the forces applied on the atoms of the
249261
two edges, respectively. The cancellation of the forces is done at every step,
250262
and along all 3 directions of space, :math:`x`, :math:`y`, and :math:`z`, due to the use of
251-
``0 0 0``. The two ``velocity`` commands set the initial velocities
263+
``0 0 0``. Although the forces on these atoms is set to zero,
264+
the ``fix`` still stores the forces acting on the group before
265+
cancellation, which can later be extracted for analysis (see below).
266+
The two ``velocity`` commands set the initial velocities
252267
along :math:`x`, :math:`y`, and :math:`z` to 0 for the atoms of ``cnt_top`` and
253268
``cnt_bot``, respectively. As a consequence of these last four commands,
254269
the atoms of the edges will remain immobile during the simulation (or at least

docs/sphinx/source/tutorial3/tutorial.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ Add the following line into **water.lmp**:
151151
The ``fix npt`` allows us to impose both a temperature of :math:`300\,\text{K}`
152152
(with a damping constant of :math:`100\,\text{fs}`), and a pressure of 1 atmosphere
153153
(with a damping constant of :math:`1000\,\text{fs}`). With the ``iso`` keyword,
154-
the three dimensions of the box will be re-scaled simultaneously.
154+
the three dimensions of the box will be re-scaled isotropically,
155+
maintaining the same proportion in all directions.
155156

156157
Let us output the system into images by adding the following commands to **water.lmp**:
157158

docs/sphinx/source/tutorial4/tutorial.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ file in a text editor of your choice, and copy the following into it:
3232
The editor should display the following content corresponding to **create.lmp**
3333

3434
These lines are used to define the most basic parameters, including the
35-
atom, bond, and angle styles, as well as interaction
35+
atom, bond, and angle styles, as well as the non-bonded interaction
3636
potential. Here, ``lj/cut/tip4p/long`` imposes a Lennard-Jones potential with
3737
a cut-off at :math:`12\,\text{Å}` and a long-range Coulomb potential.
3838
The parameters ``O``, ``H``, ``O-H``, and ``H-O-H`` correspond
@@ -217,7 +217,7 @@ the force constant of the angular harmonic potential to 0 and the equilibrium
217217
angle to :math:`104.52^\circ`.
218218

219219
Alongside **parameters.inc**, the **groups.inc** file contains
220-
several ``group`` commands to selects atoms based on their types:
220+
several ``group`` commands to define groups of atoms based on their types:
221221

222222
.. code-block:: lammps
223223
@@ -334,6 +334,16 @@ used to apply a restraint force when used during minimization. This last keywor
334334
here, because the spring constants of the rigid water molecules were set
335335
to 0 (see the **parameters.inc** file).
336336

337+
.. admonition:: Note
338+
:class: non-title-info
339+
340+
LAMMPS provides several ways to maintain molecules rigid during a simulation.
341+
The ``fix shake`` command is appropriate for constraining bond lengths
342+
and angles within small molecules like water.
343+
However, it may fail for linear molecules like :math:`\text{CO}_2` or more complex rigid bodies.
344+
In such cases, the ``fix rigid`` family of commands can be used instead to
345+
treat entire molecules or groups of atoms as rigid bodies.
346+
337347
Let us also create images of the system and control
338348
the printing of thermodynamic outputs by adding the following lines
339349
to **equilibrate.lmp**:

0 commit comments

Comments
 (0)