Skip to content

Commit 02618ec

Browse files
committed
ensured consistency of tutorial 7
1 parent 6a95a5b commit 02618ec

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

docs/sphinx/source/non-tutorials/scope.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ measured. This tutorial also demonstrates the use of an external tool
2828
to visualize breaking bonds, and show the possibility to import
2929
LAMMPS-generated YAML log files into Python.
3030

31-
In :ref:`all-atoms-label`, two components\textemdash liquid water
32-
(flexible three-point model) and a polymer molecule\textemdash are merged and
31+
In :ref:`all-atoms-label`, two component - liquid water
32+
(flexible three-point model) and a polymer molecule - are merged and
3333
equilibrated. A long-range solver is used to handle the electrostatic
3434
interactions accurately, and the system is equilibrated in the
3535
isothermal-isobaric (NPT) ensemble; then, a stretching force is applied

docs/sphinx/source/tutorial7/tutorial.rst

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ lines to **free-sampling.lmp**:
140140
variable F atom ${U0}/((x-${x0})^2/${dlt}^2+1)/${dlt}-${U0}/((x+${x0})^2/${dlt}^2+1)/${dlt}
141141
fix myadf all addforce v_F 0.0 0.0 energy v_U
142142
143-
Next, we combine the ``fix nve`` with a ``fix langevin`` thermostat:
143+
Next, we use the Newtonian equations of motion with
144+
a Langevin thermostat by combining the ``fix nve`` with a
145+
``fix langevin`` command:
144146

145147
.. code-block:: lammps
146148
@@ -152,6 +154,13 @@ in the NVT ensemble, maintaining a constant number of
152154
atoms :math:`N`, constant volume :math:`V`, and a temperature :math:`T` that
153155
fluctuates around a target value.
154156

157+
.. admonition:: Note
158+
:class: non-title-info
159+
160+
LAMMPS documentation suggests using damping constants for thermostats that
161+
are approximately 100 times the timestep value. In this case, a value of
162+
500 is used, resulting in a relatively weak coupling to the thermostat.
163+
155164
To ensure that the equilibration time is sufficient, we will track the evolution of
156165
the number of atoms in the central - energetically unfavorable - region,
157166
referred to as ``mymes``, using the ``n_center`` variable:
@@ -224,7 +233,7 @@ Add the following line to **free-sampling.lmp**:
224233
Here, the ``chunk/atom`` command discretizes the simulation
225234
domain into spatial bins of size 2~\AA{} along the :math:`x` direction,
226235
and the ``ave/chunk`` command computes and outputs the number density of
227-
atoms within each bin to the file **free-sampling.dat**.}
236+
atoms within each bin to the file **free-sampling.dat**.
228237
The step count is reset to 0 using ``reset_timestep`` to synchronize it
229238
with the output times of ``fix density/number``. Run the simulation using
230239
LAMMPS.
@@ -253,7 +262,7 @@ Next, we plot :math:`-R T \ln(\rho/\rho_\mathrm{bulk})`, where :math:`\rho/\rho_
253262
is the the density ratio, and compare it
254263
with the imposed potential :math:`U` from Eq. :eq:`eq_U`.
255264
The reference density, :math:`\rho_\text{bulk} = 0.0009~\text{Å}^{-3}`,
256-
was estimated by measuring the density of the reservoir from the raw density
265+
was estimated by measuring the density of the reservoir from the density
257266
profiles. The agreement between the MD results and the imposed energy profile
258267
is excellent, despite some noise in the central part, where fewer data points
259268
are available due to the repulsive potential.
@@ -278,8 +287,8 @@ The limits of free sampling
278287
---------------------------
279288

280289
Increasing the value of :math:`U_0` reduces the average number of atoms in the central
281-
region, making it difficult to achieve a high-resolution free energy profile.
282-
For example, running the same simulation with :math:`U_0 = 10 \epsilon`,
290+
region, making it difficult to achieve a high-resolution free energy profile
291+
within reasonable simulation times. For example, running the same simulation with :math:`U_0 = 10 \epsilon`,
283292
corresponding to :math:`U_0 \approx 10 k_\text{B} T`, results in no atoms exploring
284293
the central part of the simulation box during the simulation.
285294
In such a case, employing an enhanced sampling method is recommended, as done in the next section.
@@ -381,7 +390,7 @@ So far, our code resembles that of Method 1, except for the additional particle
381390
of type 2. Particles of types 1 and 2 are identical, with the same mass
382391
and LJ parameters. However, the particle of type 2 will also
383392
be exposed to the biasing potential :math:`V`, which forces it to explore the
384-
central part of the box.
393+
central part of the box, thus justifying the definition of two atom types.
385394

386395
..
387396
TOFIX: Add a figure with one single particle exploring the central part of the system.
@@ -412,9 +421,13 @@ bias potential by increments of 0.4 nm. Add the following lines to **umbrella-s
412421
next a
413422
jump SELF loop
414423
424+
The definition of a variable of loop style serves the same purpose as in
425+
:ref:`reactive-silicon-dioxide-label`, and we highlight here the particular
426+
utility of using its value to distinguish the files written by the
427+
fix ``ave_time`` command for the different bias potentials.
415428
The ``spring`` command imposes the additional harmonic potential :math:`V` with
416-
the previously defined spring constant :math:`k`. The center of the harmonic
417-
potential, :math:`x_\text{des}`, successively takes values
429+
the previously defined spring constant :math:`k` to the atoms in the group ``pull``.
430+
The center of the harmonic potential, :math:`x_\text{des}`, successively takes values
418431
from :math:`-28\,\text{Å}` to :math:`28\,\text{Å}`. For each value of :math:`x_\text{des}`,
419432
an equilibration step of 40 ps is performed, followed by a step
420433
of 400 ps during which the position of the particle of

0 commit comments

Comments
 (0)