1
1
.. _bulk-solution-label :
2
+ .. include :: ../../non-tutorials/links.rst
2
3
3
4
Ionic solution
4
5
**************
@@ -73,19 +74,11 @@ called |empty.gro|, and copy the following lines into it:
73
74
0
74
75
3.50000 3.50000 3.50000
75
76
76
- .. |empty.gro | raw :: html
77
-
78
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/empty.gro" target="_blank">empty.gro</a>
79
-
80
77
The first line, *Cubic box *, is a comment; the second line indicates the total
81
78
number of atoms (0 here); and the last line defines the box dimensions in
82
79
nanometers -- in this case, 3.5 by 3.5 by :math: `3.5 ~\text {nm}`. This **.gro ** file
83
80
is written in |Gromos87 | format.
84
81
85
- .. |Gromos87 | raw :: html
86
-
87
- <a href="https://manual.gromacs.org/archive/5.0.4/online/gro.html" target="_blank">Gromos87</a>
88
-
89
82
Let us populate this empty box with :math: `\text {SO}_4 ^{2 -}` ions first. To do so,
90
83
the GROMACS command named ``insert-molecules `` is used, for which one needs to
91
84
provide a template for the ion. Within the same folder as **empty.gro **, create a
@@ -102,10 +95,6 @@ new file named |so4.gro|, and copy the following lines into it:
102
95
1 SO4 S1 5 0.496 1.117 0.280
103
96
1.00000 1.00000 1.00000
104
97
105
- .. |so4.gro | raw :: html
106
-
107
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/so4.gro" target="_blank">so4.gro</a>
108
-
109
98
This topology file for the :math: `\text {SO}_4 ^{2 -}` ion is written in the same |Gromos87 |
110
99
format as **empty.gro **. It contains 5 atoms named ``O1 ``, ``O2 ``, ``O3 ``, ``O4 ``,
111
100
and ``S1 ``, all grouped in a residue called ``SO4 ``.
@@ -125,11 +114,7 @@ The ``-radius 0.5`` option is used to prevent ions for being inserted closer tha
125
114
:class: non-title-info
126
115
127
116
Each GROMACS command comes with online documentation. See, for instance,
128
- this |doc-gmx | for the ``insert-molecules `` command.
129
-
130
- .. |doc-gmx | raw :: html
131
-
132
- <a href="https://manual.gromacs.org/2025.1/onlinehelp/gmx-insert-molecules.html" target="_blank">page</a>
117
+ this page for the |insert-molecules | command.
133
118
134
119
The output printed in the terminal should indicate that the insertions were
135
120
successful:
@@ -193,10 +178,6 @@ Then, download the |na.gro| template for the :math:`\text{Na}^+` ion and add
193
178
194
179
gmx insert-molecules -ci na.gro -f conf.gro -o conf.gro -nmol 12 -radius 0.5
195
180
196
- .. |na.gro | raw :: html
197
-
198
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/na.gro" target="_blank">na.gro</a>
199
-
200
181
Here, importantly, the same **conf.gro ** file is used as both input (``-f ``) and
201
182
output (``-o ``), so the 12 ions will be added to the same file named **conf.gro **.
202
183
Finally, download the |h2o.gro | template for the :math: `\text {H}_2 \text {O}` molecule,
@@ -207,10 +188,6 @@ same command once again:
207
188
208
189
gmx insert-molecules -ci h2o.gro -f conf.gro -o conf.gro -nmol 800 -radius 0.14
209
190
210
- .. |h2o.gro | raw :: html
211
-
212
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/h2o.gro" target="_blank">h2o.gro</a>
213
-
214
191
The final **conf.gro ** file contains :
215
192
216
193
.. code-block :: bw
@@ -254,14 +231,9 @@ forces exerted by their surroundings.
254
231
as the surrounding water molecules.
255
232
256
233
In case you encountered a problem during this part of the tutorial, you can
257
- download the ** conf.gro ** file by clicking | conf_gro | , and continue with the
234
+ download the | conf_gro_tutorial1 | file , and continue with the
258
235
tutorial.
259
236
260
- .. |conf_gro | raw :: html
261
-
262
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/conf.gro" target="_blank">here</a>
263
-
264
-
265
237
Set the parameters
266
238
==================
267
239
@@ -305,10 +277,6 @@ include both bonded and non-bonded interactions.
305
277
First, the |topol-SO4.top | file must be placed in the same folder as the
306
278
**conf.gro ** file. It contains the following lines:
307
279
308
- .. |topol-SO4.top | raw :: html
309
-
310
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/topol.top" target="_blank">topol.top</a>
311
-
312
280
.. code-block :: bw
313
281
314
282
#include "ff/forcefield.itp"
@@ -357,22 +325,6 @@ These four files contain information about the atoms (names, masses, charges,
357
325
Lennard-Jones coefficients) and residues (bond and angular constraints) for all
358
326
the species involved in the system.
359
327
360
- .. |forcefield.itp | raw :: html
361
-
362
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/ff/forcefield.itp" target="_blank">forcefield.itp</a>
363
-
364
- .. |h2o.itp | raw :: html
365
-
366
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/ff/h2o.itp" target="_blank">h2o.itp</a>
367
-
368
- .. |na.itp | raw :: html
369
-
370
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/ff/na.itp" target="_blank">na.itp</a>
371
-
372
- .. |so4.itp | raw :: html
373
-
374
- <a href="https://raw.githubusercontent.com/gromacstutorials/gromacstutorials-inputs/main/tutorial1/ff/so4.itp" target="_blank">so4.itp</a>
375
-
376
328
More specifically, the **forcefield.itp ** file contains a line that specifies
377
329
the combination rules as ``comb-rule 2 ``, which corresponds to the well-known
378
330
Lorentz-Berthelot rule :cite: `lorentzUeberAnwendungSatzes1881,berthelotMelangeGaz1898 `, where:
@@ -477,10 +429,6 @@ following the direction of the largest forces until one of the stopping criteria
477
429
is reached :cite: `debyeNaeherungsformelnFuerZylinderfunktionen1909 `. The ``nsteps `` command specifies
478
430
the maximum number of steps to perform, here 5000.
479
431
480
- .. |steepest-descent | raw :: html
481
-
482
- <a href="https://manual.gromacs.org/current/reference-manual/algorithms/energy-minimization.html" target="_blank">steepest-descent</a>
483
-
484
432
To visualize the trajectory of the atoms during the minimization, let us also
485
433
add the following command to the input file:
486
434
@@ -605,10 +553,6 @@ equivalent):
605
553
606
554
xmgrace min-pe.xvg
607
555
608
- .. |grace | raw :: html
609
-
610
- <a href="https://plasma-gate.weizmann.ac.il/Grace/" target="_blank">Grace</a>
611
-
612
556
One can see from the energy plot that the potential energy is initially close
613
557
to zero. This is expected when atoms are too close to one another and molecules
614
558
are randomly oriented in space. As the minimization progresses, the potential
@@ -655,10 +599,6 @@ temperature of the system (:math:`T`) is adjusted using a thermostat.
655
599
4. Apply periodic boundary conditions and constraints as required.
656
600
5. Repeat for each timestep (e.g., 0.001 ps) throughout the simulation.
657
601
658
- .. |leap-frog | raw :: html
659
-
660
- <a href="https://manual.gromacs.org/nightly/reference-manual/algorithms/molecular-dynamics.html#update" target="_blank">leap-frog</a>
661
-
662
602
Let us create a new input script called **nvt.mdp **, and save it in the
663
603
**inputs/ ** folder. Copy the following lines into it:
664
604
0 commit comments