Skip to content

Commit 1061ce4

Browse files
author
Simon Gravelle
committed
removed custom v_rho
1 parent 74e2984 commit 1061ce4

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

docs/sphinx/source/tutorial3/tutorial.rst

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -163,30 +163,15 @@ Let us output the system into images by adding the following commands to **water
163163
acolor OW red acolor HW white &
164164
adiam OW 3 adiam HW 1.5
165165
166-
Let us also extract the volume and density every 500 steps:
166+
Let us also extract the volume and density, among others, every 500 steps:
167167

168168
.. code-block:: lammps
169169
170-
variable myvol equal vol
171-
variable myoxy equal count(H2O)/3
172-
variable NA equal 6.022e23
173-
variable Atom equal 1e-10
174-
variable M equal 0.018
175-
variable rho equal ${myoxy}*${M}/(v_myvol*${NA}*${Atom}^3)
176170
thermo 500
177-
thermo_style custom step temp etotal v_myvol v_rho
171+
thermo_style custom step temp etotal volume density
178172
179-
Here, several variables are defined and used for converting the units of the
180-
density in :math:`\text{kg/m}^3`: The variable ``myoxy`` represents the number of
181-
atoms divided by 3, which corresponds to the number of molecules, :math:`N_\text{H2O}`,
182-
and the variable ``myrho`` is the density in :math:`\text{kg/m}^3`.
183-
184-
.. math::
185-
186-
\rho = \dfrac{N_\text{H2O} M}{V N_\text{A}},
187-
188-
where :math:`V` is the volume in :math:`\text{m}^3`, :math:`N_\text{A}` the Avogadro number, and
189-
:math:`M = 0.018 ~ \text{kg/mol}` the molar mass of water.
173+
With the real units system, the volume is in :math:`Å^3`, and
174+
the density is in :math:`\text{g/cm}^3`.
190175

191176
Finally, let us set the timestep to 1.0 fs, and run the simulation for 15 ps by
192177
adding the following lines into **water.lmp**:

docs/sphinx/source/tutorial4/tutorial.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ must be located next to **create.lmp**. The **parameters.inc** file contains the
168168
mass Cl- 35.453
169169
mass WALL 26.9815
170170
171-
172171
Each ``mass`` command assigns a mass in g/mol to an atom type.
173172
The **parameters.inc** file also contains the pair coefficients:
174173

0 commit comments

Comments
 (0)