Skip to content

Commit b458611

Browse files
committed
added figures into tutorials
1 parent 1329e16 commit b458611

File tree

15 files changed

+258
-5019
lines changed

15 files changed

+258
-5019
lines changed

docs/sphinx/source/converter/main.rst

Lines changed: 0 additions & 4886 deletions
This file was deleted.

docs/sphinx/source/converter/tex-to-rst.py

Lines changed: 0 additions & 40 deletions
This file was deleted.
7.58 KB
Loading
1.66 KB
Loading
503 Bytes
Loading
2.11 KB
Loading

docs/sphinx/source/tutorial2/figures/breakable.ipynb

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

docs/sphinx/source/tutorial2/figures/unbreakable.ipynb

Lines changed: 28 additions & 12 deletions
Large diffs are not rendered by default.

docs/sphinx/source/tutorial2/tutorial.rst

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,20 @@ shows a non-linear increase with :math:`t` once the deformation starts, which is
340340
from the typical dependency of bond energy with bond distance,
341341
:math:`U_\text{b} = k_\text{b} \left( r - r_0 \right)^2`.
342342

343-
INCLUDE FIGURE CNT-unbreakable-length-energy -- a) Evolution
344-
of the length :math:`L_\text{cnt}` of the CNT with time.
345-
The CNT starts deforming at :math:`t = 5\,\text{ps}`, and :math:`L_\text{cnt-0}` is the
346-
CNT initial length.
347-
b) Evolution of the total energy :math:`E` of the system with time :math:`t`.
348-
Here, the potential is OPLS-AA, and the CNT is unbreakable.
343+
.. figure:: figures/CNT-unbreakable-length-energy-dm.png
344+
:class: only-dark
345+
:alt: Evolution of the CNT energy
346+
347+
.. figure:: figures/CNT-unbreakable-length-energy.png
348+
:class: only-light
349+
:alt: Evolution of the CNT energy
350+
351+
.. container:: figurelegend
352+
353+
a) Evolution of the length :math:`L_\text{cnt}` of the CNT with time.
354+
The CNT starts deforming at :math:`t = 5\,\text{ps}`, and :math:`L_\text{cnt-0}` is the
355+
CNT initial length. b) Evolution of the total energy :math:`E` of the system with time :math:`t`.
356+
Here, the potential is OPLS-AA, and the CNT is unbreakable.
349357

350358
Importing YAML log file into Python
351359
-----------------------------------
@@ -522,12 +530,22 @@ curve reveals a linear (elastic) regime where
522530

523531
<a href="../../../../../.dependencies/lammpstutorials-inputs/tutorial2/unbreakable-yaml-reader.py" target="_blank">unbreakable-yaml-reader.py</a>
524532

525-
ADD FIGURE CNT-breakable-stress-energy -- a) Evolution of the total energy :math:`E` of the CNT with time :math:`t`.
526-
b) Stress applied on the CNT during deformation, :math:`F_\text{cnt}/A_\text{cnt}`,
527-
where :math:`F_\text{cnt}` is the force and :math:`A_\text{cnt}` the CNT surface area,
528-
as a function of the strain, :math:`\Delta L_\text{cnt} = (L_\text{cnt}-L_\text{cnt-0}/L_\text{cnt-0})`, where
529-
:math:`L_\text{cnt}` is the CNT length and :math:`L_\text{cnt-0}` the CNT initial length.
530-
Here, the potential is AIREBO, and the CNT is breakable.
533+
.. figure:: figures/CNT-breakable-stress-energy-dm.png
534+
:class: only-dark
535+
:alt: Evolution of the CNT energy
536+
537+
.. figure:: figures/CNT-breakable-stress-energy.png
538+
:class: only-light
539+
:alt: Evolution of the CNT energy
540+
541+
.. container:: figurelegend
542+
543+
a) Evolution of the total energy :math:`E` of the CNT with time :math:`t`. b) Stress applied on the CNT
544+
during deformation, :math:`F_\text{cnt}/A_\text{cnt}`,
545+
where :math:`F_\text{cnt}` is the force and :math:`A_\text{cnt}` the CNT surface area,
546+
as a function of the strain, :math:`\Delta L_\text{cnt} = (L_\text{cnt}-L_\text{cnt-0}/L_\text{cnt-0})`, where
547+
:math:`L_\text{cnt}` is the CNT length and :math:`L_\text{cnt-0}` the CNT initial length.
548+
Here, the potential is AIREBO, and the CNT is breakable.
531549

532550
Tip: bonds representation with AIREBO
533551
-------------------------------------

docs/sphinx/source/tutorial3/tutorial.rst

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ distances, etc). Thus add to **water.lmp** the line:
6161

6262
This tutorial uses type labels :cite:`typelabel_paper` to map each
6363
numeric atom type to a string (see the **parameters.inc** file):
64-
\lmpcmdnote{labelmap atom 1 OE 2 C 3 HC 4 H 5 CPos 6 OAlc 7 OW 8 HW}
64+
``labelmap atom 1 OE 2 C 3 HC 4 H 5 CPos 6 OAlc 7 OW 8 HW``
6565
Therefore, the oxygen and hydrogen atoms of water (respectively types
66-
7 and 8) can be referred to as `OW' and `HW', respectively. Similar
66+
7 and 8) can be referred to as ``OW`` and ``HW``, respectively. Similar
6767
maps are used for the bond types, angle types, and dihedral types.
6868

6969
Let us create water molecules. To do so, let us import a molecule template called
@@ -96,9 +96,19 @@ next to **water.lmp**. This template contains the necessary
9696
structural information of a water molecule, such as the number of atoms,
9797
or the IDs of the atoms that are connected by bonds and angles.
9898

99-
INSERT-FIGURE PEG-density a) Temperature, :math:`T`, of the water reservoir from :ref:`all-atom-label`
100-
as a function of the time, :math:`t`. The horizontal dashed line is the target temperature of 300\,K.
101-
b) Evolution of the system density, :math:`\rho`, with :math:`t`
99+
.. figure:: figures/PEG-density-dm.png
100+
:class: only-dark
101+
:alt: Evolution of the water reservoir density
102+
103+
.. figure:: figures/PEG-density.png
104+
:class: only-light
105+
:alt: Evolution of the water reservoir density
106+
107+
.. container:: figurelegend
108+
109+
a) Temperature, :math:`T`, of the water reservoir as a function of the
110+
time, :math:`t`. The horizontal dashed line is the target temperature
111+
of :math:`300 \text{K}`. b) Evolution of the system density, :math:`\rho`, with :math:`t`
102112

103113
Then, let us organize the atoms of types OW and HW of the water
104114
molecules in a group named ``H2O`` and perform a small energy
@@ -130,7 +140,6 @@ The ``fix npt`` allows us to impose both a temperature of :math:`300\,\text{K}`
130140
(with a damping constant of :math:`1000\,\text{fs}`). With the ``iso`` keyword,
131141
the three dimensions of the box will be re-scaled simultaneously.
132142

133-
134143
INSERT FIGURE PEG-water The water reservoir from \hyperref[all-atom-label]{Tutorial 3}
135144
after equilibration. Oxygen atoms are in red, and hydrogen atoms are in white.
136145

@@ -361,11 +370,19 @@ the following lines to **pull.lmp**:
361370
fix mynvt all nvt temp 300 300 100
362371
fix myrct PEG recenter 0 0 0 shift all
363372
364-
Add figure PEG-distance - a) Evolution of
365-
the radius of gyration :math:`R_\text{gyr}` of the PEG molecule
366-
from \hyperref[all-atom-label]{Tutorial 3}, with the force
367-
applied starting at :math:`t = 15\,\text{ps}`. b) Histograms of the dihedral angles of type 1
368-
in the absence (orange) and in the presence (blue) of the applied force.
373+
.. figure:: figures/PEG-distance-dm.png
374+
:class: only-dark
375+
:alt: Evolution of the polymer radius of gyration
376+
377+
.. figure:: figures/PEG-distance.png
378+
:class: only-light
379+
:alt: Evolution of the polymer radius of gyration
380+
381+
.. container:: figurelegend
382+
383+
a) Evolution of the radius of gyration :math:`R_\text{gyr}` of the PEG molecule,
384+
with the force applied starting at :math:`t = 15\,\text{ps}`. b) Histograms of
385+
the dihedral angles of type 1 in the absence (orange) and in the presence (blue) of the applied force.
369386

370387
To investigate the stretching of the PEG molecule, let us compute its radius of
371388
gyration :cite:`fixmanRadiusGyrationPolymer1962a` and the angles of its dihedral

0 commit comments

Comments
 (0)