Skip to content

Commit d35ea64

Browse files
committed
ensured consistency of tutorial 5
1 parent b170970 commit d35ea64

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

docs/sphinx/source/tutorial5/tutorial.rst

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ and a **.data** file is imported by the ``read_data`` command.
3030
.. include:: ../shared/needhelp.rst
3131

3232
The initial topology given by |silica_data_5|
33-
is a small amorphous silica structure. This structure was generated in a prior
33+
corresponds to a small amorphous silica structure. This structure was generated in a prior
3434
simulation using the Vashishta force field :cite:`vashishta1990interaction`.
3535
If you open the **silica.data**
3636
file, you will find in the ``Atoms`` section that all silicon atoms have a
@@ -46,7 +46,7 @@ charge of :math:`q = 1.1\,\text{e}`, and all oxygen atoms have a charge of :math
4646
Assigning the same charge to all atoms of the same type is common with many
4747
force fields, including the force fields used in the previous tutorials. This
4848
changes once ReaxFF is used: the charge of each atom will adjust to its local
49-
environment.
49+
environment through charge equilibration.
5050

5151
Next, copy the following three crucial lines into the **relax.lmp** file:
5252

@@ -56,7 +56,7 @@ Next, copy the following three crucial lines into the **relax.lmp** file:
5656
pair_coeff * * ffield.reax.CHOFe Si O
5757
fix myqeq all qeq/reaxff 1 0.0 10.0 1.0e-6 reaxff maxiter 400
5858
59-
In this case, the ``pair_style reaxff`` is used without a control file. The
59+
In this case, the ``pair_style reaxff`` is used without a control file (see note below). The
6060
``safezone`` and ``mincap`` keywords are added to prevent
6161
allocation issues, which sometimes can trigger segmentation faults and
6262
``bondchk`` errors. The ``pair_coeff`` command uses the |reaxCHOFe_inc_5|
@@ -94,7 +94,11 @@ evolution of the charges during the simulation:
9494
variable qO equal charge(grpO)/count(grpO)
9595
variable vq atom q
9696
97-
To print the averaged charges ``qSi`` and ``qO`` using the
97+
The definition of the equal style variables qSi and qO make
98+
use of functions pre-defined within LAMMPS that allow
99+
calculating the total charge of atoms belonging to a group
100+
(``charge()``) and the total number of atoms in the group
101+
(``count()``). To print the averaged charges ``qSi`` and ``qO`` using the
98102
``thermo_style`` command, and create images of the system. Add the
99103
following lines to **relax.lmp**:
100104

@@ -158,7 +162,7 @@ density of the system:
158162
159163
run 5000
160164
161-
write_data relax.data
165+
write_data relax.data nofix
162166
163167
.. admonition:: Note
164168
:class: non-title-info
@@ -167,6 +171,8 @@ density of the system:
167171
box can change independently. This is particularly relevant for solids and other
168172
systems where anisotropic stresses may develop.
169173

174+
The ``write_data`` command is used with the nofix keyword to print a data file
175+
without extra sections from the ``reaxff/species`` command.
170176
Run the **relax.lmp** file using LAMMPS. As seen from **relax.species**,
171177
only one species is detected, called ``O384Si192``, representing the entire system.
172178

@@ -284,7 +290,7 @@ the following line to **deform.lmp**:
284290
285291
run 25000
286292
287-
write_data deform.data
293+
write_data deform.data nofix
288294
289295
The ``fix deform`` command applies a continuous deformation
290296
by elongating the simulation box along the x-axis at a constant engineering
@@ -406,10 +412,12 @@ types of atoms, and output the charge values into log files:
406412
407413
fix myspec all reaxff/species 5 1 5 decorate.species element Si O H
408414
415+
416+
The commands above are, once again, similar to the ones of the previous script.
409417
Here, the :math:`+1 \mathrm{e}{-10}` was added to the denominator of the ``variable qH``
410-
to avoid dividing by 0 at the beginning of the simulation. Finally, let us
411-
create a loop with 10 steps, and create two hydrogen atoms at random locations at
412-
every step:
418+
to avoid dividing by 0 at the beginning of the simulation, as no hydrogen atoms exists in
419+
the simulation domain yet. Finally, let us create a loop with 10 steps, and
420+
create two hydrogen atoms at random locations at every step:
413421

414422
.. code-block:: lammps
415423

0 commit comments

Comments
 (0)