Skip to content

Commit 479940d

Browse files
committed
deploy: 1841d4b
1 parent 9fa9691 commit 479940d

File tree

6 files changed

+51
-105
lines changed

6 files changed

+51
-105
lines changed
0 Bytes
Binary file not shown.
Binary file not shown.

sphinx/build/html/_sources/tutorials/level1/breaking-a-carbon-nanotube.rst.txt

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ The LAMMPS input
211211

212212
Just like in :ref:`lennard-jones-label`,
213213
the pair style is *lj/cut* (i.e. a Lennard-Jones potential
214-
with a short-range cutoff) with
215-
parameter 14, which means that only the atoms closer than 14
216-
Ångstroms from each other interact through a Lennard-Jones
214+
with a short-range cutoff) with parameter 14, which means that only the atoms
215+
closer than 14 Ångstroms from each other interact through a Lennard-Jones
217216
potential.
218217

219218
.. container:: justify
@@ -288,8 +287,8 @@ The LAMMPS input
288287

289288
.. container:: justify
290289

291-
The file *parm.lammps* is included in the
292-
simulation by adding the following line into the *input.lammps* file:
290+
The file *parm.lammps* is included in the simulation by adding the
291+
following line into the *input.lammps* file:
293292

294293
.. code-block:: lammps
295294
@@ -300,12 +299,10 @@ Prepare the initial state
300299

301300
.. container:: justify
302301

303-
Before starting the molecular dynamics simulation,
304-
let us make sure that we start from a clean initial state
305-
by recentering the CNT at the origin (0, 0, 0). In addition,
306-
let us make sure that the box boundaries
307-
are symmetric with respect to (0, 0, 0), which is not initially the case,
308-
as seen in *cnt_molecular.data*:
302+
Before starting the molecular dynamics simulation, let us make sure that we
303+
start from a clean initial state by recentering the CNT at the origin (0, 0, 0).
304+
In addition, let us make sure that the box boundaries are symmetric with
305+
respect to (0, 0, 0), which is not initially the case, as seen in *cnt_molecular.data*:
309306

310307
.. code-block:: lammps
311308
@@ -332,9 +329,8 @@ Prepare the initial state
332329
The first command includes all the atoms of type 1
333330
(i.e. all the atoms here) in a group named *carbon_atoms*.
334331
The 3 variables, *carbon_xcm*, *carbon_ycm*, and *carbon_zcm*
335-
are used to measure
336-
the current position of the group *carbon_atoms*
337-
along all 3 directions, respectively. Then, the *displace_atoms*
332+
are used to measure the current position of the group *carbon_atoms* along
333+
all 3 directions, respectively. Then, the *displace_atoms*
338334
command moves the group *carbon_atoms*, ensuring that its center of mass
339335
is located at the origin (0, 0, 0).
340336

@@ -357,8 +353,7 @@ Prepare the initial state
357353

358354
A displacement will be imposed on the edges of the CNT. To do so, let us isolate the
359355
atoms from the two edges and place them into groups named *rtop*
360-
and *rbot*, respectively.
361-
Add the following lines into *input.lammps*:
356+
and *rbot*, respectively. Add the following lines into *input.lammps*:
362357

363358
.. code-block:: lammps
364359
@@ -488,12 +483,10 @@ The molecular dynamics
488483

489484
.. container:: justify
490485

491-
The *fix nve* is applied to all atoms so that all
492-
atom positions are recalculated at every step, and
493-
a *Berendsen* thermostat is applied to the atoms
494-
of the group *carbon_mid* only :cite:`berendsen1984molecular`.
495-
The *fix_modify myber* ensures that the
496-
*fix Berendsen* uses the temperature of the group *carbon_mid* as an
486+
The *fix nve* is applied to all atoms so that all atom positions are
487+
recalculated at every step, and a *Berendsen* thermostat is applied to the atoms
488+
of the group *carbon_mid* only :cite:`berendsen1984molecular`. The *fix_modify myber*
489+
ensures that the *fix Berendsen* uses the temperature of the group *carbon_mid* as an
497490
input, instead of the temperature of the whole system. This is necessary
498491
to make sure that the frozen edges won't bias the temperature. Note that the atoms
499492
of the edges do not need a thermostat because their motion will
@@ -897,9 +890,8 @@ Start the simulation
897890
898891
.. container:: justify
899892

900-
Note the relatively small timestep of :math:`0.0005\,\text{ps}`
901-
used. A reactive force field usually requires a smaller timestep
902-
than a classical one.
893+
Note the relatively small timestep of :math:`0.0005\,\text{ps}` used. A
894+
reactive force field usually requires a smaller timestep than a classical one.
903895
When running *input.lammps* with LAMMPS, you can see that the
904896
temperature deviates from the target temperature of :math:`300\,\text{K}`
905897
at the start of the equilibration, but that

sphinx/build/html/tutorials/level1/breaking-a-carbon-nanotube.html

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,8 @@ <h3>The LAMMPS input<a class="headerlink" href="#the-lammps-input" title="Link t
450450
<div class="justify docutils container">
451451
<p>Just like in <a class="reference internal" href="lennard-jones-fluid.html#lennard-jones-label"><span class="std std-ref">Lennard-Jones fluid</span></a>,
452452
the pair style is <em>lj/cut</em> (i.e. a Lennard-Jones potential
453-
with a short-range cutoff) with
454-
parameter 14, which means that only the atoms closer than 14
455-
Ångstroms from each other interact through a Lennard-Jones
453+
with a short-range cutoff) with parameter 14, which means that only the atoms
454+
closer than 14 Ångstroms from each other interact through a Lennard-Jones
456455
potential.</p>
457456
</div>
458457
<div class="justify docutils container">
@@ -515,8 +514,8 @@ <h3>The LAMMPS input<a class="headerlink" href="#the-lammps-input" title="Link t
515514
between 4 atoms.</p>
516515
</div>
517516
<div class="justify docutils container">
518-
<p>The file <em>parm.lammps</em> is included in the
519-
simulation by adding the following line into the <em>input.lammps</em> file:</p>
517+
<p>The file <em>parm.lammps</em> is included in the simulation by adding the
518+
following line into the <em>input.lammps</em> file:</p>
520519
</div>
521520
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">include</span><span class="w"> </span><span class="n">parm.lammps</span>
522521
</pre></div>
@@ -525,12 +524,10 @@ <h3>The LAMMPS input<a class="headerlink" href="#the-lammps-input" title="Link t
525524
<section id="prepare-the-initial-state">
526525
<h3>Prepare the initial state<a class="headerlink" href="#prepare-the-initial-state" title="Link to this heading"></a></h3>
527526
<div class="justify docutils container">
528-
<p>Before starting the molecular dynamics simulation,
529-
let us make sure that we start from a clean initial state
530-
by recentering the CNT at the origin (0, 0, 0). In addition,
531-
let us make sure that the box boundaries
532-
are symmetric with respect to (0, 0, 0), which is not initially the case,
533-
as seen in <em>cnt_molecular.data</em>:</p>
527+
<p>Before starting the molecular dynamics simulation, let us make sure that we
528+
start from a clean initial state by recentering the CNT at the origin (0, 0, 0).
529+
In addition, let us make sure that the box boundaries are symmetric with
530+
respect to (0, 0, 0), which is not initially the case, as seen in <em>cnt_molecular.data</em>:</p>
534531
</div>
535532
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="o">-</span><span class="m">40.000000</span><span class="w"> </span><span class="m">40.000000</span><span class="w"> </span><span class="n">xlo</span><span class="w"> </span><span class="n">xhi</span>
536533
<span class="o">-</span><span class="m">40.000000</span><span class="w"> </span><span class="m">40.000000</span><span class="w"> </span><span class="n">ylo</span><span class="w"> </span><span class="n">yhi</span>
@@ -553,9 +550,8 @@ <h3>Prepare the initial state<a class="headerlink" href="#prepare-the-initial-st
553550
<p>The first command includes all the atoms of type 1
554551
(i.e. all the atoms here) in a group named <em>carbon_atoms</em>.
555552
The 3 variables, <em>carbon_xcm</em>, <em>carbon_ycm</em>, and <em>carbon_zcm</em>
556-
are used to measure
557-
the current position of the group <em>carbon_atoms</em>
558-
along all 3 directions, respectively. Then, the <em>displace_atoms</em>
553+
are used to measure the current position of the group <em>carbon_atoms</em> along
554+
all 3 directions, respectively. Then, the <em>displace_atoms</em>
559555
command moves the group <em>carbon_atoms</em>, ensuring that its center of mass
560556
is located at the origin (0, 0, 0).</p>
561557
</div>
@@ -574,8 +570,7 @@ <h3>Prepare the initial state<a class="headerlink" href="#prepare-the-initial-st
574570
<div class="justify docutils container">
575571
<p>A displacement will be imposed on the edges of the CNT. To do so, let us isolate the
576572
atoms from the two edges and place them into groups named <em>rtop</em>
577-
and <em>rbot</em>, respectively.
578-
Add the following lines into <em>input.lammps</em>:</p>
573+
and <em>rbot</em>, respectively. Add the following lines into <em>input.lammps</em>:</p>
579574
</div>
580575
<div class="highlight-lammps notranslate"><div class="highlight"><pre><span></span><span class="k">variable </span><span class="nv nv-Identifier">zmax</span><span class="w"> </span><span class="n">equal</span><span class="w"> </span><span class="n">bound</span><span class="nv">(carbon_atoms,zmax)</span><span class="o">-</span><span class="m">0.5</span>
581576
<span class="k">variable </span><span class="nv nv-Identifier">zmin</span><span class="w"> </span><span class="n">equal</span><span class="w"> </span><span class="n">bound</span><span class="nv">(carbon_atoms,zmin)</span><span class="o">+</span><span class="m">0.5</span>
@@ -684,12 +679,10 @@ <h3>The molecular dynamics<a class="headerlink" href="#the-molecular-dynamics" t
684679
nor rotational momentum, <em>rot yes</em>.</p>
685680
</div>
686681
<div class="justify docutils container">
687-
<p>The <em>fix nve</em> is applied to all atoms so that all
688-
atom positions are recalculated at every step, and
689-
a <em>Berendsen</em> thermostat is applied to the atoms
690-
of the group <em>carbon_mid</em> only <span id="id5">[<a class="reference internal" href="../../non-tutorials/bibliography.html#id50" title="Herman JC Berendsen, JPM Postma, Wilfred F van Gunsteren, ARHJ DiNola, and Jan R Haak. Molecular dynamics with coupling to an external bath. The Journal of chemical physics, 81(8):3684–3690, 1984.">22</a>]</span>.
691-
The <em>fix_modify myber</em> ensures that the
692-
<em>fix Berendsen</em> uses the temperature of the group <em>carbon_mid</em> as an
682+
<p>The <em>fix nve</em> is applied to all atoms so that all atom positions are
683+
recalculated at every step, and a <em>Berendsen</em> thermostat is applied to the atoms
684+
of the group <em>carbon_mid</em> only <span id="id5">[<a class="reference internal" href="../../non-tutorials/bibliography.html#id50" title="Herman JC Berendsen, JPM Postma, Wilfred F van Gunsteren, ARHJ DiNola, and Jan R Haak. Molecular dynamics with coupling to an external bath. The Journal of chemical physics, 81(8):3684–3690, 1984.">22</a>]</span>. The <em>fix_modify myber</em>
685+
ensures that the <em>fix Berendsen</em> uses the temperature of the group <em>carbon_mid</em> as an
693686
input, instead of the temperature of the whole system. This is necessary
694687
to make sure that the frozen edges won’t bias the temperature. Note that the atoms
695688
of the edges do not need a thermostat because their motion will
@@ -1029,9 +1022,8 @@ <h3>Start the simulation<a class="headerlink" href="#start-the-simulation" title
10291022
</pre></div>
10301023
</div>
10311024
<div class="justify docutils container">
1032-
<p>Note the relatively small timestep of <span class="math notranslate nohighlight">\(0.0005\,\text{ps}\)</span>
1033-
used. A reactive force field usually requires a smaller timestep
1034-
than a classical one.
1025+
<p>Note the relatively small timestep of <span class="math notranslate nohighlight">\(0.0005\,\text{ps}\)</span> used. A
1026+
reactive force field usually requires a smaller timestep than a classical one.
10351027
When running <em>input.lammps</em> with LAMMPS, you can see that the
10361028
temperature deviates from the target temperature of <span class="math notranslate nohighlight">\(300\,\text{K}\)</span>
10371029
at the start of the equilibration, but that

sphinx/source/tutorials/figures/level1/breaking-a-carbon-nanotube/energy-breakable-pyplot.ipynb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -151,36 +151,6 @@
151151
"# myplt.add_subplotlabels()\n",
152152
"myplt.save_figure(filename = filename, saving_path = './')"
153153
]
154-
},
155-
{
156-
"cell_type": "code",
157-
"execution_count": 21,
158-
"id": "bc2fb296",
159-
"metadata": {},
160-
"outputs": [
161-
{
162-
"data": {
163-
"text/plain": [
164-
"array([3. , 3.06122449, 3.12244898, 3.18367347, 3.24489796,\n",
165-
" 3.30612245, 3.36734694, 3.42857143, 3.48979592, 3.55102041,\n",
166-
" 3.6122449 , 3.67346939, 3.73469388, 3.79591837, 3.85714286,\n",
167-
" 3.91836735, 3.97959184, 4.04081633, 4.10204082, 4.16326531,\n",
168-
" 4.2244898 , 4.28571429, 4.34693878, 4.40816327, 4.46938776,\n",
169-
" 4.53061224, 4.59183673, 4.65306122, 4.71428571, 4.7755102 ,\n",
170-
" 4.83673469, 4.89795918, 4.95918367, 5.02040816, 5.08163265,\n",
171-
" 5.14285714, 5.20408163, 5.26530612, 5.32653061, 5.3877551 ,\n",
172-
" 5.44897959, 5.51020408, 5.57142857, 5.63265306, 5.69387755,\n",
173-
" 5.75510204, 5.81632653, 5.87755102, 5.93877551, 6. ])"
174-
]
175-
},
176-
"execution_count": 21,
177-
"metadata": {},
178-
"output_type": "execute_result"
179-
}
180-
],
181-
"source": [
182-
"x"
183-
]
184154
}
185155
],
186156
"metadata": {

sphinx/source/tutorials/level1/breaking-a-carbon-nanotube.rst

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ The LAMMPS input
211211

212212
Just like in :ref:`lennard-jones-label`,
213213
the pair style is *lj/cut* (i.e. a Lennard-Jones potential
214-
with a short-range cutoff) with
215-
parameter 14, which means that only the atoms closer than 14
216-
Ångstroms from each other interact through a Lennard-Jones
214+
with a short-range cutoff) with parameter 14, which means that only the atoms
215+
closer than 14 Ångstroms from each other interact through a Lennard-Jones
217216
potential.
218217

219218
.. container:: justify
@@ -288,8 +287,8 @@ The LAMMPS input
288287

289288
.. container:: justify
290289

291-
The file *parm.lammps* is included in the
292-
simulation by adding the following line into the *input.lammps* file:
290+
The file *parm.lammps* is included in the simulation by adding the
291+
following line into the *input.lammps* file:
293292

294293
.. code-block:: lammps
295294
@@ -300,12 +299,10 @@ Prepare the initial state
300299

301300
.. container:: justify
302301

303-
Before starting the molecular dynamics simulation,
304-
let us make sure that we start from a clean initial state
305-
by recentering the CNT at the origin (0, 0, 0). In addition,
306-
let us make sure that the box boundaries
307-
are symmetric with respect to (0, 0, 0), which is not initially the case,
308-
as seen in *cnt_molecular.data*:
302+
Before starting the molecular dynamics simulation, let us make sure that we
303+
start from a clean initial state by recentering the CNT at the origin (0, 0, 0).
304+
In addition, let us make sure that the box boundaries are symmetric with
305+
respect to (0, 0, 0), which is not initially the case, as seen in *cnt_molecular.data*:
309306

310307
.. code-block:: lammps
311308
@@ -332,9 +329,8 @@ Prepare the initial state
332329
The first command includes all the atoms of type 1
333330
(i.e. all the atoms here) in a group named *carbon_atoms*.
334331
The 3 variables, *carbon_xcm*, *carbon_ycm*, and *carbon_zcm*
335-
are used to measure
336-
the current position of the group *carbon_atoms*
337-
along all 3 directions, respectively. Then, the *displace_atoms*
332+
are used to measure the current position of the group *carbon_atoms* along
333+
all 3 directions, respectively. Then, the *displace_atoms*
338334
command moves the group *carbon_atoms*, ensuring that its center of mass
339335
is located at the origin (0, 0, 0).
340336

@@ -357,8 +353,7 @@ Prepare the initial state
357353

358354
A displacement will be imposed on the edges of the CNT. To do so, let us isolate the
359355
atoms from the two edges and place them into groups named *rtop*
360-
and *rbot*, respectively.
361-
Add the following lines into *input.lammps*:
356+
and *rbot*, respectively. Add the following lines into *input.lammps*:
362357

363358
.. code-block:: lammps
364359
@@ -488,12 +483,10 @@ The molecular dynamics
488483

489484
.. container:: justify
490485

491-
The *fix nve* is applied to all atoms so that all
492-
atom positions are recalculated at every step, and
493-
a *Berendsen* thermostat is applied to the atoms
494-
of the group *carbon_mid* only :cite:`berendsen1984molecular`.
495-
The *fix_modify myber* ensures that the
496-
*fix Berendsen* uses the temperature of the group *carbon_mid* as an
486+
The *fix nve* is applied to all atoms so that all atom positions are
487+
recalculated at every step, and a *Berendsen* thermostat is applied to the atoms
488+
of the group *carbon_mid* only :cite:`berendsen1984molecular`. The *fix_modify myber*
489+
ensures that the *fix Berendsen* uses the temperature of the group *carbon_mid* as an
497490
input, instead of the temperature of the whole system. This is necessary
498491
to make sure that the frozen edges won't bias the temperature. Note that the atoms
499492
of the edges do not need a thermostat because their motion will
@@ -897,9 +890,8 @@ Start the simulation
897890
898891
.. container:: justify
899892

900-
Note the relatively small timestep of :math:`0.0005\,\text{ps}`
901-
used. A reactive force field usually requires a smaller timestep
902-
than a classical one.
893+
Note the relatively small timestep of :math:`0.0005\,\text{ps}` used. A
894+
reactive force field usually requires a smaller timestep than a classical one.
903895
When running *input.lammps* with LAMMPS, you can see that the
904896
temperature deviates from the target temperature of :math:`300\,\text{K}`
905897
at the start of the equilibration, but that

0 commit comments

Comments
 (0)