Skip to content

Commit 519dee7

Browse files
committed
improved shearing tutorial
1 parent d0155ec commit 519dee7

File tree

4 files changed

+56
-41
lines changed

4 files changed

+56
-41
lines changed

docs/sphinx/source/journal-article.bib

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@ @article{lorentz1881ueber
1616
publisher={WILEY-VCH Verlag Leipzig}
1717
}
1818

19+
@article{ryckaert1977numerical,
20+
title={Numerical integration of the cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes},
21+
author={Ryckaert, Jean-Paul and Ciccotti, Giovanni and Berendsen, Herman JC},
22+
journal={Journal of computational physics},
23+
volume={23},
24+
number={3},
25+
pages={327--341},
26+
year={1977},
27+
publisher={Elsevier}
28+
}
29+
30+
@article{andersen1983rattle,
31+
title={Rattle: A “velocity” version of the shake algorithm for molecular dynamics calculations},
32+
author={Andersen, Hans C},
33+
journal={Journal of computational Physics},
34+
volume={52},
35+
number={1},
36+
pages={24--34},
37+
year={1983},
38+
publisher={Elsevier}
39+
}
40+
1941
@article{fixmanRadiusGyrationPolymer1962a,
2042
title = {Radius of {{Gyration}} of {{Polymer Chains}}},
2143
author = {Fixman, Marshall},

docs/sphinx/source/tutorials/level2/nanosheared-electrolyte.rst

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ System generation
186186
187187
.. container:: justify
188188

189-
Within the last three lines, a *region* named *rliquid* for depositing the
190-
water molecules are created based on the last defined lattice, which is *fcc 4.04*.
189+
Within the last three lines, a *region* named *rliquid* is created based on the last defined lattice, *fcc 4.04*.
190+
*rliquid* will be used for depositing the water molecules.
191191

192192
.. container:: justify
193193

@@ -196,9 +196,9 @@ System generation
196196

197197
.. container:: justify
198198

199-
Molecules are created on the *fcc 4.04* lattice
199+
The new molecules are placed on the *fcc 4.04* lattice
200200
by the *create_atoms* command. The
201-
first parameter is '0', meaning that the atom IDs from the
201+
first parameter is 0, meaning that the atom IDs from the
202202
*RigidH2O.txt* file will be used.
203203
The number *482793* is a seed that is
204204
required by LAMMPS, it can be any positive integer.
@@ -246,8 +246,8 @@ System generation
246246
247247
.. container:: justify
248248

249-
Create a new text file, call it *PARM.lammps*, and copy it
250-
next to the *systemcreation/* folder. Copy the following lines
249+
Create a new text file called *PARM.lammps* next to
250+
the *systemcreation/* folder. Copy the following lines
251251
into PARM.lammps:
252252

253253
.. code-block:: lammps
@@ -265,10 +265,6 @@ System generation
265265
pair_coeff 5 5 11.697 2.574 # wall
266266
pair_coeff 1 5 0.4 2.86645 # water-wall
267267
268-
bond_coeff 1 0 0.9572 # water
269-
270-
angle_coeff 1 0 104.52 # water
271-
272268
.. container:: justify
273269

274270
Each *mass* command assigns a mass in grams/mole to an atom type. Each
@@ -287,39 +283,36 @@ System generation
287283

288284
.. container:: justify
289285

290-
As already seen in previous tutorials,
291-
and with the important exception of *pair_coeff 1 5*,
292-
only pairwise interaction between atoms of
293-
identical types was assigned. By default, LAMMPS calculates
294-
the pair coefficients for the interactions between atoms
295-
of different types (i and j) by using geometrical
296-
average: :math:`\epsilon_{ij} = (\epsilon_{ii} + \epsilon_{jj})/2`,
297-
:math:`\sigma_{ij} = (\sigma_{ii} + \sigma_{jj})/2.`
298-
Other rules for cross coefficients can be set with the
299-
*pair_modify* command, but for the sake of simplicity,
300-
the default option is kept here.
286+
As already seen in previous tutorials and with the important exception of
287+
*pair_coeff 1 5*, only pairwise interactions between atoms of identical
288+
types was assigned. By default, LAMMPS calculates the pair coefficients for
289+
the interactions between atoms of different types (i and j) by using geometrical average:
290+
:math:`\epsilon_{ij} = (\epsilon_{ii} + \epsilon_{jj})/2`,
291+
:math:`\sigma_{ij} = (\sigma_{ii} + \sigma_{jj})/2.`.
292+
If the default value of :math:`5.941\,\text{kcal/mol}`
293+
was kept for :math:`\epsilon_\text{1-5}`, the solid walls would be extremely
294+
hydrophilic, causing the water molecule to form dense layers. As a comparison,
295+
the water-water energy :math:`\epsilon_\text{1-1}` is only
296+
:math:`0.185199\,\text{kcal/mol}`. Therefore, the walls were made less
297+
hydrophilic by reducing the value of :math:`\epsilon_\text{1-5}`. Copy the
298+
following lines into PARM.lammps as well:
301299

302-
.. container:: justify
300+
.. code-block:: lammps
301+
302+
bond_coeff 1 0 0.9572 # water
303303
304-
By default, the value
305-
of :math:`\epsilon_\text{1-5} = 5.941\,\text{kcal/mol}` would
306-
be extremely high (compared to the water-water
307-
energy :math:`\epsilon_\text{1-1} = 0.185199\,\text{kcal/mol}`),
308-
which would make the surface extremely hydrophilic.
309-
The walls were made less hydrophilic by reducing the
310-
LJ energy of interaction :math:`\epsilon_\text{1-5}`.
304+
angle_coeff 1 0 104.52 # water
311305
312306
.. container:: justify
313307

314-
The *bond_coeff*, which is here used for the O-H bond of the water
315-
molecule, sets both the energy of the harmonic
316-
potential and the equilibrium distance in Ångstrom. The
317-
value is *0* for the energy because we are going to use a
318-
rigid model for the water molecule. The shape of the
319-
molecule will be preserved later by the *shake* algorithm.
320-
Similarly, the angle coefficient here for the H-O-H angle
321-
of the water molecule sets the energy of the harmonic
322-
potential (also 0) and the equilibrium angle is in degree.
308+
The *bond_coeff* command, used here for the O-H bond of the water molecule, sets both
309+
the spring constant of the harmonic potential and the equilibrium distance
310+
of :math:`0.9572~\text{Å}`. The constant can be 0 for a rigid water molecule,
311+
because the shape of the molecule will be preserved by the SHAKE algorithm
312+
(see below) :cite:`ryckaert1977numerical, andersen1983rattle`.
313+
Similarly, the angle coefficient for the H-O-H angle of the water
314+
molecule sets the force constant of the angular harmonic potential to 0 and
315+
the equilibrium angle to :math:`104.52^\circ`.
323316

324317
.. container:: justify
325318

@@ -497,7 +490,7 @@ Energy minimization
497490

498491
The *fix temp/berendsen* rescales the
499492
velocities of the atoms to force the temperature of the system
500-
to reach the desired value of 1 K, and the shake algorithm
493+
to reach the desired value of 1 K, and the SHAKE algorithm
501494
is used in order to maintain the shape of the water molecules.
502495

503496
.. container:: justify

docs/sphinx/source/tutorials/level3/water-adsorption-in-silica.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ Using hydrid potentials
643643

644644
.. container:: justify
645645

646-
The shake algorithm is used to
646+
The SHAKE algorithm is used to
647647
maintain the shape of the water molecules over time. Some of
648648
these features have been seen in previous tutorials.
649649

0 commit comments

Comments
 (0)