@@ -23,7 +23,6 @@ file in a text editor of your choice, and copy the following into it:
23
23
kspace_style pppm/tip4p 1.0e-5
24
24
kspace_modify slab 3.0
25
25
26
-
27
26
.. admonition :: If you are using LAMMPS-GUI
28
27
:class: gui
29
28
@@ -32,8 +31,9 @@ file in a text editor of your choice, and copy the following into it:
32
31
The editor should display the following content corresponding to **create.lmp **
33
32
34
33
These lines are used to define the most basic parameters, including the
35
- atom, bond, and angle styles, as well as the non-bonded interaction
36
- potential. Here, ``lj/cut/tip4p/long `` imposes a Lennard-Jones potential with
34
+ atom style, the forms of the non-bonded,
35
+ bond, and angle potentials, as well as other specifics of
36
+ the non-bonded interactions. Here, ``lj/cut/tip4p/long `` imposes a Lennard-Jones potential with
37
37
a cut-off at :math: `12 \,\text {Å}` and a long-range Coulomb potential.
38
38
The parameters ``O ``, ``H ``, ``O-H ``, and ``H-O-H `` correspond
39
39
respectively to the oxygens, hydrogens, O-H bonds, and H-O-H angle constraints of
@@ -82,7 +82,8 @@ along the :math:`x` direction. The ``create_box`` command creates a simulation
82
82
and 1 type of angle (both required by the water molecules).
83
83
The parameters for these bond and angle constraints will be given later. The ``extra (...) ``
84
84
keywords are for memory allocation. Finally, the ``labelmap `` commands assign
85
- alphanumeric type labels to each numeric atom type, bond type, and angle type.
85
+ alphanumeric type labels to each numeric atom type, bond type, and angle type, concepts
86
+ already introduced in previous tutorials.
86
87
87
88
Now, we can add atoms to the system. First, let us create two sub-regions corresponding
88
89
respectively to the two solid walls, and create a larger region from the union of the
@@ -116,7 +117,7 @@ bonds, and angles. Add the following lines to **create.lmp**:
116
117
117
118
Within the last three lines, a ``region `` named ``rliquid `` is
118
119
created based on the last defined lattice, ``fcc 4.04 ``. ``rliquid ``
119
- will be used for depositing the water molecules. The ``molecule `` command
120
+ will be used for introducing the water molecules. The ``molecule `` command
120
121
opens up the molecule template called **water.mol **, and names the
121
122
associated molecule ``h2omol ``. The new molecules are placed on the
122
123
``fcc 4.04 `` lattice by the ``create_atoms `` command. The first
@@ -209,8 +210,9 @@ Finally, the **parameters.inc** file contains the following two lines:
209
210
210
211
The ``bond_coeff `` command, used here for the O-H bond of the water
211
212
molecule, sets both the spring constant of the harmonic potential and the
212
- equilibrium bond distance of :math: `0.9572 ~\text {Å}`. The constant can be 0 for a
213
- rigid water molecule because the SHAKE algorithm will maintain the rigid
213
+ equilibrium bond distance of :math: `0.9572 ~\text {Å}`. The force constant can be 0 for a
214
+ rigid water molecule because the SHAKE algorithm which, will be used
215
+ in the input at a later step, will constrain the intramolecular
214
216
structure of the water molecule (see below) :cite: `ryckaert1977numerical, andersen1983rattle `.
215
217
Similarly, the ``angle_coeff `` command for the H-O-H angle of the water molecule sets
216
218
the force constant of the angular harmonic potential to 0 and the equilibrium
@@ -265,8 +267,8 @@ Finally, add the following lines into **create.lmp**:
265
267
266
268
write_data create.data nocoeff
267
269
268
- The ``run 0 `` command runs the simulation for 0 steps , which is sufficient for
269
- creating the system and saving its state. The ``write_data `` command
270
+ The ``run 0 `` command initializes the simulation, which is required for cleanly
271
+ saving the state, but it does not advance positions or velocities. The ``write_data `` command
270
272
generates a file called **system.data ** containing the information required
271
273
to restart the simulation from the final configuration produced by this input
272
274
file. With the ``nocoeff `` option, the parameters from the force field are
@@ -322,7 +324,8 @@ The only difference from the previous input is that, instead of creating a new
322
324
box and new atoms, we open the previously created **create.data ** file.
323
325
324
326
Now, let us use the SHAKE algorithm to maintain the shape of the
325
- water molecules :cite: `ryckaert1977numerical, andersen1983rattle `.
327
+ water molecules :cite: `ryckaert1977numerical, andersen1983rattle `
328
+ by adding the following line to the script.
326
329
327
330
.. code-block :: lammps
328
331
@@ -375,8 +378,8 @@ Let us equilibrate further the entire system by letting both fluid and wall
375
378
relax at ambient temperature. Here, the commands are written within the same
376
379
**equilibrate.lmp ** file, right after the ``reset_timestep `` command.
377
380
378
- Let us update the positions of all the atoms and use a Nosé-Hoover
379
- thermostat. Add the following lines to **equilibrate.lmp **:
381
+ Let us do a molecular dynamics simulation using
382
+ the Nosé-Hoover thermostat. Add the following lines to **equilibrate.lmp **:
380
383
381
384
.. code-block :: lammps
382
385
@@ -555,9 +558,10 @@ and ``f_mysf2[1]``. Add these lines to **shearing.lmp**:
555
558
thermo_style custom step temp etotal f_mysf1[1] f_mysf2[1]
556
559
557
560
Let us also extract the density and velocity profiles using
558
- the ``chunk/atom `` and ``ave/chunk `` commands. These
559
- commands discretize the simulation domain into spatial bins and compute and output
560
- average properties of the atoms belonging to each bin, here the velocity
561
+ the ``chunk/atom `` and ``ave/chunk `` commands. When deployed as
562
+ below, these commands discretize the simulation domain
563
+ into spatial bins and compute and output average proper-
564
+ ties of the atoms belonging to each bin, here the velocity
561
565
along :math: `x` (``vx ``) within the bins. Add the following lines to **shearing.lmp **:
562
566
563
567
.. code-block :: lammps
0 commit comments