@@ -163,30 +163,15 @@ Let us output the system into images by adding the following commands to **water
163
163
acolor OW red acolor HW white &
164
164
adiam OW 3 adiam HW 1.5
165
165
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:
167
167
168
168
.. code-block :: lammps
169
169
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)
176
170
thermo 500
177
- thermo_style custom step temp etotal v_myvol v_rho
171
+ thermo_style custom step temp etotal volume density
178
172
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 {H2 O}`,
182
- and the variable ``myrho `` is the density in :math: `\text {kg/m}^3 `.
183
-
184
- .. math ::
185
-
186
- \rho = \dfrac {N_\text {H2 O} 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 `.
190
175
191
176
Finally, let us set the timestep to 1.0 fs, and run the simulation for 15 ps by
192
177
adding the following lines into **water.lmp **:
0 commit comments