@@ -151,19 +151,6 @@ The ``fix npt`` allows us to impose both a temperature of :math:`300\,\text{K}`
151151(with a damping constant of :math: `1000 \,\text {fs}`). With the ``iso `` keyword,
152152the three dimensions of the box will be re-scaled simultaneously.
153153
154- .. figure :: figures/water-light.png
155- :alt: Water reservoir from molecular dynamics simulations
156- :class: only-light
157-
158- .. figure :: figures/water-dark.png
159- :alt: Water reservoir from molecular dynamics simulations
160- :class: only-dark
161-
162- .. container :: figurelegend
163-
164- Figure: The water reservoir after equilibration. Oxygen atoms are in red, and
165- hydrogen atoms are in white.
166-
167154Let us output the system into images by adding the following commands to **water.lmp **:
168155
169156.. code-block :: lammps
@@ -212,9 +199,20 @@ adding the following lines into **water.lmp**:
212199 The final state is saved in a binary file named **water.restart **.
213200Run the input using LAMMPS. The system reaches its equilibrium temperature
214201after just a few picoseconds, and its equilibrium density after approximately
215- 10 picoseconds (Fig.~\r ef{fig:PEG-density}). A snapshot of the equilibrated
216- system can also be seen in Fig.~\r ef{fig:PEG-water}.
202+ 10 picoseconds.
217203
204+ .. figure :: figures/water-light.png
205+ :alt: Water reservoir from molecular dynamics simulations
206+ :class: only-light
207+
208+ .. figure :: figures/water-dark.png
209+ :alt: Water reservoir from molecular dynamics simulations
210+ :class: only-dark
211+
212+ .. container :: figurelegend
213+
214+ Figure: The water reservoir after equilibration. Oxygen atoms are in red, and
215+ hydrogen atoms are in white.
218216
219217.. admonition :: Note
220218 :class: non-title-info
@@ -330,19 +328,6 @@ Let us create images of the systems:
330328 acolor OAlc darkred adiam OAlc 2.6
331329 thermo 500
332330
333- .. figure :: figures/solvatedPEG_light.png
334- :alt: PEG in water as simulated with LAMMPS
335- :class: only-light
336-
337- .. figure :: figures/solvatedPEG_dark.png
338- :alt: PEG in water as simulated with LAMMPS
339- :class: only-dark
340-
341- .. container :: figurelegend
342-
343- Figure : The PEG molecule solvated in water. Water is represented as a
344- transparent field for clarity.
345-
346331 Finally, to perform a short equilibration and save the final state to
347332a **.restart ** file, add the following lines to the input:
348333
@@ -358,7 +343,19 @@ sure that the temperature remains close to the
358343target value of :math: `300 ~\text {K}` throughout the entire simulation, and that
359344the volume and total energy are almost constant, indicating
360345that the system was in a reasonable configuration from the start.
361- See a snapshot of the system in Fig.~\r ef{fig:PEG-solvated}.
346+
347+ .. figure :: figures/solvatedPEG_light.png
348+ :alt: PEG in water as simulated with LAMMPS
349+ :class: only-light
350+
351+ .. figure :: figures/solvatedPEG_dark.png
352+ :alt: PEG in water as simulated with LAMMPS
353+ :class: only-dark
354+
355+ .. container :: figurelegend
356+
357+ Figure : The PEG molecule solvated in water. Water is represented as a
358+ transparent field for clarity.
362359
363360Stretching the PEG molecule
364361===========================
@@ -389,22 +386,10 @@ following lines to **pull.lmp**:
389386
390387 These lines identify the oxygen atoms (type OAlc) at the ends of the PEG
391388molecule and calculates their center of mass along the :math: `x`-axis. It then
392- divides these atoms into two groups, ``end1 `` (i.e.,~ the OAlc atom to
393- the right of the center) and ``end2 `` (i.e.,~ the OAlc atom to the right
389+ divides these atoms into two groups, ``end1 `` (i.e., the OAlc atom to
390+ the right of the center) and ``end2 `` (i.e., the OAlc atom to the right
394391of the center), for applying force during the stretching process.
395392
396- .. figure :: figures/pulled_peg_light.png
397- :alt: PEG in water as simulated with LAMMPS
398- :class: only-light
399-
400- .. figure :: figures/pulled_peg_dark.png
401- :alt: PEG in water as simulated with LAMMPS
402- :class: only-dark
403-
404- .. container :: figurelegend
405-
406- Figure: PEG molecule stretched along the :math: `x` direction in water.
407-
408393Add the following ``dump `` command to create images of the system:
409394
410395.. code-block :: lammps
@@ -424,20 +409,6 @@ the following lines to **pull.lmp**:
424409 fix mynvt all nvt temp 300 300 100
425410 fix myrct PEG recenter 0 0 0 shift all
426411
427- .. figure :: figures/PEG-distance-dm.png
428- :class: only-dark
429- :alt: Evolution of the polymer radius of gyration
430-
431- .. figure :: figures/PEG-distance.png
432- :class: only-light
433- :alt: Evolution of the polymer radius of gyration
434-
435- .. container :: figurelegend
436-
437- Figure: a) Evolution of the radius of gyration :math: `R_\text {gyr}` of the PEG molecule,
438- with the force applied starting at :math: `t = 15 \,\text {ps}`. b) Histograms of
439- the dihedral angles of type 1 in the absence (orange) and in the presence (blue) of the applied force.
440-
441412 To investigate the stretching of the PEG molecule, let us compute its radius of
442413gyration :cite: `fixmanRadiusGyrationPolymer1962a ` and the angles of its dihedral
443414constraints using the following commands:
@@ -481,15 +452,40 @@ Each applied force has a magnitude of :math:`10 \, \text{kcal/mol/Å}`, correspo
481452This value was chosen to be sufficiently large to overcome both the thermal agitation and
482453the entropic contributions from the molecules.
483454
455+ .. figure :: figures/pulled_peg_light.png
456+ :alt: PEG in water as simulated with LAMMPS
457+ :class: only-light
458+
459+ .. figure :: figures/pulled_peg_dark.png
460+ :alt: PEG in water as simulated with LAMMPS
461+ :class: only-dark
462+
463+ .. container :: figurelegend
464+
465+ Figure: PEG molecule stretched along the :math: `x` direction in water.
466+
484467Run the **pull.lmp ** file using LAMMPS. From the generated images of the system,
485- you should observe that the PEG molecule eventually aligns
486- in the direction of the applied force (as seen in Fig.~\r ef{fig:PEG-in-water}).
487- The evolutions of the radius of gyration over
488- time indicates that the PEG quickly adjusts to the external force
489- (Fig.~\r ef{fig:PEG-distance}\, a). Additionally, from the values of the dihedral angles
468+ you should observe that the PEG molecule eventually aligns in the direction of
469+ the applied force. The evolutions of the radius of gyration over
470+ time indicates that the PEG quickly adjusts to the external force. Additionally,
471+ from the values of the dihedral angles
490472printed in the **pull.dat ** file, you can create a histogram
491473of dihedral angles for a specific type. For example, the angle :math: `\phi ` for dihedrals
492- of type 1 (C-C-OE-C) is shown in Fig.~\r ef{fig:PEG-distance}\, b.
474+ of type 1 (C-C-OE-C) is shown below.
475+
476+ .. figure :: figures/PEG-distance-dm.png
477+ :class: only-dark
478+ :alt: Evolution of the polymer radius of gyration
479+
480+ .. figure :: figures/PEG-distance.png
481+ :class: only-light
482+ :alt: Evolution of the polymer radius of gyration
483+
484+ .. container :: figurelegend
485+
486+ Figure: a) Evolution of the radius of gyration :math: `R_\text {gyr}` of the PEG molecule,
487+ with the force applied starting at :math: `t = 15 \,\text {ps}`. b) Histograms of
488+ the dihedral angles of type 1 in the absence (orange) and in the presence (blue) of the applied force.
493489
494490Tip: using external visualization tools
495491---------------------------------------
0 commit comments