Skip to content

Commit 81d632c

Browse files
committed
added ref
1 parent a544200 commit 81d632c

File tree

2 files changed

+77
-64
lines changed

2 files changed

+77
-64
lines changed

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

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

288+
@article{bussi2007canonical,
289+
title={Canonical sampling through velocity rescaling},
290+
author={Bussi, Giovanni and Donadio, Davide and Parrinello, Michele},
291+
journal={The Journal of chemical physics},
292+
volume={126},
293+
number={1},
294+
year={2007},
295+
publisher={AIP Publishing}
296+
}
297+
288298
@article{debye1909naherungsformeln,
289299
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},
290300
author={Debye, Peter},

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

Lines changed: 67 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -458,44 +458,42 @@ Minimalist NVT input file
458458
459459
.. container:: justify
460460
461-
Let us first perform a small (20 picoseconds)
461+
Let us first perform a short (20 picoseconds)
462462
equilibration in the NVT ensemble. In the NVT ensemble, the number of
463463
atom (N) and volume (V) are maintained fixed, and the
464464
temperature (T) is adjusted using a thermostat.
465465
466+
.. container:: justify
467+
466468
Let use write a new input script
467-
called nvt.mdp, and save it in the 'inputs/' folder.
469+
called *nvt.mdp*, and save it in the *inputs/* folder.
468470
Copy the following lines into it:
469471
470472
.. code-block:: bw
471-
:caption: *to be copied in inputs/nvt.mdp*
472473
473474
integrator = md
474475
nsteps = 20000
475476
dt = 0.001
476477
477478
.. container:: justify
478479
479-
Here the molecular dynamics (md) integrator is used
480+
Here, the molecular dynamics (md) integrator is used
480481
(leapfrog algorithm), and a number of 20000 steps with
481-
timestep (dt) 0.001 ps is requested, so the total
482-
requested duration is 20 ps. Let us print the
483-
trajectory in a xtc file every 1 ps by adding:
482+
a timestep *dt* equal of :math:`0.001 ~ \text{ps}` will be performed.
483+
Let us print the trajectory in a compressed *xtc* file every 1 ps by adding:
484484
485485
.. code-block:: bw
486-
:caption: *to be copied in inputs/nvt.mdp*
487486
488487
nstxout-compressed = 1000
489488
490489
.. container:: justify
491490
492-
Let us control the temperature over the course of the
491+
Let us also control the temperature over the course of the
493492
simulation using the v-rescale thermostat, which is
494493
the Berendsen thermostat with an additional stochastic
495-
term (it is known to give proper canonical ensemble):
494+
term :cite:`bussi2007canonical`. This thermostat is known to give proper canonical ensemble.
496495
497496
.. code-block:: bw
498-
:caption: *to be copied in inputs/nvt.mdp*
499497
500498
tcoupl = v-rescale
501499
ref-t = 360
@@ -504,18 +502,17 @@ Minimalist NVT input file
504502
505503
.. container:: justify
506504
507-
Here we also specified that the thermostat is
508-
applied to the entire system (we could choose to
509-
apply it only to a certain group of atom, which we
510-
will do later), and that the damping constant for
511-
the thermostat is 0.5 ps.
505+
Here, we also specified that the thermostat is
506+
applied to the entire system, and that the damping constant for
507+
the thermostat is equal to 0.5 ps.
508+
509+
.. container:: justify
512510
513511
Note that the relatively high temperature of 360 K
514512
has been chosen here in order to reduce the
515513
viscosity of the solution and converge toward
516-
the desired result (i.e. the diffusion coefficient) faster.
517-
We now have a minimalist input file for performing
518-
the NVT step. Run it by typing in the terminal:
514+
the desired result faster. We now have a minimalist input file for performing
515+
the first NVT simulation. Run it by typing in the terminal:
519516
520517
.. code-block:: bw
521518
@@ -524,9 +521,11 @@ Minimalist NVT input file
524521
525522
.. container:: justify
526523
527-
Here '-c min.gro' ensures that the previously
524+
Here *-c min.gro* ensures that the previously
528525
minimized configuration is used as a starting point.
529526
527+
.. container:: justify
528+
530529
After the completion of the simulation, we can
531530
ensure that the system temperature indeed reached
532531
the value of 360 K by using the energy command of
@@ -538,14 +537,16 @@ Minimalist NVT input file
538537
539538
.. container:: justify
540539
541-
and choose 'temperature'.
540+
and choose *temperature*.
542541
543-
From the generated file, we can see that temperature
542+
.. container:: justify
543+
544+
From the generated *Tnvt.xvg* file, we can see that temperature
544545
started from 0, which was expected since the atoms
545546
have no velocity during a minimization step, and
546547
reaches a temperature slightly larger than the
547548
requested 360 K after a duration of a few
548-
picoseconds:
549+
picoseconds.
549550
550551
.. figure:: figures/bulksolution/temperature-light.png
551552
:alt: Gromacs tutorial : temperature versus time.
@@ -555,27 +556,24 @@ Minimalist NVT input file
555556
:alt: Gromacs tutorial : temperature versus time.
556557
:class: only-dark
557558
559+
.. container:: figurelegend
560+
558561
Evolution of the temperature as a function of the time
559562
during the NVT equilibration. Dashed line is the
560563
requested temperature of 360 K.
561564
562-
.. container:: justify
563-
564-
A better control of the temperature is achieved in the next section.
565-
566565
Improving the NVT
567566
=================
568567
569568
.. container:: justify
570569
571-
So far, a very few commands have been placed in the
572-
NVT input file, meaning that most of the instruction
570+
So far, very few commands have been placed in the
571+
*.mdp* input file, meaning that most of the instruction
573572
have been taken by GROMACS from the default
574573
parameters. You can find what parameters were used
575-
during the last nvt run by opening the new nvt.mdp
576-
file that has been created (i.e. not the one in the
577-
'inputs/' folder, but the one in the main folder).
578-
Exploring this new nvt.mdp file shows us that, for
574+
during the last nvt run by opening the new *nvt.mdp*
575+
file that has been created in the main folder.
576+
Exploring this new *nvt.mdp* file shows us that, for
579577
instance, plain cut-off Coulomb interactions have
580578
been used:
581579
@@ -586,9 +584,12 @@ Improving the NVT
586584
587585
.. container:: justify
588586
589-
For this system, long range Coulomb interaction is a
587+
For this system, long range Coulomb interaction would be a
590588
better choice. We could also improve the thermostating of the
591589
system by applying a separate thermostat to water molecules and ions.
590+
591+
.. container:: justify
592+
592593
Therefore, let us improve the NVT step by specifying
593594
more options in the input file.
594595
First, in the nvt.mdp file, let us impose the use of the
@@ -597,7 +598,6 @@ Improving the NVT
597598
of 4, and cut-off of 4:
598599
599600
.. code-block:: bw
600-
:caption: *to be copied in inputs/nvt.mdp*
601601
602602
coulombtype = pme
603603
fourierspacing = 0.1
@@ -611,7 +611,6 @@ Improving the NVT
611611
Let us also specify the van der Waals interaction:
612612
613613
.. code-block:: bw
614-
:caption: *to be copied in inputs/nvt.mdp*
615614
616615
vdw-type = Cut-off
617616
rvdw = 1.0
@@ -622,7 +621,6 @@ Improving the NVT
622621
bonds of the water molecules:
623622
624623
.. code-block:: bw
625-
:caption: *to be copied in inputs/nvt.mdp*
626624
627625
constraint-algorithm = lincs
628626
constraints = hbonds
@@ -631,11 +629,10 @@ Improving the NVT
631629
.. container:: justify
632630
633631
Let us also use separate temperature baths for
634-
water and ions (here corresponding to the gromacs group called non-water) respectively
635-
by replacing:
632+
water and ions (here corresponding to the GROMACS group called *non-water*)
633+
respectively by replacing:
636634
637635
.. code-block:: bw
638-
:caption: *to be removed from inputs/nvt.mdp*
639636
640637
tcoupl = v-rescale
641638
ref-t = 360
@@ -647,7 +644,6 @@ Improving the NVT
647644
by:
648645
649646
.. code-block:: bw
650-
:caption: *to be copied in inputs/nvt.mdp*
651647
652648
tcoupl = v-rescale
653649
tc-grps = Water non-Water
@@ -659,7 +655,6 @@ Improving the NVT
659655
Let us specify neighbor searching parameters:
660656
661657
.. code-block:: bw
662-
:caption: *to be copied in inputs/nvt.mdp*
663658
664659
cutoff-scheme = Verlet
665660
nstlist = 10
@@ -671,7 +666,6 @@ Improving the NVT
671666
total velocities give the desired temperature instead of 0):
672667
673668
.. code-block:: bw
674-
:caption: *to be copied in inputs/nvt.mdp*
675669
676670
gen-vel = yes
677671
gen-temp = 360
@@ -682,7 +676,6 @@ Improving the NVT
682676
velocity of the whose system:
683677
684678
.. code-block:: bw
685-
:caption: *to be copied in inputs/nvt.mdp*
686679
687680
comm_mode = linear
688681
comm_grps = system
@@ -703,6 +696,8 @@ Improving the NVT
703696
:alt: Gromacs tutorial : temperature versus time.
704697
:class: only-dark
705698
699+
.. contained:: figurelegend
700+
706701
Evolution of the temperature as a function of the time
707702
during the NVT equilibration.
708703
@@ -713,14 +708,13 @@ Adjust the density using NPT
713708
714709
Now that the system is properly equilibrated in the
715710
NVT ensemble, let us perform an equilibration in the
716-
NPT ensemble, where the pressure is imposed and the
711+
NPT ensemble where the pressure is imposed and the
717712
volume of the box is free to relax. NPT relaxation ensures that the
718713
density of the fluid converges toward its equilibrium value.
719-
Create a new input script, call it 'npt.mdp', and
714+
Create a new input script, call it *npt.mdp*, and
720715
copy the following lines in it:
721716
722717
.. code-block:: bw
723-
:caption: *to be copied in inputs/npt.mdp*
724718
725719
integrator = md
726720
nsteps = 50000
@@ -762,14 +756,14 @@ Adjust the density using NPT
762756
763757
.. container:: justify
764758
765-
The main difference with the previous NVT script, is
759+
The main difference with the previous NVT script is
766760
the addition of the isotropic C-rescale pressure
767761
coupling with a target pressure of 1 bar. Some other
768-
differences are the addition of the 'nstlog' and
769-
'nstenergy' commands to control the frequency at
762+
differences are the addition of the *nstlog* and
763+
*nstenergy* commands to control the frequency at
770764
which information are printed in the log file and in
771-
the energy file (edr), and the removing the
772-
'gen-vel' commands. Run it using:
765+
the energy file (*edr*), and the removing the
766+
*gen-vel* commands. Run it using:
773767
774768
.. code-block:: bash
775769
@@ -779,7 +773,7 @@ Adjust the density using NPT
779773
.. container:: justify
780774
781775
Let us have a look a both temperature, pressure and
782-
volume during the NPT step using the 'gmx energy'
776+
volume during the NPT step using the *gmx energy*
783777
command 3 times:
784778
785779
.. code-block:: bash
@@ -790,7 +784,7 @@ Adjust the density using NPT
790784
791785
.. container:: justify
792786
793-
Choose respectively 'temperature', 'pressure' and 'volume'.
787+
Choose respectively *temperature*, *pressure* and *volume*.
794788
This is what I see:
795789
796790
.. figure:: figures/bulksolution/NPT-light.png
@@ -801,6 +795,8 @@ Adjust the density using NPT
801795
:alt: Gromacs tutorial : NPT equilibration
802796
:class: only-dark
803797
798+
.. container:: figurelegend
799+
804800
From top to bottom: evolution of the temperature,
805801
pressure, and volume of the simulation box as a
806802
function of the time during the NPT equilibration.
@@ -817,6 +813,8 @@ Adjust the density using NPT
817813
typical in molecular dynamics, particularly with
818814
liquid water that is almost uncompressible.
819815
816+
.. container:: justify
817+
820818
Exact results may differ depending on the actual *.gro* file generated.
821819
822820
Measurement diffusion coefficient
@@ -828,15 +826,16 @@ Measurement diffusion coefficient
828826
perform a longer simulation and extract quantities of
829827
interest.
830828
829+
.. container:: justify
830+
831831
Here, as an illustration, the diffusion
832832
coefficients of all 3 species (water and the two ions) will be
833833
measured. First, let us perform a longer run in the
834834
NVT ensemble. Create a new input file, call it
835-
'pro.mdp' ('pro' is short for 'production'), and copy the
835+
*pro.mdp* (*pro* is short for *production*), and copy the
836836
following lines into it:
837837
838838
.. code-block:: bw
839-
:caption: *to be copied in inputs/pro.mdp*
840839
841840
integrator = md
842841
nsteps = 200000
@@ -890,18 +889,24 @@ Measurement diffusion coefficient
890889
891890
.. container:: justify
892891
893-
and select the SO4 ions by typing 'SO4', and then press 'ctrl D'.
892+
and select the SO4 ions by typing *SO4*, and then press *ctrl D*.
894893
894+
.. container:: justify
895+
895896
Fitting the slope of the
896-
MSD gives a value of 1.3e-5 cm\ :sup:`2`/s for the
897+
MSD gives a value of :math:`1.3 \mathrm{e}-5 ~ \text{cm}^2/\text{s}` for the
897898
diffusion coefficient.
899+
900+
.. container:: justify
898901
899902
Repeat the same for Na and water.
900903
901-
For Na, the value is 1.5e-5
902-
cm\ :sup:`2`/s, and for water 5.2e-5 cm\ :sup:`2`/s
903-
(not too far from the experimental value of ~ 7e-5
904-
cm\ :sup:`2`/s at temperature T=360 K).
904+
.. container:: justify
905+
906+
For Na, the value is :math:`1.5 \mathrm{e}-5 ~ \text{cm}^2/\text{s}`,
907+
and for water :math:`5.2 \mathrm{e}-5 ~ \text{cm}^2/\text{s}`
908+
(not too far from the experimental value of :math:`7.5 \mathrm{e}-5 ~ \text{cm}^2/\text{s}`
909+
at temperature T=360 K).
905910
906911
.. admonition:: About MSD in molecular simulations
907912
:class: info
@@ -935,5 +940,3 @@ Going further
935940
Take advantage of the generated production run to extract more
936941
equilibrium quantities. For instance, Gromacs allows you to
937942
extract Radial Distribution Functions (RDF) using the *gmx rdf* commands.
938-
939-
.. include:: ../contact/contactme.rst

0 commit comments

Comments
 (0)