Skip to content

Commit a544200

Browse files
committed
improved simulation
1 parent 28a039a commit a544200

File tree

2 files changed

+71
-37
lines changed

2 files changed

+71
-37
lines changed

docs/doc-sphinx/source/journal-article.bib

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,17 @@ @article{gravelle2021violations
285285
publisher={APS}
286286
}
287287

288+
@article{debye1909naherungsformeln,
289+
title={N{\"a}herungsformeln f{\"u}r die Zylinderfunktionen f{\"u}r gro{\ss}e Werte des Arguments und unbeschr{\"a}nkt ver{\"a}nderliche Werte des Index},
290+
author={Debye, Peter},
291+
journal={Mathematische Annalen},
292+
volume={67},
293+
number={4},
294+
pages={535--558},
295+
year={1909},
296+
publisher={Springer}
297+
}
298+
288299
@article{liese2017hydration,
289300
title={Hydration effects turn a highly stretched polymer from an entropic into an energetic spring},
290301
author={Liese, Susanne and Gensler, Manuel and Krysiak, Stefanie and Schwarzl, Richard and Achazi, Andreas and Paulus, Beate and Hugel, Thorsten and Rabe, Jürgen P and Netz, Roland R},

docs/doc-sphinx/source/tutorials/bulksolution.rst

Lines changed: 60 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ The input files
196196
in it. These four files contain information about
197197
the atoms (names, masses, changes, Lennard-Jones
198198
coefficients) and residues (bond and angular
199-
constraints) for all the species that will be involved here.
199+
constraints) for all the species that are involved here.
200200

201201
.. |forcefield.itp| raw:: html
202202

@@ -224,8 +224,10 @@ The input files
224224

225225
- the number of steps to perform,
226226
- the thermostat to be used (e.g. Langevin, Berendsen),
227-
- the cut-off for the interactions (e.g. Lennard-Jones),
228-
- the molecular dynamics integrator (e.g. steep-decent, molecular dynamics).
227+
- the cut-off for the interactions,
228+
- the molecular dynamics integrator (e.g. steep-descent, molecular dynamics).
229+
230+
.. container:: justify
229231

230232
In this tutorial, 4 different input files will be
231233
written in order to perform respectively an energy
@@ -234,7 +236,9 @@ The input files
234236
ensemble (with changing box size), and finally a production run.
235237
Input files will be placed in a 'inputs/' folder.
236238

237-
At this point, your folder should look like that:
239+
.. container:: justify
240+
241+
At this point, the folder should look like that:
238242

239243
.. figure:: figures/bulksolution/gromacs_inputs-light.png
240244
:alt: Gromacs files and structure folder
@@ -251,39 +255,40 @@ The input files
251255
The rest of the tutorial focusses on writing the input files and performing the
252256
molecular dynamics simulation.
253257

254-
.. include:: ../contact/supportme.rst
255-
256258
Energy minimization
257259
===================
258260

259261
.. container:: justify
260262

261-
It is clear from the configuration (.gro) file that the molecules and ions are currently in a
262-
quite unphysical configuration (i.e. too regularly aligned). It would be risky to
263-
directly perform a molecular dynamics simulation;
263+
It is clear from the configuration (.gro) file that the molecules and ions
264+
are currently in a quite unphysical configuration. It would be risky to
265+
directly start the molecular dynamics simulation as
264266
atoms would undergo huge forces, accelerate, and the system could
265267
eventually explode.
266268

269+
.. container:: justify
270+
267271
In order to bring the system into a favorable state,
268272
let us perform an energy minimization which
269273
consists in moving the atoms until the forces between
270274
them are reasonable.
271275

272-
Open a blank file, call it min.mdp, and save it in the
273-
'inputs/' folder. Copy the following lines into min.mdp:
276+
.. container:: justify
277+
278+
Open a blank file, call it *min.mdp*, and save it in the
279+
*inputs/* folder. Copy the following lines into *min.mdp*:
274280

275281
.. code-block:: bw
276-
:caption: *to be copied in inputs/min.mdp*
277282
278283
integrator = steep
279284
nsteps = 5000
280285
281286
.. container:: justify
282287

283-
These commands specify to GROMACS that the algorithm
284-
to be used is the |speepest-descent|, which moves the
285-
atoms following the direction of the largest forces
286-
until one of the stopping criterial is reached. The 'nsteps' command
288+
These two commands specify to GROMACS that the algorithm
289+
to be used is the |speepest-descent| :cite:`debye1909naherungsformeln`,
290+
which moves the atoms following the direction of the largest forces
291+
until one of the stopping criterial is reached. The *nsteps* command
287292
specifies the maximum number of steps to perform.
288293

289294
.. |speepest-descent| raw:: html
@@ -314,21 +319,25 @@ Energy minimization
314319
315320
.. container:: justify
316321

317-
The grompp command is used to preprocess the
318-
files in order to prepare the simulation. The grompp
322+
The *grompp* command is used to preprocess the
323+
files in order to prepare the simulation. The *grompp*
319324
command also checks the validity of the files. By using
320-
the '-f', '-c', and '-p' keywords, we specify which
325+
the *-f*, *-c*, and *-p* keywords, we specify which
321326
input, configuration, and topology files must be
322-
used, respectively. The other keywords '-o', '-pp', and '-po' are
327+
used, respectively. The other keywords *-o*, *-pp*, and *-po* are
323328
used to specify the names of the output that will be
324329
produced during the run.
325330

326-
The mdrun command calls the engine
331+
.. container:: justify
332+
333+
The *mdrun* command calls the engine
327334
performing the computation from the preprocessed
328-
files (which is recognized thanks to the -deffnm keyword). The
329-
'-v' option is here to enable verbose and have more
335+
files (which is recognized thanks to the *-deffnm* keyword). The
336+
*-v* option is here to enable verbose and have more
330337
information printed in the terminal.
331338

339+
.. container:: justify
340+
332341
If everything works, you should see something like :
333342

334343
.. code-block:: bw
@@ -350,6 +359,8 @@ Energy minimization
350359
message, as long as the final energy is large and negative,
351360
the simulation will work just fine.
352361

362+
.. container:: justify
363+
353364
The final potential energy is large and
354365
negative, and the maximum force is small: 240
355366
kJ/mol/nm (about 0.4 pN). Everything seems alright.
@@ -360,10 +371,6 @@ Energy minimization
360371
361372
vmd conf.gro min.trr
362373
363-
.. container:: justify
364-
365-
This is what I see:
366-
367374
.. figure:: figures/bulksolution/solution-light.webp
368375
:alt: Gromacs tutorial : Movie showing the motion of the atoms during the energy minimization.
369376
:class: only-light
@@ -374,18 +381,29 @@ Energy minimization
374381
:class: only-dark
375382
:height: 330
376383

384+
.. container:: figurelegend
385+
386+
Movie showing the motion of the atoms during the energy minimization.
387+
377388
.. container:: justify
378389

379-
Note for VMD user: You can avoid having
390+
Note for VMD users: You can avoid having
380391
molecules 'cut in half' by the periodic boundary
381-
conditions by rewriting the trajectory using 'gmx
382-
trjconv -f min.trr -s min.tpr -o min_whole.trr -pbc whole'
392+
conditions by rewriting the trajectory using:
393+
394+
.. code-block:: bash
395+
396+
gmx trjconv -f min.trr -s min.tpr -o min_whole.trr -pbc whole'
397+
398+
.. container:: justify
383399
384400
One can see that the molecules reorient themselves
385401
into more energetically favorable positions, and that
386402
the distances between the atoms are being
387-
progressively homogeneized.
403+
progressively homogenized.
388404
405+
.. container:: justify
406+
389407
Let us have a look at the
390408
evolution of the potential energy of the system. To do
391409
so, we can use the internal 'energy' command of
@@ -397,14 +415,15 @@ Energy minimization
397415
398416
.. container:: justify
399417
400-
choose 'potential' by typing '5' (or any number that is in front of 'potential'),
401-
then press enter twice.
418+
Choose *potential* by typing *5* (or any number that is in front of
419+
*potential*), then press *Enter* twice.
402420
403-
Here the edr file produced
421+
.. container:: justify
422+
423+
Here, the *.edr* file produced
404424
by Gromacs during the last run is used, and the
405-
result is saved in the epotmin.xvg file.
406-
Let us plot it (xvg files can be easily opened
407-
using XmGrace, here I use pyplot and jupyter-notebook):
425+
result is saved in the *epotmin.xvg* file.
426+
Let us plot it:
408427
409428
.. figure:: figures/bulksolution/energy-light.png
410429
:alt: Gromacs tutorial : energy versus time.
@@ -414,6 +433,8 @@ Energy minimization
414433
:alt: Gromacs tutorial : energy versus time.
415434
:class: only-dark
416435
436+
.. container:: figurelegend
437+
417438
Evolution of the potential energy as a function of the
418439
number of steps during energy minimization.
419440
@@ -428,6 +449,8 @@ Energy minimization
428449
value, which is usually a good sign as it indicates
429450
that the atoms are now at appropriate distances from each others.
430451
452+
.. container:: justify
453+
431454
The system is ready for the molecular dynamics simulation.
432455
433456
Minimalist NVT input file

0 commit comments

Comments
 (0)