@@ -196,7 +196,7 @@ The input files
196
196
in it. These four files contain information about
197
197
the atoms (names, masses, changes, Lennard-Jones
198
198
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.
200
200
201
201
.. |forcefield.itp | raw :: html
202
202
@@ -224,8 +224,10 @@ The input files
224
224
225
225
- the number of steps to perform,
226
226
- 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
229
231
230
232
In this tutorial, 4 different input files will be
231
233
written in order to perform respectively an energy
@@ -234,7 +236,9 @@ The input files
234
236
ensemble (with changing box size), and finally a production run.
235
237
Input files will be placed in a 'inputs/' folder.
236
238
237
- At this point, your folder should look like that:
239
+ .. container :: justify
240
+
241
+ At this point, the folder should look like that:
238
242
239
243
.. figure :: figures/bulksolution/gromacs_inputs-light.png
240
244
:alt: Gromacs files and structure folder
@@ -251,39 +255,40 @@ The input files
251
255
The rest of the tutorial focusses on writing the input files and performing the
252
256
molecular dynamics simulation.
253
257
254
- .. include :: ../contact/supportme.rst
255
-
256
258
Energy minimization
257
259
===================
258
260
259
261
.. container :: justify
260
262
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
264
266
atoms would undergo huge forces, accelerate, and the system could
265
267
eventually explode.
266
268
269
+ .. container :: justify
270
+
267
271
In order to bring the system into a favorable state,
268
272
let us perform an energy minimization which
269
273
consists in moving the atoms until the forces between
270
274
them are reasonable.
271
275
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 *:
274
280
275
281
.. code-block :: bw
276
- :caption: *to be copied in inputs/min.mdp*
277
282
278
283
integrator = steep
279
284
nsteps = 5000
280
285
281
286
.. container :: justify
282
287
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
287
292
specifies the maximum number of steps to perform.
288
293
289
294
.. |speepest-descent | raw :: html
@@ -314,21 +319,25 @@ Energy minimization
314
319
315
320
.. container :: justify
316
321
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 *
319
324
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
321
326
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
323
328
used to specify the names of the output that will be
324
329
produced during the run.
325
330
326
- The mdrun command calls the engine
331
+ .. container :: justify
332
+
333
+ The *mdrun * command calls the engine
327
334
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
330
337
information printed in the terminal.
331
338
339
+ .. container :: justify
340
+
332
341
If everything works, you should see something like :
333
342
334
343
.. code-block :: bw
@@ -350,6 +359,8 @@ Energy minimization
350
359
message, as long as the final energy is large and negative,
351
360
the simulation will work just fine.
352
361
362
+ .. container :: justify
363
+
353
364
The final potential energy is large and
354
365
negative, and the maximum force is small: 240
355
366
kJ/mol/nm (about 0.4 pN). Everything seems alright.
@@ -360,10 +371,6 @@ Energy minimization
360
371
361
372
vmd conf.gro min.trr
362
373
363
- .. container :: justify
364
-
365
- This is what I see:
366
-
367
374
.. figure :: figures/bulksolution/solution-light.webp
368
375
:alt: Gromacs tutorial : Movie showing the motion of the atoms during the energy minimization.
369
376
:class: only-light
@@ -374,18 +381,29 @@ Energy minimization
374
381
:class: only-dark
375
382
:height: 330
376
383
384
+ .. container :: figurelegend
385
+
386
+ Movie showing the motion of the atoms during the energy minimization.
387
+
377
388
.. container :: justify
378
389
379
- Note for VMD user : You can avoid having
390
+ Note for VMD users : You can avoid having
380
391
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
383
399
384
400
One can see that the molecules reorient themselves
385
401
into more energetically favorable positions, and that
386
402
the distances between the atoms are being
387
- progressively homogeneized .
403
+ progressively homogenized .
388
404
405
+ .. container:: justify
406
+
389
407
Let us have a look at the
390
408
evolution of the potential energy of the system. To do
391
409
so, we can use the internal ' energy' command of
@@ -397,14 +415,15 @@ Energy minimization
397
415
398
416
.. container:: justify
399
417
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.
402
420
403
- Here the edr file produced
421
+ .. container:: justify
422
+
423
+ Here, the *.edr* file produced
404
424
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:
408
427
409
428
.. figure:: figures/bulksolution/energy-light.png
410
429
:alt: Gromacs tutorial : energy versus time.
@@ -414,6 +433,8 @@ Energy minimization
414
433
:alt: Gromacs tutorial : energy versus time.
415
434
:class: only-dark
416
435
436
+ .. container:: figurelegend
437
+
417
438
Evolution of the potential energy as a function of the
418
439
number of steps during energy minimization.
419
440
@@ -428,6 +449,8 @@ Energy minimization
428
449
value, which is usually a good sign as it indicates
429
450
that the atoms are now at appropriate distances from each others.
430
451
452
+ .. container:: justify
453
+
431
454
The system is ready for the molecular dynamics simulation.
432
455
433
456
Minimalist NVT input file
0 commit comments