Skip to content

Commit 9008bdb

Browse files
committed
continue implementing reviewers comments
1 parent 8e3bda1 commit 9008bdb

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

docs/sphinx/source/tutorial1/tutorial.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,19 @@ lines in ``PART B`` of **initial.lmp**:
354354
run 50000
355355
356356
The ``fix nve`` command updates the positions and velocities of the
357-
atoms in the group ``all`` at every step. The group ``all``
357+
atoms in the group ``all`` at every step. More specifically, this command integrates
358+
Newton's equations of motion using the velocity-Verlet algorithm. The group ``all``
358359
is a default group that contains all atoms. The last two lines specify
359360
the value of the ``timestep`` and the number of steps for the
360361
``run``, respectively, for a total duration of 250 time units.
361362

362363
.. admonition:: Note
363364
:class: non-title-info
364365

365-
Since no other fix commands alter forces or velocities, and periodic
366-
boundary conditions are applied in all directions, the MD simulation
367-
will be performed in the microcanonical (NVE) ensemble, which
368-
maintains a constant number of particles and a fixed box volume. In
366+
Since the only command affecting forces and velocities in the
367+
present script is ``fix nve``, and periodic boundary conditions are applied
368+
in all directions, the MD simulation will be performed in the microcanonical (NVE) ensemble, which
369+
maintains a constant number of particles and a fixed box volume. In
369370
this ensemble, the system does not exchange energy with anything
370371
outside the simulation box.
371372

@@ -578,7 +579,7 @@ right-clicking on the file name in the editor and selecting the entry
578579
The created **.data** file contains all the information necessary
579580
to restart the simulation, such as the number of atoms, the box size,
580581
the masses, and the pair coefficients. This **.data** file also
581-
contains the final positions of the atoms within the ``Atoms``
582+
contains the final positions of the atoms, along with their IDs and types, within the ``Atoms``
582583
section. The first five columns of the ``Atoms`` section
583584
correspond (from left to right) to the atom indexes (from 1 to the total
584585
number of atoms, 1150), the atom types (1 or 2 here), and the positions
@@ -709,11 +710,23 @@ atoms. Add the following lines to **improved.md.lmp**:
709710
710711
The ``compute reduce ave`` command is used to average the per-atom
711712
coordination number calculated by the ``coord/atom``
712-
compute command. Compute commands are not automatically invoked; they
713+
compute command. Compute commands do not print or output
714+
anything by themselves, nor are they automatically executed; they
713715
require a *consumer* command that references the compute. In this case, the
714716
first compute is referenced by the second, and we reference the second
715717
in a ``thermo_style custom`` command (see below).
716718

719+
.. admonition:: Note
720+
:class: non-title-info
721+
722+
LAMMPS ``compute`` commands can produce three kinds of data: scalars (single values),
723+
vectors (one-dimensional arrays), or arrays (two-dimensional tables).
724+
When referencing results of a compute, you can use indices: for example,
725+
``c\_mycompute`` refers to the entire scalar, vector, or array, and
726+
``c\_mycompute[1]`` refers to its first element (in case of vector or array).
727+
In general, *consumer* commands can only work with certain data types,
728+
check the documentation of each command to ensure compatibility.
729+
717730
.. admonition:: Note
718731
:class: non-title-info
719732

0 commit comments

Comments
 (0)