Skip to content

Commit 824481f

Browse files
committed
deploy: 6a95a5b
1 parent 1d46591 commit 824481f

File tree

12 files changed

+107
-81
lines changed

12 files changed

+107
-81
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.
Binary file not shown.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ types of atoms, and output the charge values into log files:
412412
413413
fix myspec all reaxff/species 5 1 5 decorate.species element Si O H
414414
415-
416415
The commands above are, once again, similar to the ones of the previous script.
417416
Here, the :math:`+1 \mathrm{e}{-10}` was added to the denominator of the ``variable qH``
418417
to avoid dividing by 0 at the beginning of the simulation, as no hydrogen atoms exists in

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

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ Add the following lines to **generate.lmp**:
3636
create_atoms Si random 240 5802 box overlap 2.0 maxtry 500
3737
create_atoms O random 480 1072 box overlap 2.0 maxtry 500
3838
39-
The ``create_atoms`` commands are used to place
39+
In line with what is done in previous tutorials, the
40+
``create_atoms`` commands are used to place
4041
240 Si atoms and 480 O atoms, respectively. This corresponds to
4142
an initial density of approximately :math:`2 \, \text{g/cm}^3`, which is close
4243
to the expected final density of amorphous silica at 300 K.
4344

44-
Now, specify the pair coefficients by indicating that the first atom type
45+
Now, specify the potential parameters by indicating that the first atom type
4546
is ``Si`` and the second is ``O``:
4647

4748
.. code-block:: lammps
@@ -103,6 +104,9 @@ to :math:`T = 300\,\text{K}`, is implemented as follows:
103104
fix mynvt all nvt temp 6000 300 0.1
104105
run 30000
105106
107+
In this case, the initial and final target temperatures set for
108+
the Nosé-Hoover thermostat is different, causing it to evolve
109+
linearly within the number of timesteps evoked in the ``run`` command.
106110
In the third step, the system is equilibrated at the final desired
107111
conditions, :math:`T = 300\,\text{K}` and :math:`p = 1\,\text{atm}`,
108112
using an anisotropic pressure coupling:
@@ -116,15 +120,16 @@ using an anisotropic pressure coupling:
116120
117121
write_data generate.data
118122
119-
Here, an anisotropic barostat is used.
120-
Anisotropic barostats adjust the dimensions independently, which is
123+
Here, an anisotropic barostat is used. As previously mentioned,
124+
anisotropic barostats adjust the dimensions independently, which is
121125
generally suitable for a solid phase.
122126

123127
Run the simulation using LAMMPS. From the ``Charts`` window, the temperature
124128
evolution can be observed, showing that it closely follows the desired annealing procedure.
125129
The evolution of the box dimensions over time confirms that the box is deforming during the
126-
last stage of the simulation. After the simulation completes, the final LAMMPS topology
127-
file called **generate.data** will be located next to **generate.lmp**.
130+
last stage of the simulation. After the simulation completes, the final
131+
microstate attained during the dynamics and the system topology will be written to a LAMMPS data
132+
file called **generate.data** which will be located next to **generate.lmp**.
128133

129134
.. figure:: figures/GCMC-dimension-dm.png
130135
:class: only-dark
@@ -184,7 +189,7 @@ the **cracking.lmp** file:
184189
185190
write_data cracking.data
186191
187-
The ``fix nvt`` command integrates the Nosé-Hoover equations
192+
As discussed, the ``fix nvt`` command integrates the Nosé-Hoover equations
188193
of motion and is employed to control the temperature of the system.
189194
As observed from the generated images, the atoms
190195
progressively adjust to the changing box dimensions. At some point,
@@ -217,20 +222,21 @@ Adding water
217222

218223
To add the water molecules to the silica, we will employ the Monte Carlo
219224
method in the grand canonical ensemble (GCMC). In short, the system is
220-
placed into contact with a virtual reservoir of a given chemical
221-
potential :math:`\mu`, and multiple attempts to insert water molecules at
222-
random positions are made. Each attempt is either accepted or rejected
223-
based on energy considerations. For further details, please refer to
224-
classical textbooks like Ref. :cite:`frenkel2023understanding`.
225+
placed into contact with a virtual reservoir containing pure water at a given
226+
thermodynamic state, and multiple attempts to insert water molecules at
227+
random positions are made. In the grand
228+
canonical ensemble, each attempt is either accepted or rejected
229+
based on internal energy and chemical potential considerations. For further
230+
details, please refer to classical textbooks like Ref. :cite:`frenkel2023understanding`.
225231

226232
Adapting the pair style
227233
-----------------------
228234

229235
For this next step, we need to specify the force field used to
230236
model the interactions in the system. The TIP4P/2005 model is employed
231237
for the water :cite:`abascal2005general`, while no interaction within
232-
silica is defined, as it will be seen farther below. This is be-
233-
cause atoms of the silica will remain frozen during this part of the simulation.
238+
silica is defined, as it will be seen farther below. This is because atoms of
239+
the silica will remain frozen during this part of the simulation.
234240
Only the cross-interactions between water and silica need
235241
to be defined. Create a new file called **gcmc.lmp**, and copy the following
236242
lines into it:
@@ -344,8 +350,8 @@ We can now proceed to complete the **gcmc.lmp** file by adding the system defini
344350
After reading the data file and defining the ``h2omol`` molecule from the **H2O.mol**
345351
file, the ``create_atoms`` command is used to include three water molecules
346352
in the system. Then, add the following ``pair_coeff`` (and
347-
``bond_coeff`` and ``angle_coeff``) commands
348-
to **gcmc.lmp**:
353+
``bond_coeff`` and ``angle_coeff``) commands to **gcmc.lmp**
354+
in order to set the potential parameters:
349355

350356
.. code-block:: lammps
351357
@@ -357,7 +363,7 @@ to **gcmc.lmp**:
357363
bond_coeff OW-HW 0 0.9572
358364
angle_coeff HW-OW-HW 0 104.52
359365
360-
Pair coefficients for the ``lj/cut/tip4p/long``
366+
Pair coefficients for the ``lj/cut/tip4p/long`` pair style
361367
potential are defined between O(:math:`\text{H}_2\text{O}`) and between H(:math:`\text{H}_2\text{O}`)
362368
atoms, as well as between O(:math:`\text{SiO}_2`)-O(:math:`\text{H}_2\text{O}`) and
363369
Si(:math:`\text{SiO}_2`)-O(:math:`\text{H}_2\text{O}`). Thus, the fluid-fluid and the
@@ -393,8 +399,9 @@ Add the following lines to **gcmc.lmp** as well:
393399
their properties or types.
394400

395401
The number of oxygen atoms from water molecules (i.e. the number of molecules)
396-
is calculated by the ``nO`` variable. The SHAKE algorithm is used to
397-
maintain the shape of the water molecules over time :cite:`ryckaert1977numerical, andersen1983rattle`.
402+
is calculated by the ``nO`` variable. As already discussed in other tutorials,
403+
the SHAKE algorithm is used to maintain the shape of the water molecules
404+
over time :cite:`ryckaert1977numerical, andersen1983rattle`.
398405

399406
Finally, let us create images
400407
of the system using ``dump image``:

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/tutorial6/tutorial.html

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,12 @@ <h1>Generation of the silica block<a class="headerlink" href="#generation-of-the
302302
<span class="k">create_atoms</span><span class="w"> </span><span class="n">O</span><span class="w"> </span><span class="n">random</span><span class="w"> </span><span class="m">480</span><span class="w"> </span><span class="m">1072</span><span class="w"> </span><span class="n">box</span><span class="w"> </span><span class="n">overlap</span><span class="w"> </span><span class="m">2.0</span><span class="w"> </span><span class="n">maxtry</span><span class="w"> </span><span class="m">500</span>
303303
</pre></div>
304304
</div>
305-
<p>The <code class="docutils literal notranslate"><span class="pre">create_atoms</span></code> commands are used to place
305+
<p>In line with what is done in previous tutorials, the
306+
<code class="docutils literal notranslate"><span class="pre">create_atoms</span></code> commands are used to place
306307
240 Si atoms and 480 O atoms, respectively. This corresponds to
307308
an initial density of approximately <span class="math notranslate nohighlight">\(2 \, \text{g/cm}^3\)</span>, which is close
308309
to the expected final density of amorphous silica at 300 K.</p>
309-
<p>Now, specify the pair coefficients by indicating that the first atom type
310+
<p>Now, specify the potential parameters by indicating that the first atom type
310311
is <code class="docutils literal notranslate"><span class="pre">Si</span></code> and the second is <code class="docutils literal notranslate"><span class="pre">O</span></code>:</p>
311312
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">pair_coeff</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">SiO.1990.vashishta</span><span class="w"> </span><span class="n">Si</span><span class="w"> </span><span class="n">O</span>
312313
</pre></div>
@@ -350,7 +351,10 @@ <h1>Generation of the silica block<a class="headerlink" href="#generation-of-the
350351
<span class="k">run</span><span class="w"> </span><span class="m">30000</span>
351352
</pre></div>
352353
</div>
353-
<p>In the third step, the system is equilibrated at the final desired
354+
<p>In this case, the initial and final target temperatures set for
355+
the Nosé-Hoover thermostat is different, causing it to evolve
356+
linearly within the number of timesteps evoked in the <code class="docutils literal notranslate"><span class="pre">run</span></code> command.
357+
In the third step, the system is equilibrated at the final desired
354358
conditions, <span class="math notranslate nohighlight">\(T = 300\,\text{K}\)</span> and <span class="math notranslate nohighlight">\(p = 1\,\text{atm}\)</span>,
355359
using an anisotropic pressure coupling:</p>
356360
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">unfix </span><span class="nv nv-Identifier">mynvt</span>
@@ -361,14 +365,15 @@ <h1>Generation of the silica block<a class="headerlink" href="#generation-of-the
361365
<span class="k">write_data </span><span class="nv nv-Identifier">generate.data</span>
362366
</pre></div>
363367
</div>
364-
<p>Here, an anisotropic barostat is used.
365-
Anisotropic barostats adjust the dimensions independently, which is
368+
<p>Here, an anisotropic barostat is used. As previously mentioned,
369+
anisotropic barostats adjust the dimensions independently, which is
366370
generally suitable for a solid phase.</p>
367371
<p>Run the simulation using LAMMPS. From the <code class="docutils literal notranslate"><span class="pre">Charts</span></code> window, the temperature
368372
evolution can be observed, showing that it closely follows the desired annealing procedure.
369373
The evolution of the box dimensions over time confirms that the box is deforming during the
370-
last stage of the simulation. After the simulation completes, the final LAMMPS topology
371-
file called <strong>generate.data</strong> will be located next to <strong>generate.lmp</strong>.</p>
374+
last stage of the simulation. After the simulation completes, the final
375+
microstate attained during the dynamics and the system topology will be written to a LAMMPS data
376+
file called <strong>generate.data</strong> which will be located next to <strong>generate.lmp</strong>.</p>
372377
<figure class="align-default">
373378
<img alt="Temperature and density of the silicon" class="only-dark" src="../_images/GCMC-dimension-dm.png" />
374379
</figure>
@@ -419,7 +424,7 @@ <h1>Cracking the silica<a class="headerlink" href="#cracking-the-silica" title="
419424
<span class="k">write_data </span><span class="nv nv-Identifier">cracking.data</span>
420425
</pre></div>
421426
</div>
422-
<p>The <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">nvt</span></code> command integrates the Nosé-Hoover equations
427+
<p>As discussed, the <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">nvt</span></code> command integrates the Nosé-Hoover equations
423428
of motion and is employed to control the temperature of the system.
424429
As observed from the generated images, the atoms
425430
progressively adjust to the changing box dimensions. At some point,
@@ -447,18 +452,19 @@ <h1>Cracking the silica<a class="headerlink" href="#cracking-the-silica" title="
447452
<h1>Adding water<a class="headerlink" href="#adding-water" title="Link to this heading"></a></h1>
448453
<p>To add the water molecules to the silica, we will employ the Monte Carlo
449454
method in the grand canonical ensemble (GCMC). In short, the system is
450-
placed into contact with a virtual reservoir of a given chemical
451-
potential <span class="math notranslate nohighlight">\(\mu\)</span>, and multiple attempts to insert water molecules at
452-
random positions are made. Each attempt is either accepted or rejected
453-
based on energy considerations. For further details, please refer to
454-
classical textbooks like Ref. <span id="id3">[<a class="reference internal" href="../non-tutorials/bibliography.html#id9" title="Daan Frenkel and Berend Smit. Understanding molecular simulation: from algorithms to applications. Elsevier, 2023.">6</a>]</span>.</p>
455+
placed into contact with a virtual reservoir containing pure water at a given
456+
thermodynamic state, and multiple attempts to insert water molecules at
457+
random positions are made. In the grand
458+
canonical ensemble, each attempt is either accepted or rejected
459+
based on internal energy and chemical potential considerations. For further
460+
details, please refer to classical textbooks like Ref. <span id="id3">[<a class="reference internal" href="../non-tutorials/bibliography.html#id9" title="Daan Frenkel and Berend Smit. Understanding molecular simulation: from algorithms to applications. Elsevier, 2023.">6</a>]</span>.</p>
455461
<section id="adapting-the-pair-style">
456462
<h2>Adapting the pair style<a class="headerlink" href="#adapting-the-pair-style" title="Link to this heading"></a></h2>
457463
<p>For this next step, we need to specify the force field used to
458464
model the interactions in the system. The TIP4P/2005 model is employed
459465
for the water <span id="id4">[<a class="reference internal" href="../non-tutorials/bibliography.html#id54" title="Jose LF Abascal and Carlos Vega. A general purpose model for the condensed phases of water: TIP4P/2005. The Journal of chemical physics, 2005.">4</a>]</span>, while no interaction within
460-
silica is defined, as it will be seen farther below. This is be-
461-
cause atoms of the silica will remain frozen during this part of the simulation.
466+
silica is defined, as it will be seen farther below. This is because atoms of
467+
the silica will remain frozen during this part of the simulation.
462468
Only the cross-interactions between water and silica need
463469
to be defined. Create a new file called <strong>gcmc.lmp</strong>, and copy the following
464470
lines into it:</p>
@@ -556,8 +562,8 @@ <h2>Adapting the pair style<a class="headerlink" href="#adapting-the-pair-style"
556562
<p>After reading the data file and defining the <code class="docutils literal notranslate"><span class="pre">h2omol</span></code> molecule from the <strong>H2O.mol</strong>
557563
file, the <code class="docutils literal notranslate"><span class="pre">create_atoms</span></code> command is used to include three water molecules
558564
in the system. Then, add the following <code class="docutils literal notranslate"><span class="pre">pair_coeff</span></code> (and
559-
<code class="docutils literal notranslate"><span class="pre">bond_coeff</span></code> and <code class="docutils literal notranslate"><span class="pre">angle_coeff</span></code>) commands
560-
to <strong>gcmc.lmp</strong>:</p>
565+
<code class="docutils literal notranslate"><span class="pre">bond_coeff</span></code> and <code class="docutils literal notranslate"><span class="pre">angle_coeff</span></code>) commands to <strong>gcmc.lmp</strong>
566+
in order to set the potential parameters:</p>
561567
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">pair_coeff</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="m">0</span>
562568
<span class="k">pair_coeff</span><span class="w"> </span><span class="n">Si</span><span class="w"> </span><span class="n">OW</span><span class="w"> </span><span class="m">0.0057</span><span class="w"> </span><span class="m">4.42</span>
563569
<span class="k">pair_coeff</span><span class="w"> </span><span class="n">O</span><span class="w"> </span><span class="n">OW</span><span class="w"> </span><span class="m">0.0043</span><span class="w"> </span><span class="m">3.12</span>
@@ -567,7 +573,7 @@ <h2>Adapting the pair style<a class="headerlink" href="#adapting-the-pair-style"
567573
<span class="k">angle_coeff</span><span class="w"> </span><span class="n">HW</span><span class="o">-</span><span class="n">OW</span><span class="o">-</span><span class="n">HW</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="m">104.52</span>
568574
</pre></div>
569575
</div>
570-
<p>Pair coefficients for the <code class="docutils literal notranslate"><span class="pre">lj/cut/tip4p/long</span></code>
576+
<p>Pair coefficients for the <code class="docutils literal notranslate"><span class="pre">lj/cut/tip4p/long</span></code> pair style
571577
potential are defined between O(<span class="math notranslate nohighlight">\(\text{H}_2\text{O}\)</span>) and between H(<span class="math notranslate nohighlight">\(\text{H}_2\text{O}\)</span>)
572578
atoms, as well as between O(<span class="math notranslate nohighlight">\(\text{SiO}_2\)</span>)-O(<span class="math notranslate nohighlight">\(\text{H}_2\text{O}\)</span>) and
573579
Si(<span class="math notranslate nohighlight">\(\text{SiO}_2\)</span>)-O(<span class="math notranslate nohighlight">\(\text{H}_2\text{O}\)</span>). Thus, the fluid-fluid and the
@@ -598,8 +604,9 @@ <h2>Adapting the pair style<a class="headerlink" href="#adapting-the-pair-style"
598604
their properties or types.</p>
599605
</div>
600606
<p>The number of oxygen atoms from water molecules (i.e. the number of molecules)
601-
is calculated by the <code class="docutils literal notranslate"><span class="pre">nO</span></code> variable. The SHAKE algorithm is used to
602-
maintain the shape of the water molecules over time <span id="id7">[<a class="reference internal" href="../non-tutorials/bibliography.html#id27" title="Jean-Paul Ryckaert, Giovanni Ciccotti, and Herman JC Berendsen. Numerical integration of the cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. Journal of computational physics, 23(3):327–341, 1977.">35</a>, <a class="reference internal" href="../non-tutorials/bibliography.html#id28" title="Hans C Andersen. Rattle: a “velocity” version of the shake algorithm for molecular dynamics calculations. Journal of computational Physics, 52(1):24–34, 1983.">36</a>]</span>.</p>
607+
is calculated by the <code class="docutils literal notranslate"><span class="pre">nO</span></code> variable. As already discussed in other tutorials,
608+
the SHAKE algorithm is used to maintain the shape of the water molecules
609+
over time <span id="id7">[<a class="reference internal" href="../non-tutorials/bibliography.html#id27" title="Jean-Paul Ryckaert, Giovanni Ciccotti, and Herman JC Berendsen. Numerical integration of the cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. Journal of computational physics, 23(3):327–341, 1977.">35</a>, <a class="reference internal" href="../non-tutorials/bibliography.html#id28" title="Hans C Andersen. Rattle: a “velocity” version of the shake algorithm for molecular dynamics calculations. Journal of computational Physics, 52(1):24–34, 1983.">36</a>]</span>.</p>
603610
<p>Finally, let us create images
604611
of the system using <code class="docutils literal notranslate"><span class="pre">dump</span> <span class="pre">image</span></code>:</p>
605612
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">dump </span><span class="nv nv-Identifier">viz</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="m">250</span><span class="w"> </span><span class="n">myimage</span><span class="o">-*</span><span class="n">.ppm</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">&amp;</span>

0 commit comments

Comments
 (0)