Skip to content

Commit 1d46591

Browse files
committed
deploy: d35ea64
1 parent ac51959 commit 1d46591

File tree

8 files changed

+71
-41
lines changed

8 files changed

+71
-41
lines changed
0 Bytes
Binary file not shown.
1.73 KB
Binary file not shown.
1.7 KB
Binary file not shown.

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

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

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/tutorial5/reactive-silicon-dioxide.html

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ <h2>Prepare and relax<a class="headerlink" href="#prepare-and-relax" title="Link
328328
personalized <a href="https://www.patreon.com/molecularsimulations" target="_blank">advice</a> for your project.</p>
329329
</div>
330330
<p>The initial topology given by <a href="https://raw.githubusercontent.com/lammpstutorials/lammpstutorials-inputs/refs/heads/main/tutorial5/silica.data" target="_blank">silica.data</a>
331-
is a small amorphous silica structure. This structure was generated in a prior
331+
corresponds to a small amorphous silica structure. This structure was generated in a prior
332332
simulation using the Vashishta force field <span id="id3">[<a class="reference internal" href="../non-tutorials/bibliography.html#id50" title="P Vashishta, Rajiv K Kalia, José P Rino, and Ingvar Ebbsjö. Interaction potential for SiO2: a molecular-dynamics study of structural correlations. Physical Review B, 41(17):12197, 1990.">41</a>]</span>.
333333
If you open the <strong>silica.data</strong>
334334
file, you will find in the <code class="docutils literal notranslate"><span class="pre">Atoms</span></code> section that all silicon atoms have a
@@ -338,15 +338,15 @@ <h2>Prepare and relax<a class="headerlink" href="#prepare-and-relax" title="Link
338338
<p>Assigning the same charge to all atoms of the same type is common with many
339339
force fields, including the force fields used in the previous tutorials. This
340340
changes once ReaxFF is used: the charge of each atom will adjust to its local
341-
environment.</p>
341+
environment through charge equilibration.</p>
342342
</div>
343343
<p>Next, copy the following three crucial lines into the <strong>relax.lmp</strong> file:</p>
344344
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">pair_style</span><span class="w"> </span><span class="n">reaxff</span><span class="w"> </span><span class="n">NULL</span><span class="w"> </span><span class="n">safezone</span><span class="w"> </span><span class="m">3.0</span><span class="w"> </span><span class="n">mincap</span><span class="w"> </span><span class="m">150</span>
345345
<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">ffield.reax.CHOFe</span><span class="w"> </span><span class="n">Si</span><span class="w"> </span><span class="n">O</span>
346346
<span class="k">fix </span><span class="nv nv-Identifier">myqeq</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">qeq</span><span class="o">/</span><span class="n">reaxff</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">0.0</span><span class="w"> </span><span class="m">10.0</span><span class="w"> </span><span class="m">1.0e-6</span><span class="w"> </span><span class="n">reaxff</span><span class="w"> </span><span class="n">maxiter</span><span class="w"> </span><span class="m">400</span>
347347
</pre></div>
348348
</div>
349-
<p>In this case, the <code class="docutils literal notranslate"><span class="pre">pair_style</span> <span class="pre">reaxff</span></code> is used without a control file. The
349+
<p>In this case, the <code class="docutils literal notranslate"><span class="pre">pair_style</span> <span class="pre">reaxff</span></code> is used without a control file (see note below). The
350350
<code class="docutils literal notranslate"><span class="pre">safezone</span></code> and <code class="docutils literal notranslate"><span class="pre">mincap</span></code> keywords are added to prevent
351351
allocation issues, which sometimes can trigger segmentation faults and
352352
<code class="docutils literal notranslate"><span class="pre">bondchk</span></code> errors. The <code class="docutils literal notranslate"><span class="pre">pair_coeff</span></code> command uses the <a href="https://raw.githubusercontent.com/lammpstutorials/lammpstutorials-inputs/refs/heads/main/tutorial5/ffield.reax.CHOFe" target="_blank">ffield.reax.CHOFe</a>
@@ -375,7 +375,11 @@ <h2>Prepare and relax<a class="headerlink" href="#prepare-and-relax" title="Link
375375
<span class="k">variable </span><span class="nv nv-Identifier">vq</span><span class="w"> </span><span class="n">atom</span><span class="w"> </span><span class="n">q</span>
376376
</pre></div>
377377
</div>
378-
<p>To print the averaged charges <code class="docutils literal notranslate"><span class="pre">qSi</span></code> and <code class="docutils literal notranslate"><span class="pre">qO</span></code> using the
378+
<p>The definition of the equal style variables qSi and qO make
379+
use of functions pre-defined within LAMMPS that allow
380+
calculating the total charge of atoms belonging to a group
381+
(<code class="docutils literal notranslate"><span class="pre">charge()</span></code>) and the total number of atoms in the group
382+
(<code class="docutils literal notranslate"><span class="pre">count()</span></code>). To print the averaged charges <code class="docutils literal notranslate"><span class="pre">qSi</span></code> and <code class="docutils literal notranslate"><span class="pre">qO</span></code> using the
379383
<code class="docutils literal notranslate"><span class="pre">thermo_style</span></code> command, and create images of the system. Add the
380384
following lines to <strong>relax.lmp</strong>:</p>
381385
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">thermo</span><span class="w"> </span><span class="m">100</span>
@@ -425,7 +429,7 @@ <h2>Prepare and relax<a class="headerlink" href="#prepare-and-relax" title="Link
425429

426430
<span class="k">run</span><span class="w"> </span><span class="m">5000</span>
427431

428-
<span class="k">write_data </span><span class="nv nv-Identifier">relax.data</span>
432+
<span class="k">write_data </span><span class="nv nv-Identifier">relax.data</span><span class="w"> </span><span class="n">nofix</span>
429433
</pre></div>
430434
</div>
431435
<div class="non-title-info admonition">
@@ -434,7 +438,9 @@ <h2>Prepare and relax<a class="headerlink" href="#prepare-and-relax" title="Link
434438
box can change independently. This is particularly relevant for solids and other
435439
systems where anisotropic stresses may develop.</p>
436440
</div>
437-
<p>Run the <strong>relax.lmp</strong> file using LAMMPS. As seen from <strong>relax.species</strong>,
441+
<p>The <code class="docutils literal notranslate"><span class="pre">write_data</span></code> command is used with the nofix keyword to print a data file
442+
without extra sections from the <code class="docutils literal notranslate"><span class="pre">reaxff/species</span></code> command.
443+
Run the <strong>relax.lmp</strong> file using LAMMPS. As seen from <strong>relax.species</strong>,
438444
only one species is detected, called <code class="docutils literal notranslate"><span class="pre">O384Si192</span></code>, representing the entire system.</p>
439445
<p>As the simulation progresses, the charge of every atom fluctuates
440446
because it is adjusting to the local environment of the atom.
@@ -529,7 +535,7 @@ <h3>Deform the structure<a class="headerlink" href="#deform-the-structure" title
529535

530536
<span class="k">run</span><span class="w"> </span><span class="m">25000</span>
531537

532-
<span class="k">write_data </span><span class="nv nv-Identifier">deform.data</span>
538+
<span class="k">write_data </span><span class="nv nv-Identifier">deform.data</span><span class="w"> </span><span class="n">nofix</span>
533539
</pre></div>
534540
</div>
535541
<p>The <code class="docutils literal notranslate"><span class="pre">fix</span> <span class="pre">deform</span></code> command applies a continuous deformation
@@ -637,10 +643,11 @@ <h3>Decorate the surface<a class="headerlink" href="#decorate-the-surface" title
637643
<span class="k">fix </span><span class="nv nv-Identifier">myspec</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">reaxff</span><span class="o">/</span><span class="n">species</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="n">decorate.species</span><span class="w"> </span><span class="n">element</span><span class="w"> </span><span class="n">Si</span><span class="w"> </span><span class="n">O</span><span class="w"> </span><span class="n">H</span>
638644
</pre></div>
639645
</div>
640-
<p>Here, the <span class="math notranslate nohighlight">\(+1 \mathrm{e}{-10}\)</span> was added to the denominator of the <code class="docutils literal notranslate"><span class="pre">variable</span> <span class="pre">qH</span></code>
641-
to avoid dividing by 0 at the beginning of the simulation. Finally, let us
642-
create a loop with 10 steps, and create two hydrogen atoms at random locations at
643-
every step:</p>
646+
<p>The commands above are, once again, similar to the ones of the previous script.
647+
Here, the <span class="math notranslate nohighlight">\(+1 \mathrm{e}{-10}\)</span> was added to the denominator of the <code class="docutils literal notranslate"><span class="pre">variable</span> <span class="pre">qH</span></code>
648+
to avoid dividing by 0 at the beginning of the simulation, as no hydrogen atoms exists in
649+
the simulation domain yet. Finally, let us create a loop with 10 steps, and
650+
create two hydrogen atoms at random locations at every step:</p>
644651
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">fix </span><span class="nv nv-Identifier">mynvt</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">nvt</span><span class="w"> </span><span class="n">temp</span><span class="w"> </span><span class="m">300.0</span><span class="w"> </span><span class="m">300.0</span><span class="w"> </span><span class="m">100</span>
645652
<span class="k">timestep</span><span class="w"> </span><span class="m">0.5</span>
646653

0 commit comments

Comments
 (0)