Skip to content

Commit 3baaa07

Browse files
committed
continue applying Livecoms reviewer comments
1 parent 49f9333 commit 3baaa07

File tree

2 files changed

+58
-27
lines changed

2 files changed

+58
-27
lines changed

docs/sphinx/source/tutorial1/tutorial.rst

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ file **initial.lmp** in it, and open the file in the LAMMPS--GUI Editor window:
1717
# 1) Initialization
1818
# 2) System definition
1919
# 3) Settings
20-
# 4) Visualization
20+
# 4) Monitoring
2121
# 5) Run
2222
2323
.. admonition:: If you are not using LAMMPS-GUI
@@ -31,8 +31,8 @@ file **initial.lmp** in it, and open the file in the LAMMPS--GUI Editor window:
3131
Everything that appears after a hash symbol (#) is a comment
3232
and ignored by LAMMPS. These five categories are not required in every input script an do not
3333
necessarily need to be in that exact order. For instance, the ``Settings``
34-
and the ``Visualization`` categories could be inverted, or
35-
the ``Visualization`` category could be omitted. However, note that
34+
and the ``Monitoring`` categories could be inverted, or
35+
the ``Monitoring`` category could be omitted. However, note that
3636
LAMMPS reads input files from top to bottom and processes each command
3737
*immediately*. Therefore, the ``Initialization`` and
3838
``System definition`` categories must appear at the top of the
@@ -61,6 +61,15 @@ so that the ``Initialization`` section appears as follows:
6161
atom_style atomic
6262
boundary p p p
6363
64+
.. admonition:: Note
65+
:class: non-title-info
66+
67+
Strictly speaking, none of the four commands specified in the
68+
``Initialization`` section are mandatory, as they correspond to the
69+
default settings for their respective global properties. However,
70+
explicitly specifying these defaults is considered good practice to
71+
avoid confusion when sharing input files with other LAMMPS users.
72+
6473
The first line, ``units lj``, specifies the use of *reduced*
6574
units, where all quantities are dimensionless. This unit system is a
6675
popular choice for simulations that explore general statistical
@@ -86,19 +95,20 @@ slab geometries.
8695
.. admonition:: Note
8796
:class: non-title-info
8897

89-
Strictly speaking, none of the four commands specified in the
90-
``Initialization`` section are mandatory, as they correspond to the
91-
default settings for their respective global properties. However,
92-
explicitly specifying these defaults is considered good practice to
93-
avoid confusion when sharing input files with other LAMMPS users.
98+
Each LAMMPS command is accompanied by extensive online |lammpsdocs|
99+
that details the different options for that command.
100+
From the LAMMPS--GUI editor buffer, you can access the documentation by
101+
right-clicking on a line containing a command (e.g., ``units lj``)
102+
and selecting ``View Documentation for `units'``. This action
103+
should prompt your web browser to open the corresponding URL for the
104+
online manual.
94105

95-
Each LAMMPS command is accompanied by extensive online |lammpsdocs|
96-
that details the different options for that command.
97-
From the LAMMPS--GUI editor buffer, you can access the documentation by
98-
right-clicking on a line containing a command (e.g., ``units lj``)
99-
and selecting ``View Documentation for `units'``. This action
100-
should prompt your web browser to open the corresponding URL for the
101-
online manual.
106+
.. admonition:: Note
107+
:class: non-title-info
108+
109+
Most LAMMPS commands have default settings that are applied if no value
110+
is explicitly specified. The defaults for each command are listed at the
111+
bottom of its documentation page.
102112

103113
.. |lammpsdocs| raw:: html
104114

@@ -121,6 +131,9 @@ The first line, ``region simbox (...)``, defines a region named
121131
from -20 to 20 units along all three spatial dimensions. The second
122132
line, ``create_box 2 simbox``, initializes a simulation box based
123133
on the region ``simbox`` and reserves space for two types of atoms.
134+
In LAMMPS, an atom *type* represents a group of atoms that
135+
interact using the same set of force field parameters (here, the Lennard-Jones
136+
parameters).
124137

125138
.. admonition:: Note
126139
:class: non-title-info
@@ -132,8 +145,10 @@ on the region ``simbox`` and reserves space for two types of atoms.
132145
terminate with an error.
133146

134147
The third line, ``create_atoms (...)``, generates 1500 atoms of
135-
type 1 at random positions within the ``simbox`` region. The
136-
integer 34134 is a seed for the internal random number generator, which
148+
type 1 at random positions within the ``simbox`` region. Each atom created in
149+
LAMMPS is automatically assigned a unique atom ID, which serves as a numerical
150+
identifier to distinguish individual atoms throughout the simulation
151+
The integer 34134 is a seed for the internal random number generator, which
137152
can be changed to produce different sequences of random numbers and,
138153
consequently, different initial atom positions. The fourth line adds
139154
100 atoms of type 2. Both ``create_atoms`` commands use the
@@ -142,6 +157,13 @@ distance of 0.3 units between the randomly placed atoms. This
142157
constraint helps avoid close contacts between atoms, which can lead
143158
to excessively large forces and simulation instability.
144159

160+
.. admonition:: Note
161+
:class: non-title-info
162+
163+
Another way to define a system in LAMMPS, besides ``create_atoms``, is to
164+
import an existing topology with ``read_data``, as shown
165+
in :ref:`carbon-nanotube-label`.
166+
145167
.. include:: ../shared/needhelp.rst
146168

147169
Settings
@@ -189,19 +211,20 @@ of type 2, :math:`\epsilon_{22} = 0.5`, and :math:`\sigma_{22} = 3.0`.
189211
types using geometric average: :math:`\epsilon_{ij} = \sqrt{\epsilon_{ii} \epsilon_{jj}}`,
190212
:math:`\sigma_{ij} = \sqrt{\sigma_{ii} \sigma_{jj}}`. In the present case,
191213
:math:`\epsilon_{12} = \sqrt{1.0 \times 0.5} = 0.707`, and
192-
:math:`\sigma_{12} = \sqrt{1.0 \times 3.0} = 1.732`.
214+
:math:`\sigma_{12} = \sqrt{1.0 \times 3.0} = 1.732`. Other rules
215+
can be selected using the ``pair_modify`` command.
193216

194217
Single-point energy
195218
-------------------
196219

197220
The system is now fully parameterized, and the input is ready to compute
198221
forces. Let us complete the two remaining categories,
199-
``Visualization`` and ``Run``, by adding the following lines
222+
``Monitoring`` and ``Run``, by adding the following lines
200223
to **initial.lmp**:
201224

202225
.. code-block:: lammps
203226
204-
# 4) Visualization
227+
# 4) Monitoring
205228
thermo 10
206229
thermo_style custom step etotal press
207230
# 5) Run
@@ -216,6 +239,12 @@ The ``run 0 post no`` command instructs LAMMPS to initialize forces and energy
216239
without actually running the simulation. The ``post no`` option disables
217240
the post-run summary and statistics output.
218241

242+
.. admonition:: Note
243+
:class: non-title-info
244+
245+
The *thermodynamic information* printed by LAMMPS refers to instantaneous values
246+
of thermodynamic properties at the specified steps, not cumulative averages.
247+
219248
You can now run LAMMPS (basic commands for running LAMMPS
220249
are provided in :ref:`running-lammps-label`.
221250
The simulation should finish quickly.
@@ -297,7 +326,7 @@ following lines immediately after the ``minimize`` command:
297326
.. code-block:: lammps
298327
299328
# PART B - MOLECULAR DYNAMICS
300-
# 4) Visualization
329+
# 4) Monitoring
301330
thermo 50
302331
thermo_style custom step temp etotal pe ke press
303332
@@ -423,7 +452,7 @@ thermodynamic information. To better follow the evolution of the system
423452
and visualize the trajectories of the atoms, let us print the positions
424453
of the atoms in a file at a regular interval.
425454

426-
Add the following command to the ``Visualization`` section
455+
Add the following command to the ``Monitoring`` section
427456
of ``PART B`` of the **initial.lmp** file:
428457

429458
.. code-block:: lammps
@@ -440,7 +469,7 @@ and adjust the visualization to your liking using the available buttons.
440469
Now you can copy the commands used to create this visualization to the
441470
clipboard by either using the ``Ctrl-D`` keyboard shortcut or
442471
selecting ``Copy dump image command`` from the ``File`` menu.
443-
This text can be pasted into the ``Visualization`` section
472+
This text can be pasted into the ``Monitoring`` section
444473
of ``PART B`` of the **initial.lmp** file. This may look like
445474
the following:
446475

@@ -496,7 +525,7 @@ commands in the ``System definition`` section:
496525
pair_style lj/cut 4.0
497526
pair_coeff 1 1 1.0 1.0
498527
pair_coeff 2 2 0.5 3.0
499-
# 4) Visualization
528+
# 4) Monitoring
500529
thermo 10
501530
thermo_style custom step etotal press
502531
# 5) Run
@@ -591,7 +620,7 @@ and **improved.min.lmp**:
591620
boundary p p p
592621
# 2) System definition
593622
# 3) Settings
594-
# 4) Visualization
623+
# 4) Monitoring
595624
# 5) Run
596625
597626
Since we read most of the information from the data file, we don't need
@@ -696,7 +725,7 @@ Finally, let us complete the script by adding the following lines to
696725

697726
.. code-block:: lammps
698727
699-
# 4) Visualization
728+
# 4) Monitoring
700729
thermo 1000
701730
thermo_style custom step temp pe ke etotal press v_n1_in v_n2_in c_sumcoor12
702731
dump viz all image 1000 myimage-*.ppm type type shiny 0.1 box no 0.01 view 0 0 zoom 1.8 fsaa yes size 800 800

docs/sphinx/source/tutorial2/tutorial.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ the **unbreakable.yaml** file can then be used to plot the stress-strain curve.
401401
as a function of the strain, :math:`\Delta L_\text{cnt} = (L_\text{cnt}-L_\text{cnt-0})/L_\text{cnt-0}`,
402402
where :math:`L_\text{cnt}` is the CNT length and :math:`L_\text{cnt-0}` the CNT initial length.
403403
Here, the potential is OPLS-AA, and the CNT is unbreakable.
404+
The orange line shows the raw data, and the blue line represents a time-averaged curve.
404405

405406
Breakable bonds
406407
===============
@@ -566,7 +567,8 @@ curve reveals a linear (elastic) regime where
566567
where :math:`F_\text{cnt}` is the force and :math:`A_\text{cnt}` the CNT surface area,
567568
as a function of the strain, :math:`\Delta L_\text{cnt} = (L_\text{cnt}-L_\text{cnt-0}/L_\text{cnt-0})`, where
568569
:math:`L_\text{cnt}` is the CNT length and :math:`L_\text{cnt-0}` the CNT initial length.
569-
Here, the potential is AIREBO, and the CNT is breakable.
570+
Here, the potential is AIREBO, and the CNT is breakable. The orange line shows
571+
the raw data, and the blue line represents a time-averaged curve.
570572

571573
Tip: bonds representation with AIREBO
572574
-------------------------------------

0 commit comments

Comments
 (0)