@@ -30,9 +30,11 @@ favorable area to explore.
30
30
Basic LAMMPS parameters
31
31
-----------------------
32
32
33
- Create a folder if needed and
34
- place the initial input file, **free-energy.lmp **, into it. Then, open the
35
- file in a text editor of your choice, and copy the following into it:
33
+ To begin this tutorial, if you are using LAMMPS--GUI, select ``Start Tutorial 7 ``
34
+ from the ``Tutorials `` menu and follow the instructions. Alternatively, if you are
35
+ not using LAMMPS--GUI, create a new folder and add a file named
36
+ **free-energy.lmp **. Open the file in a text editor and paste in the following
37
+ content:
36
38
37
39
.. code-block :: lammps
38
40
@@ -48,12 +50,6 @@ file in a text editor of your choice, and copy the following into it:
48
50
pair_modify shift yes
49
51
boundary p p p
50
52
51
- .. admonition :: If you are using LAMMPS-GUI
52
- :class: gui
53
-
54
- To begin this tutorial, select ``Start Tutorial 7 `` from the
55
- ``Tutorials `` menu of LAMMPS--GUI and follow the instructions.
56
-
57
53
Here, we begin by defining variables for the Lennard-Jones interaction
58
54
:math: `\sigma ` and :math: `\epsilon ` and for the repulsive potential
59
55
:math: `U`, which are :math: `U_0 `, :math: `\delta `, and
@@ -152,10 +148,18 @@ referred to as ``mymes``, using the ``n_center`` variable:
152
148
thermo_style custom step temp etotal v_n_center
153
149
thermo 10000
154
150
155
- dump viz all image 50000 myimage-*.ppm type type shiny 0.1 box yes 0.01 view 180 90 zoom 6 size 1600 500 fsaa yes
156
- dump_modify viz backcolor white acolor 1 cyan adiam 1 3 boxcolor black
151
+ For visualization, use one of the following options: the ``dump image `` command to
152
+ create .ppm images of the system, or the ``dump atom `` command to write a
153
+ VMD-compatible trajectory to a file:
154
+
155
+ .. code-block :: lammps
156
+
157
+ # Option 1
158
+ dump viz1 all image 50000 myimage-*.ppm type type shiny 0.1 box yes 0.01 view 180 90 zoom 6 size 1600 500 fsaa yes
159
+ dump_modify viz1 backcolor white acolor 1 cyan adiam 1 3 boxcolor black
157
160
158
- A ``dump image `` command was also added for system visualization.
161
+ # Option 2
162
+ dump viz2 all atom 50000 free-energy.lammpstrj
159
163
160
164
Finally, let us perform an equilibration of 50000 steps,
161
165
using a timestep of :math: `2 \,\text {fs}`, corresponding to a total duration of :math: `100 \,\text {ps}`:
@@ -213,6 +217,8 @@ LAMMPS.
213
217
:class: only-light
214
218
:alt: Density from umbrella sampling simulations
215
219
220
+ .. container :: figurelegend
221
+
216
222
Figure: Snapshot of the system simulated during the free sampling step of the tutorial.
217
223
The atoms density is the lowest in the central part of the box, ``mymes ``. Here,
218
224
:math: `U_0 = 0.36 ~\text {kcal/mol}`, :math: `\delta = 1.0 ~\text {Å}`, and :math: `x_0 = 10 ~\text {Å}`.
@@ -279,8 +285,9 @@ unbiased free energy profile.
279
285
LAMMPS input script
280
286
-------------------
281
287
282
- Open the file named **umbrella-sampling.lmp **, which should
283
- contain the following lines:
288
+ If you are using LAMMPS--GUI, open the file named **free-energy.lmp **.
289
+ Alternatively, if you are not using LAMMPS--GUI, create a new input file
290
+ and paste in the following content:
284
291
285
292
.. code-block :: lammps
286
293
@@ -341,9 +348,12 @@ umbrella sampling run:
341
348
342
349
thermo 5000
343
350
344
- dump viz all image 50000 myimage-*.ppm type type shiny 0.1 box yes 0.01 view 180 90 zoom 6 size 1600 500 fsaa yes
345
- dump_modify viz backcolor white acolor 1 cyan &
346
- acolor 2 red adiam 1 3 adiam 2 3 boxcolor black
351
+ # Option 1
352
+ dump viz1 all image 50000 myimage-*.ppm type type shiny 0.1 box yes 0.01 view 180 90 zoom 6 size 1600 500 fsaa yes
353
+ dump_modify viz1 backcolor white acolor 1 cyan acolor 2 red adiam 1 3 adiam 2 3 boxcolor black
354
+
355
+ # Option 2
356
+ dump viz2 all atom 50000 free-energy.lammpstrj
347
357
348
358
timestep 2.0
349
359
run 50000
0 commit comments