You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The editor should display the following content corresponding to <strong>create.lmp</strong></p>
332
332
</div>
333
333
<p>These lines are used to define the most basic parameters, including the
334
-
atom, bond, and angle styles, as well as the non-bonded interaction
335
-
potential. Here, <codeclass="docutils literal notranslate"><spanclass="pre">lj/cut/tip4p/long</span></code> imposes a Lennard-Jones potential with
334
+
atom style, the forms of the non-bonded,
335
+
bond, and angle potentials, as well as other specifics of
336
+
the non-bonded interactions. Here, <codeclass="docutils literal notranslate"><spanclass="pre">lj/cut/tip4p/long</span></code> imposes a Lennard-Jones potential with
336
337
a cut-off at <spanclass="math notranslate nohighlight">\(12\,\text{Å}\)</span> and a long-range Coulomb potential.
337
338
The parameters <codeclass="docutils literal notranslate"><spanclass="pre">O</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">H</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">O-H</span></code>, and <codeclass="docutils literal notranslate"><spanclass="pre">H-O-H</span></code> correspond
338
339
respectively to the oxygens, hydrogens, O-H bonds, and H-O-H angle constraints of
and 1 type of angle (both required by the water molecules).
381
382
The parameters for these bond and angle constraints will be given later. The <codeclass="docutils literal notranslate"><spanclass="pre">extra</span><spanclass="pre">(...)</span></code>
382
383
keywords are for memory allocation. Finally, the <codeclass="docutils literal notranslate"><spanclass="pre">labelmap</span></code> commands assign
383
-
alphanumeric type labels to each numeric atom type, bond type, and angle type.</p>
384
+
alphanumeric type labels to each numeric atom type, bond type, and angle type, concepts
385
+
already introduced in previous tutorials.</p>
384
386
<p>Now, we can add atoms to the system. First, let us create two sub-regions corresponding
385
387
respectively to the two solid walls, and create a larger region from the union of the
386
388
two regions. Then, let us create atoms of type WALL within the two regions. Add the
<p>Within the last three lines, a <codeclass="docutils literal notranslate"><spanclass="pre">region</span></code> named <codeclass="docutils literal notranslate"><spanclass="pre">rliquid</span></code> is
406
408
created based on the last defined lattice, <codeclass="docutils literal notranslate"><spanclass="pre">fcc</span><spanclass="pre">4.04</span></code>. <codeclass="docutils literal notranslate"><spanclass="pre">rliquid</span></code>
407
-
will be used for depositing the water molecules. The <codeclass="docutils literal notranslate"><spanclass="pre">molecule</span></code> command
409
+
will be used for introducing the water molecules. The <codeclass="docutils literal notranslate"><spanclass="pre">molecule</span></code> command
408
410
opens up the molecule template called <strong>water.mol</strong>, and names the
409
411
associated molecule <codeclass="docutils literal notranslate"><spanclass="pre">h2omol</span></code>. The new molecules are placed on the
410
412
<codeclass="docutils literal notranslate"><spanclass="pre">fcc</span><spanclass="pre">4.04</span></code> lattice by the <codeclass="docutils literal notranslate"><spanclass="pre">create_atoms</span></code> command. The first
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">bond_coeff</span></code> command, used here for the O-H bond of the water
478
480
molecule, sets both the spring constant of the harmonic potential and the
479
-
equilibrium bond distance of <spanclass="math notranslate nohighlight">\(0.9572~\text{Å}\)</span>. The constant can be 0 for a
480
-
rigid water molecule because the SHAKE algorithm will maintain the rigid
481
+
equilibrium bond distance of <spanclass="math notranslate nohighlight">\(0.9572~\text{Å}\)</span>. The force constant can be 0 for a
482
+
rigid water molecule because the SHAKE algorithm which, will be used
483
+
in the input at a later step, will constrain the intramolecular
481
484
structure of the water molecule (see below) <spanid="id5">[<aclass="reference internal" href="../non-tutorials/bibliography.html#id27" title="Jean-Paul Ryckaert, Giovanni Ciccotti, and Herman JC Berendsen. Numerical integration of the cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. Journal of computational physics, 23(3):327–341, 1977.">35</a>, <aclass="reference internal" href="../non-tutorials/bibliography.html#id28" title="Hans C Andersen. Rattle: a “velocity” version of the shake algorithm for molecular dynamics calculations. Journal of computational Physics, 52(1):24–34, 1983.">36</a>]</span>.
482
485
Similarly, the <codeclass="docutils literal notranslate"><spanclass="pre">angle_coeff</span></code> command for the H-O-H angle of the water molecule sets
483
486
the force constant of the angular harmonic potential to 0 and the equilibrium
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">run</span><spanclass="pre">0</span></code> command runs the simulation for 0 steps, which is sufficient for
525
-
creating the system and saving its state. The <codeclass="docutils literal notranslate"><spanclass="pre">write_data</span></code> command
527
+
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">run</span><spanclass="pre">0</span></code> command initializes the simulation, which is required for cleanly
528
+
saving the state, but it does not advance positions or velocities. The <codeclass="docutils literal notranslate"><spanclass="pre">write_data</span></code> command
526
529
generates a file called <strong>system.data</strong> containing the information required
527
530
to restart the simulation from the final configuration produced by this input
528
531
file. With the <codeclass="docutils literal notranslate"><spanclass="pre">nocoeff</span></code> option, the parameters from the force field are
<p>The only difference from the previous input is that, instead of creating a new
570
573
box and new atoms, we open the previously created <strong>create.data</strong> file.</p>
571
574
<p>Now, let us use the SHAKE algorithm to maintain the shape of the
572
-
water molecules <spanid="id6">[<aclass="reference internal" href="../non-tutorials/bibliography.html#id27" title="Jean-Paul Ryckaert, Giovanni Ciccotti, and Herman JC Berendsen. Numerical integration of the cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. Journal of computational physics, 23(3):327–341, 1977.">35</a>, <aclass="reference internal" href="../non-tutorials/bibliography.html#id28" title="Hans C Andersen. Rattle: a “velocity” version of the shake algorithm for molecular dynamics calculations. Journal of computational Physics, 52(1):24–34, 1983.">36</a>]</span>.</p>
575
+
water molecules <spanid="id6">[<aclass="reference internal" href="../non-tutorials/bibliography.html#id27" title="Jean-Paul Ryckaert, Giovanni Ciccotti, and Herman JC Berendsen. Numerical integration of the cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. Journal of computational physics, 23(3):327–341, 1977.">35</a>, <aclass="reference internal" href="../non-tutorials/bibliography.html#id28" title="Hans C Andersen. Rattle: a “velocity” version of the shake algorithm for molecular dynamics calculations. Journal of computational Physics, 52(1):24–34, 1983.">36</a>]</span>
@@ -612,8 +616,8 @@ <h3>System equilibration<a class="headerlink" href="#system-equilibration" title
612
616
<p>Let us equilibrate further the entire system by letting both fluid and wall
613
617
relax at ambient temperature. Here, the commands are written within the same
614
618
<strong>equilibrate.lmp</strong> file, right after the <codeclass="docutils literal notranslate"><spanclass="pre">reset_timestep</span></code> command.</p>
615
-
<p>Let us update the positions of all the atoms and use a Nosé-Hoover
616
-
thermostat. Add the following lines to <strong>equilibrate.lmp</strong>:</p>
619
+
<p>Let us do a molecular dynamics simulation using
620
+
the Nosé-Hoover thermostat. Add the following lines to <strong>equilibrate.lmp</strong>:</p>
@@ -764,9 +768,10 @@ <h3>Imposed shearing<a class="headerlink" href="#imposed-shearing" title="Link t
764
768
</pre></div>
765
769
</div>
766
770
<p>Let us also extract the density and velocity profiles using
767
-
the <codeclass="docutils literal notranslate"><spanclass="pre">chunk/atom</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">ave/chunk</span></code> commands. These
768
-
commands discretize the simulation domain into spatial bins and compute and output
769
-
average properties of the atoms belonging to each bin, here the velocity
771
+
the <codeclass="docutils literal notranslate"><spanclass="pre">chunk/atom</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">ave/chunk</span></code> commands. When deployed as
772
+
below, these commands discretize the simulation domain
773
+
into spatial bins and compute and output average proper-
774
+
ties of the atoms belonging to each bin, here the velocity
770
775
along <spanclass="math notranslate nohighlight">\(x\)</span> (<codeclass="docutils literal notranslate"><spanclass="pre">vx</span></code>) within the bins. Add the following lines to <strong>shearing.lmp</strong>:</p>
0 commit comments