Skip to content

Commit b8700e0

Browse files
committed
deploy: 02618ec
1 parent 824481f commit b8700e0

File tree

12 files changed

+91
-41
lines changed

12 files changed

+91
-41
lines changed
0 Bytes
Binary file not shown.
-38 Bytes
Binary file not shown.
2.43 KB
Binary file not shown.
2.43 KB
Binary file not shown.

sphinx/build/html/_sources/non-tutorials/scope.rst.txt

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

sphinx/build/html/_sources/tutorial7/tutorial.rst.txt

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

sphinx/build/html/non-tutorials/scope.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@
291291
measured. This tutorial also demonstrates the use of an external tool
292292
to visualize breaking bonds, and show the possibility to import
293293
LAMMPS-generated YAML log files into Python.</p>
294-
<p>In <a class="reference internal" href="../tutorial3/polymer-in-water.html#all-atoms-label"><span class="std std-ref">Polymer in water</span></a>, two componentstextemdash liquid water
295-
(flexible three-point model) and a polymer moleculetextemdash are merged and
294+
<p>In <a class="reference internal" href="../tutorial3/polymer-in-water.html#all-atoms-label"><span class="std std-ref">Polymer in water</span></a>, two component - liquid water
295+
(flexible three-point model) and a polymer molecule - are merged and
296296
equilibrated. A long-range solver is used to handle the electrostatic
297297
interactions accurately, and the system is equilibrated in the
298298
isothermal-isobaric (NPT) ensemble; then, a stretching force is applied

sphinx/build/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx/build/html/tutorial7/free-energy-calculation.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ <h3>System creation and settings<a class="headerlink" href="#system-creation-and
427427
<span class="k">fix </span><span class="nv nv-Identifier">myadf</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">addforce</span><span class="w"> </span><span class="n">v_F</span><span class="w"> </span><span class="m">0.0</span><span class="w"> </span><span class="m">0.0</span><span class="w"> </span><span class="n">energy</span><span class="w"> </span><span class="n">v_U</span>
428428
</pre></div>
429429
</div>
430-
<p>Next, we combine the <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">nve</span></code> with a <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">langevin</span></code> thermostat:</p>
430+
<p>Next, we use the Newtonian equations of motion with
431+
a Langevin thermostat by combining the <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">nve</span></code> with a
432+
<code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">langevin</span></code> command:</p>
431433
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">fix </span><span class="nv nv-Identifier">mynve</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">nve</span>
432434
<span class="k">fix </span><span class="nv nv-Identifier">mylgv</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">langevin</span><span class="w"> </span><span class="m">119.8</span><span class="w"> </span><span class="m">119.8</span><span class="w"> </span><span class="m">500</span><span class="w"> </span><span class="m">30917</span>
433435
</pre></div>
@@ -436,6 +438,12 @@ <h3>System creation and settings<a class="headerlink" href="#system-creation-and
436438
in the NVT ensemble, maintaining a constant number of
437439
atoms <span class="math notranslate nohighlight">\(N\)</span>, constant volume <span class="math notranslate nohighlight">\(V\)</span>, and a temperature <span class="math notranslate nohighlight">\(T\)</span> that
438440
fluctuates around a target value.</p>
441+
<div class="non-title-info admonition">
442+
<p class="admonition-title">Note</p>
443+
<p>LAMMPS documentation suggests using damping constants for thermostats that
444+
are approximately 100 times the timestep value. In this case, a value of
445+
500 is used, resulting in a relatively weak coupling to the thermostat.</p>
446+
</div>
439447
<p>To ensure that the equilibration time is sufficient, we will track the evolution of
440448
the number of atoms in the central - energetically unfavorable - region,
441449
referred to as <code class="docutils literal notranslate"><span class="pre">mymes</span></code>, using the <code class="docutils literal notranslate"><span class="pre">n_center</span></code> variable:</p>
@@ -496,7 +504,7 @@ <h3>Run and data acquisition<a class="headerlink" href="#run-and-data-acquisitio
496504
<p>Here, the <code class="docutils literal notranslate"><span class="pre">chunk/atom</span></code> command discretizes the simulation
497505
domain into spatial bins of size 2~AA{} along the <span class="math notranslate nohighlight">\(x\)</span> direction,
498506
and the <code class="docutils literal notranslate"><span class="pre">ave/chunk</span></code> command computes and outputs the number density of
499-
atoms within each bin to the file <strong>free-sampling.dat</strong>.}
507+
atoms within each bin to the file <strong>free-sampling.dat</strong>.
500508
The step count is reset to 0 using <code class="docutils literal notranslate"><span class="pre">reset_timestep</span></code> to synchronize it
501509
with the output times of <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">density/number</span></code>. Run the simulation using
502510
LAMMPS.</p>
@@ -521,7 +529,7 @@ <h3>Data analysis<a class="headerlink" href="#data-analysis" title="Link to this
521529
is the the density ratio, and compare it
522530
with the imposed potential <span class="math notranslate nohighlight">\(U\)</span> from Eq. <a class="reference internal" href="tutorial.html#equation-eq-u">(2)</a>.
523531
The reference density, <span class="math notranslate nohighlight">\(\rho_\text{bulk} = 0.0009~\text{Å}^{-3}\)</span>,
524-
was estimated by measuring the density of the reservoir from the raw density
532+
was estimated by measuring the density of the reservoir from the density
525533
profiles. The agreement between the MD results and the imposed energy profile
526534
is excellent, despite some noise in the central part, where fewer data points
527535
are available due to the repulsive potential.</p>
@@ -542,8 +550,8 @@ <h3>Data analysis<a class="headerlink" href="#data-analysis" title="Link to this
542550
<section id="the-limits-of-free-sampling">
543551
<h3>The limits of free sampling<a class="headerlink" href="#the-limits-of-free-sampling" title="Link to this heading"></a></h3>
544552
<p>Increasing the value of <span class="math notranslate nohighlight">\(U_0\)</span> reduces the average number of atoms in the central
545-
region, making it difficult to achieve a high-resolution free energy profile.
546-
For example, running the same simulation with <span class="math notranslate nohighlight">\(U_0 = 10 \epsilon\)</span>,
553+
region, making it difficult to achieve a high-resolution free energy profile
554+
within reasonable simulation times. For example, running the same simulation with <span class="math notranslate nohighlight">\(U_0 = 10 \epsilon\)</span>,
547555
corresponding to <span class="math notranslate nohighlight">\(U_0 \approx 10 k_\text{B} T\)</span>, results in no atoms exploring
548556
the central part of the simulation box during the simulation.
549557
In such a case, employing an enhanced sampling method is recommended, as done in the next section.</p>
@@ -632,7 +640,7 @@ <h3>LAMMPS input script<a class="headerlink" href="#lammps-input-script" title="
632640
of type 2. Particles of types 1 and 2 are identical, with the same mass
633641
and LJ parameters. However, the particle of type 2 will also
634642
be exposed to the biasing potential <span class="math notranslate nohighlight">\(V\)</span>, which forces it to explore the
635-
central part of the box.</p>
643+
central part of the box, thus justifying the definition of two atom types.</p>
636644
<p>Now, we create a loop with 15 steps and progressively move the center of the
637645
bias potential by increments of 0.4 nm. Add the following lines to <strong>umbrella-sampling.lmp</strong>:</p>
638646
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">variable </span><span class="nv nv-Identifier">a</span><span class="w"> </span><span class="n">loop</span><span class="w"> </span><span class="m">15</span>
@@ -652,9 +660,13 @@ <h3>LAMMPS input script<a class="headerlink" href="#lammps-input-script" title="
652660
<span class="k">jump </span><span class="sc">SELF</span><span class="w"> </span><span class="n">loop</span>
653661
</pre></div>
654662
</div>
655-
<p>The <code class="docutils literal notranslate"><span class="pre">spring</span></code> command imposes the additional harmonic potential <span class="math notranslate nohighlight">\(V\)</span> with
656-
the previously defined spring constant <span class="math notranslate nohighlight">\(k\)</span>. The center of the harmonic
657-
potential, <span class="math notranslate nohighlight">\(x_\text{des}\)</span>, successively takes values
663+
<p>The definition of a variable of loop style serves the same purpose as in
664+
<a class="reference internal" href="../tutorial5/reactive-silicon-dioxide.html#reactive-silicon-dioxide-label"><span class="std std-ref">Reactive silicon dioxide</span></a>, and we highlight here the particular
665+
utility of using its value to distinguish the files written by the
666+
fix <code class="docutils literal notranslate"><span class="pre">ave_time</span></code> command for the different bias potentials.
667+
The <code class="docutils literal notranslate"><span class="pre">spring</span></code> command imposes the additional harmonic potential <span class="math notranslate nohighlight">\(V\)</span> with
668+
the previously defined spring constant <span class="math notranslate nohighlight">\(k\)</span> to the atoms in the group <code class="docutils literal notranslate"><span class="pre">pull</span></code>.
669+
The center of the harmonic potential, <span class="math notranslate nohighlight">\(x_\text{des}\)</span>, successively takes values
658670
from <span class="math notranslate nohighlight">\(-28\,\text{Å}\)</span> to <span class="math notranslate nohighlight">\(28\,\text{Å}\)</span>. For each value of <span class="math notranslate nohighlight">\(x_\text{des}\)</span>,
659671
an equilibration step of 40 ps is performed, followed by a step
660672
of 400 ps during which the position of the particle of

0 commit comments

Comments
 (0)