@@ -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:
3131Everything that appears after a hash symbol (#) is a comment
3232and ignored by LAMMPS. These five categories are not required in every input script an do not
3333necessarily 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
3636LAMMPS 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+
6473The first line, ``units lj ``, specifies the use of *reduced *
6574units, where all quantities are dimensionless. This unit system is a
6675popular 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
121131from -20 to 20 units along all three spatial dimensions. The second
122132line, ``create_box 2 simbox ``, initializes a simulation box based
123133on 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
134147The 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
137152can be changed to produce different sequences of random numbers and,
138153consequently, different initial atom positions. The fourth line adds
139154100 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
142157constraint helps avoid close contacts between atoms, which can lead
143158to 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
147169Settings
@@ -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
194217Single-point energy
195218-------------------
196219
197220The system is now fully parameterized, and the input is ready to compute
198221forces. 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
200223to **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
216239without actually running the simulation. The ``post no `` option disables
217240the 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+
219248You can now run LAMMPS (basic commands for running LAMMPS
220249are provided in :ref: `running-lammps-label `.
221250The 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
423452and visualize the trajectories of the atoms, let us print the positions
424453of 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
427456of ``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.
440469Now you can copy the commands used to create this visualization to the
441470clipboard by either using the ``Ctrl-D `` keyboard shortcut or
442471selecting ``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
444473of ``PART B `` of the **initial.lmp ** file. This may look like
445474the 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
0 commit comments