Skip to content

Commit 6ba2663

Browse files
committed
added href links
1 parent b458611 commit 6ba2663

File tree

7 files changed

+178
-77
lines changed

7 files changed

+178
-77
lines changed

docs/sphinx/source/journal-article.bib

+19
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ @article{mills1955remeasurement
2727
publisher={ACS Publications}
2828
}
2929

30+
@article{typelabel_paper,
31+
author = {Gissinger, Jacob R. and Nikiforov, Ilia and Afshar,
32+
Yaser and Waters, Brendon and Choi, Moon-ki and Karls,
33+
Daniel S. and Stukowski, Alexander and Im, Wonpil and
34+
Heinz, Hendrik and Kohlmeyer, Axel and Tadmor, Ellad
35+
B.},
36+
title = {Type Label Framework for Bonded Force Fields in
37+
LAMMPS},
38+
journal = {The Journal of Physical Chemistry B},
39+
volume = {128},
40+
number = {13},
41+
pages = {3282-3297},
42+
year = {2024},
43+
doi = {10.1021/acs.jpcb.3c08419},
44+
note = {PMID: 38506668},
45+
URL = { https://doi.org/10.1021/acs.jpcb.3c08419 },
46+
eprint = { https://doi.org/10.1021/acs.jpcb.3c08419 }
47+
}
48+
3049
@misc{lammps_docs,
3150
title = {{LAMMPS} Online Documentation for latest stable version},
3251
howpublished = {\url{https://docs.lammps.org/stable}},

docs/sphinx/source/tutorial3/tutorial.rst

+31-14
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ In this tutorial, the water reservoir is first prepared in the absence of the po
55
A rectangular box of water is created and equilibrated at ambient temperature and
66
pressure. The SPC/Fw water model is used :cite:`wu2006flexible`, which is
77
a flexible variant of the rigid SPC (simple point charge) model :cite:`berendsen1981interaction`.
8-
To set up this tutorial, select ``Start Tutorial 3`` from the
9-
``Tutorials`` menu of LAMMPS--GUI and follow the instructions.
10-
The editor should display the following content corresponding to **water.lmp**:
8+
Create a file named **water.lmp**, and copy the following lines into it:
119

1210
.. code-block:: lammps
1311
@@ -20,6 +18,13 @@ The editor should display the following content corresponding to **water.lmp**:
2018
kspace_style ewald 1e-5
2119
special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 1.0 angle yes
2220
21+
.. admonition:: Optional: follow this tutorial using LAMMPS-GUI
22+
:class: gui
23+
24+
To set up this tutorial, select ``Start Tutorial 3`` from the
25+
``Tutorials`` menu of LAMMPS--GUI and follow the instructions.
26+
The editor should display the content corresponding to **water.lmp**.
27+
2328
With the unit style ``real``, masses are in g/mol, distances in Å,
2429
time in fs, and energies in kcal/mol. With the ``atom_style full``,
2530
each atom is a dot with a mass and a charge that can be linked
@@ -44,14 +49,18 @@ and 4 dihedral types (only for the polymer). Copy the following lines into **wa
4449
.. code-block:: lammps
4550
4651
region box block -30 30 -15 15 -15 15
47-
create_box 8 box bond/types 7 angle/types 8 dihedral/types 4 &
48-
extra/bond/per/atom 3 extra/angle/per/atom 6 extra/dihedral/per/atom 10 extra/special/per/atom 14
52+
create_box 8 box bond/types 7 angle/types 8 dihedral/types 4 extra/bond/per/atom 3 &
53+
extra/angle/per/atom 6 extra/dihedral/per/atom 10 extra/special/per/atom 14
4954
5055
The ``extra/x/per/atom`` commands reserve memory for adding bond topology
51-
data later. We use the file \href{\filepath tutorial3/parameters.inc}{\dwlcmd{parameters.inc}}
56+
data later. We use the file |parameters_inc_3|
5257
to set all the parameters (masses, interaction energies, bond equilibrium
5358
distances, etc). Thus add to **water.lmp** the line:
5459

60+
.. |parameters_inc_3| raw:: html
61+
62+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial3/parameters.inc" target="_blank">parameters.inc</a>
63+
5564
.. code-block:: lammps
5665
5766
include parameters.inc
@@ -89,13 +98,15 @@ of molecules. Always check the number of created atoms in the **log** file
8998
Created 2100 atoms
9099
91100
When LAMMPS fails to create the desired number of molecules, a WARNING
92-
appears. The molecule template called
93-
\href{\filepath tutorial3/water.mol}{\dwlcmd{water.mol}}
94-
must be downloaded and saved
101+
appears. The molecule template called |water_mol_3| must be downloaded and saved
95102
next to **water.lmp**. This template contains the necessary
96103
structural information of a water molecule, such as the number of atoms,
97104
or the IDs of the atoms that are connected by bonds and angles.
98105

106+
.. |water_mol_3| raw:: html
107+
108+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial3/water.mol" target="_blank">water.mol</a>
109+
99110
.. figure:: figures/PEG-density-dm.png
100111
:class: only-dark
101112
:alt: Evolution of the water reservoir density
@@ -237,11 +248,14 @@ of the tutorial. Add the following command to **merge.lmp**:
237248
238249
kspace_style pppm 1e-5
239250
240-
Using the molecule template for the polymer called
241-
\href{\filepath tutorial3/peg.mol}{\dwlcmd{peg.mol}},
251+
Using the molecule template for the polymer called |peg_mol_3|,
242252
let us create a single molecule in the middle of the box by adding the following
243253
commands to **merge.lmp**:
244254

255+
.. |peg_mol_3| raw:: html
256+
257+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial3/peg.mol" target="_blank">peg.mol</a>
258+
245259
.. code-block:: lammps
246260
247261
molecule pegmol peg.mol
@@ -423,7 +437,7 @@ for an extra 15 ps:
423437
fix myaf2 topull2 addforce -10 0 0
424438
run 15000
425439
426-
Each applied force has a magnitude of :math:`10 \text{kcal/mol/\AA{}}`, corresponding to :math:`0.67 \text{nN}`.
440+
Each applied force has a magnitude of :math:`10 \, \text{kcal/mol/Å}`, corresponding to :math:`0.67 \text{nN}`.
427441
This value was chosen to be sufficiently large to overcome both the thermal agitation and
428442
the entropic contributions from the molecules.
429443

@@ -445,10 +459,13 @@ OVITO :cite:`humphrey1996vmd, ovito_paper`. To do so, the IDs and
445459
positions of the atoms must be regularly written to a file during the
446460
simulation. This can be accomplished by adding a ``dump`` command
447461
to the input file. For instance, create a duplicate of
448-
**pull.lmp** and name it
449-
\href{\filepath tutorial3/solution/pull-with-tip.lmp}{\dwlcmd{pull-with-tip.lmp}}.
462+
**pull.lmp** and name it |pull_with_tip_lmp_3|.
450463
Then, replace the existing ``dump`` and ``dump_modify`` commands with:
451464

465+
.. |pull_with_tip_lmp_3| raw:: html
466+
467+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial3/pull-with-tip.lmp" target="_blank">pull-with-tip.lmp</a>
468+
452469
.. code-block:: lammps
453470
454471
dump mydmp all atom 1000 pull.lammpstrj

docs/sphinx/source/tutorial4/tutorial.rst

+23-16
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ except that they are specifically designed for the four-point water model. As a
3737
LAMMPS automatically creates a four-point water molecule, assigning type O
3838
atoms as oxygen and type H atoms as hydrogen. The fourth massless atom (M) of the
3939
TIP4P water molecule does not have to be defined explicitly, and the value of
40-
:math:`0.1546\,\text{\AA{}}` corresponds to the O-M distance of the
40+
:math:`0.1546\,\text{Å}` corresponds to the O-M distance of the
4141
TIP4P-2005 water model :cite:`abascal2005general`. All other atoms in the simulation
4242
are treated as usual, with long-range Coulomb interactions. Another novelty, here, is
4343
the use of ``kspace modify slab 3.0`` that is combined with the non-periodic
@@ -51,9 +51,8 @@ Let us create the box and the label maps by adding the following lines to **crea
5151
5252
lattice fcc 4.04
5353
region box block -3 3 -3 3 -5 5
54-
create_box 5 box bond/types 1 angle/types 1 &
55-
extra/bond/per/atom 2 extra/angle/per/atom 1 &
56-
extra/special/per/atom 2
54+
create_box 5 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 &
55+
extra/special/per/atom 2
5756
labelmap atom 1 O 2 H 3 Na+ 4 Cl- 5 WALL
5857
labelmap bond 1 O-H
5958
labelmap angle 1 H-O-H
@@ -62,7 +61,7 @@ The ``lattice`` command defines the unit cell. Here, the face-centered cubic (f
6261
with a scale factor of 4.04 has been chosen for the future positioning of the atoms
6362
of the walls. The ``region`` command defines a geometric region of space. By choosing
6463
:math:`\text{xlo}=-3` and :math:`\text{xlo}=3`, and because we have previously chosen a lattice with a scale
65-
factor of 4.04, the region box extends from :math:`-12.12~\text{\AA{}}` to :math:`12.12~\text{\AA{}}`
64+
factor of 4.04, the region box extends from :math:`-12.12~\text{Å}` to :math:`12.12~\text{Å}`
6665
along the :math:`x` direction. The ``create_box`` command creates a simulation box with
6766
5 types of atoms: the oxygen and hydrogen of the water molecules, the two ions (:math:`\text{Na}^+`,
6867
:math:`\text{Cl}^-`), and the atoms from the walls. The simulation contains 1 type of bond
@@ -87,12 +86,15 @@ following lines to **create.lmp**:
8786
Atoms will be placed in the positions of the previously defined lattice, thus
8887
forming fcc solids.
8988

90-
To add the water molecules, the molecule
91-
template called \href{\filepath tutorial4/water.mol}{\dwlcmd{water.mol}}
89+
To add the water molecules, the molecule template called |water_mol_4|
9290
must be located next to **create.lmp**. The template contains all the
9391
necessary information concerning the water molecule, such as atom positions,
9492
bonds, and angles. Add the following lines to **create.lmp**:
9593

94+
.. |water_mol_4| raw:: html
95+
96+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial4/water.mol" target="_blank">water.mol</a>
97+
9698
.. code-block:: lammps
9799
98100
region rliquid block INF INF INF INF -2 2
@@ -138,11 +140,16 @@ lines into **create.lmp**:
138140
include parameters.inc
139141
include groups.inc
140142
141-
Both \href{\filepath tutorial4/parameters.inc}{\dwlcmd{parameters.inc}}
142-
and \href{\filepath tutorial4/groups.inc}{\dwlcmd{groups.inc}} files
143-
must be located next to **create.lmp**.
143+
Both |parameters_inc_4| and |groups_inc_4| files
144+
must be located next to **create.lmp**. The **parameters.inc** file contains the masses, as follows:
145+
146+
.. |parameters_inc_4| raw:: html
147+
148+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial4/parameters.inc" target="_blank">parameters.inc</a>
144149

145-
The **parameters.inc** file contains the masses, as follows:
150+
.. |groups_inc_4| raw:: html
151+
152+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial4/groups.inc" target="_blank">groups.inc</a>
146153

147154
.. code-block:: lammps
148155
@@ -182,14 +189,15 @@ to make the walls less hydrophilic, the value of
182189
:math:`\epsilon_\text{O-WALL}` was reduced.
183190

184191
Finally, the **parameters.inc** file contains the following two lines:
192+
185193
.. code-block:: lammps
186194
187195
bond_coeff O-H 0 0.9572
188196
angle_coeff H-O-H 0 104.52
189197
190198
The ``bond_coeff`` command, used here for the O-H bond of the water
191199
molecule, sets both the spring constant of the harmonic potential and the
192-
equilibrium bond distance of :math:`0.9572~\text{\AA{}}`. The constant can be 0 for a
200+
equilibrium bond distance of :math:`0.9572~\text{Å}`. The constant can be 0 for a
193201
rigid water molecule because the SHAKE algorithm will maintain the rigid
194202
structure of the water molecule (see below) :cite:`ryckaert1977numerical, andersen1983rattle`.
195203
Similarly, the ``angle_coeff`` command for the H-O-H angle of the water molecule sets
@@ -208,7 +216,7 @@ several ``group`` commands to selects atoms based on their types:
208216
group fluid union H2O ions
209217
210218
The **groups.inc** file also defines the ``walltop`` and ``wallbot``
211-
groups, which contain the WALL atoms located in the :math:`z > 0` and :math:`z < 0` regions, respectively::
219+
groups, which contain the WALL atoms located in the :math:`z > 0` and :math:`z < 0` regions, respectively:
212220

213221
.. code-block:: lammps
214222
@@ -228,7 +236,6 @@ to delete about :math:`15~\%` of the water molecules:
228236
229237
delete_atoms random fraction 0.15 yes H2O NULL 482793 mol yes
230238
231-
232239
To create an image of the system, add the following ``dump`` image
233240
into **create.lmp** (see also Fig.~\ref{fig:NANOSHEAR-system}):
234241

@@ -525,7 +532,7 @@ along :math:`x` (``vx``) within the bins. Add the following lines to **shearing
525532
526533
run 200000
527534
528-
Here, a bin size of :math:`0.25\,\text{\AA{}}` is used for the density
535+
Here, a bin size of :math:`0.25\,\text{Å}` is used for the density
529536
profiles generated by the ``ave/chunk`` commands, and three
530537
**.dat** files are created for the water, the walls, and the ions,
531538
respectively. With values of ``10 15000 200000``, the velocity
@@ -552,7 +559,7 @@ the fluid on the shearing wall, and :math:`\dot{\gamma}` the shear rate
552559
:cite:`gravelle2021violations`. Here, the shear rate is
553560
approximately :math:`\dot{\gamma} = 20 \cdot 10^9\,\text{s}^{-1}` (Fig.~\ref{fig:NANOSHEAR-profiles}),
554561
the average force on each wall is given by ``f_mysf1[1]`` and ``f_mysf2[1]``
555-
and is approximately :math:`2.7\,\mathrm{kcal/mol/\AA}` in magnitude. Using a surface area
562+
and is approximately :math:`2.7\,\mathrm{kcal/mol/Å}` in magnitude. Using a surface area
556563
for the walls of :math:`A = 6 \cdot 10^{-18}\,\text{m}^2`, one obtains an estimate for
557564
the shear viscosity for the confined fluid of :math:`\eta = 3.1\,\text{mPa.s}` using Eq.~\eqref{eq:eta}.
558565

docs/sphinx/source/tutorial5/tutorial.rst

+9-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ So far, the input is very similar to what was seen in the previous tutorials.
2020
Some basic parameters are defined (``units`` and ``atom_style``),
2121
and a **.data** file is imported by the ``read_data`` command.
2222

23-
The initial topology given by \href{\filepath tutorial5/silica.data}{\dwlcmd{silica.data}}
23+
The initial topology given by |silica_data_5|
2424
is a small amorphous silica structure. This structure was created using a force field called
2525
Vashishta :cite:`vashishta1990interaction`. If you open the **silica.data**
2626
file, you will find in the ``Atoms`` section that all silicon atoms have a
2727
charge of :math:`q = 1.1\,\text{e}`, and all oxygen atoms have a charge of :math:`q = -0.55\,\text{e}`.
2828

29+
.. |silica_data_5| raw:: html
30+
31+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial5/silica.data" target="_blank">silica.data</a>
32+
2933
.. admonition:: Note
3034
:class: non-title-info
3135

@@ -45,15 +49,17 @@ Next, copy the following three crucial lines into the **relax.lmp** file:
4549
In this case, the ``pair_style reaxff`` is used without a control file. The
4650
``safezone`` and ``mincap`` keywords are added to prevent
4751
allocation issues, which sometimes can trigger segmentation faults and
48-
``bondchk`` errors. The ``pair_coeff`` command uses the
49-
\href{\filepath tutorial5/reaxCHOFe.inc}{\dwlcmd{reaxCHOFe.inc}}
52+
``bondchk`` errors. The ``pair_coeff`` command uses the |reaxCHOFe_inc_5|
5053
file, which should have been downloaded during the tutorial set up. Finally, the
5154
``fix qeq/reaxff`` is used to perform charge equilibration :cite:`rappe1991charge`,
5255
which occurs at every step. The values 0.0 and 10.0 represent the
5356
low and the high cutoffs, respectively, and :math:`1.0 \text{e} -6` is the tolerance.
5457
The ``maxiter`` sets an upper limit to the number of attempts to
5558
equilibrate the charge.
5659

60+
.. |reaxCHOFe_inc_5| raw:: html
61+
62+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial5/reaxCHOFe.inc" target="_blank">reaxCHOFe.inc</a>
5763

5864
Next, add the following commands to the **relax.lmp** file to track the
5965
evolution of the charges during the simulation:

docs/sphinx/source/tutorial6/tutorial.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ is ``Si`` and the second is ``O``:
4444
4545
pair_coeff * * SiO.1990.vashishta Si O
4646
47-
Ensure that the \href{\filepath tutorial6/SiO.1990.vashishta}{\dwlcmd{SiO.1990.vashishta}}
48-
file is located in the same directory as **generate.lmp**.
47+
Ensure that the |SiO_1990_vashishta_6| file is located in the same directory as **generate.lmp**.
48+
49+
.. |SiO_1990_vashishta_6| raw:: html
50+
51+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial6/SiO.1990.vashishta" target="_blank">SiO.1990.vashishta</a>
4952

5053
FIGURE GCMC-generate Amorphous silica (:math:`\text{SiO}_2`).
5154
Silicon atoms are
@@ -217,9 +220,13 @@ with ``tip4p/long``. Finally, the style for the bonds
217220
and angles of the water molecules are defined; however, these specifications are
218221
not critical since TIP4P/2005 is a rigid water model.
219222

220-
The water molecule template called \href{\filepath tutorial6/H2O.mol}{\dwlcmd{H2O.mol}}
223+
The water molecule template called |H2O_mol_6|
221224
must be downloaded and located next to **gcmc.lmp**.
222225

226+
.. |H2O_mol_6| raw:: html
227+
228+
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial6/H2O.mol" target="_blank">H2O.mol</a>
229+
223230
Before going further, we need to make a few changes to our data file.
224231
Currently, the **cracking.data** file includes only two atom types, but we require four.
225232
Copy the previously generated **cracking.data**, and name the duplicate **cracking-mod.data**.

0 commit comments

Comments
 (0)