Skip to content

Commit 6a95a5b

Browse files
committed
ensured consistency of tutorial 6
1 parent d35ea64 commit 6a95a5b

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

docs/sphinx/source/tutorial5/tutorial.rst

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

docs/sphinx/source/tutorial6/tutorial.rst

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``:

0 commit comments

Comments
 (0)