8666f64d34b98ae7e77d212e6fa6cad7ee22faa4
[alexxy/gromacs.git] / docs / user-guide / mdp-options.rst
1 .. README
2    See the "run control" section for a working example of the
3    syntax to use when making .mdp entries, with and without detailed
4    documentation for values those entries might take. Everything can
5    be cross-referenced, see the examples there. TODO Make more
6    cross-references.
7
8 Molecular dynamics parameters (.mdp options)
9 ============================================
10
11 General information
12 -------------------
13
14 Default values are given in parentheses, or listed first among
15 choices. The first option in the list is always the default
16 option. Units are given in square brackets. The difference between a
17 dash and an underscore is ignored.
18
19 A :ref:`sample mdp file <mdp>` is available. This should be
20 appropriate to start a normal simulation. Edit it to suit your
21 specific needs and desires.
22
23
24 Preprocessing
25 ^^^^^^^^^^^^^
26
27 .. mdp:: include
28
29    directories to include in your topology. Format:
30    ``-I/home/john/mylib -I../otherlib``
31
32 .. mdp:: define
33
34    defines to pass to the preprocessor, default is no defines. You can
35    use any defines to control options in your customized topology
36    files. Options that act on existing :ref:`top` file mechanisms
37    include
38
39       ``-DFLEXIBLE`` will use flexible water instead of rigid water
40       into your topology, this can be useful for normal mode analysis.
41
42       ``-DPOSRES`` will trigger the inclusion of ``posre.itp`` into
43       your topology, used for implementing position restraints.
44
45
46 Run control
47 ^^^^^^^^^^^
48
49 .. mdp:: integrator
50
51    (Despite the name, this list includes algorithms that are not
52    actually integrators over time. :mdp-value:`integrator=steep` and
53    all entries following it are in this category)
54
55    .. mdp-value:: md
56
57       A leap-frog algorithm for integrating Newton's equations of motion.
58
59    .. mdp-value:: md-vv
60
61       A velocity Verlet algorithm for integrating Newton's equations
62       of motion.  For constant NVE simulations started from
63       corresponding points in the same trajectory, the trajectories
64       are analytically, but not binary, identical to the
65       :mdp-value:`integrator=md` leap-frog integrator. The the kinetic
66       energy, which is determined from the whole step velocities and
67       is therefore slightly too high. The advantage of this integrator
68       is more accurate, reversible Nose-Hoover and Parrinello-Rahman
69       coupling integration based on Trotter expansion, as well as
70       (slightly too small) full step velocity output. This all comes
71       at the cost off extra computation, especially with constraints
72       and extra communication in parallel. Note that for nearly all
73       production simulations the :mdp-value:`integrator=md` integrator
74       is accurate enough.
75
76    .. mdp-value:: md-vv-avek
77
78       A velocity Verlet algorithm identical to
79       :mdp-value:`integrator=md-vv`, except that the kinetic energy is
80       determined as the average of the two half step kinetic energies
81       as in the :mdp-value:`integrator=md` integrator, and this thus
82       more accurate.  With Nose-Hoover and/or Parrinello-Rahman
83       coupling this comes with a slight increase in computational
84       cost.
85
86    .. mdp-value:: sd
87
88       An accurate and efficient leap-frog stochastic dynamics
89       integrator. With constraints, coordinates needs to be
90       constrained twice per integration step. Depending on the
91       computational cost of the force calculation, this can take a
92       significant part of the simulation time. The temperature for one
93       or more groups of atoms (:mdp:`tc-grps`) is set with
94       :mdp:`ref-t`, the inverse friction constant for each group is
95       set with :mdp:`tau-t`.  The parameter :mdp:`tcoupl` is
96       ignored. The random generator is initialized with
97       :mdp:`ld-seed`. When used as a thermostat, an appropriate value
98       for :mdp:`tau-t` is 2 ps, since this results in a friction that
99       is lower than the internal friction of water, while it is high
100       enough to remove excess heat NOTE: temperature deviations decay
101       twice as fast as with a Berendsen thermostat with the same
102       :mdp:`tau-t`.
103
104    .. mdp-value:: bd
105
106       An Euler integrator for Brownian or position Langevin dynamics,
107       the velocity is the force divided by a friction coefficient
108       (:mdp:`bd-fric`) plus random thermal noise (:mdp:`ref-t`). When
109       :mdp:`bd-fric` is 0, the friction coefficient for each particle
110       is calculated as mass/ :mdp:`tau-t`, as for the integrator
111       :mdp-value:`integrator=sd`. The random generator is initialized
112       with :mdp:`ld-seed`.
113
114    .. mdp-value:: steep
115
116       A steepest descent algorithm for energy minimization. The
117       maximum step size is :mdp:`emstep`, the tolerance is
118       :mdp:`emtol`.
119
120    .. mdp-value:: cg
121
122       A conjugate gradient algorithm for energy minimization, the
123       tolerance is :mdp:`emtol`. CG is more efficient when a steepest
124       descent step is done every once in a while, this is determined
125       by :mdp:`nstcgsteep`. For a minimization prior to a normal mode
126       analysis, which requires a very high accuracy, |Gromacs| should be
127       compiled in double precision.
128
129    .. mdp-value:: l-bfgs
130
131       A quasi-Newtonian algorithm for energy minimization according to
132       the low-memory Broyden-Fletcher-Goldfarb-Shanno approach. In
133       practice this seems to converge faster than Conjugate Gradients,
134       but due to the correction steps necessary it is not (yet)
135       parallelized.
136
137    .. mdp-value:: nm
138
139       Normal mode analysis is performed on the structure in the :ref:`tpr`
140       file.  |Gromacs| should be compiled in double precision.
141
142    .. mdp-value:: tpi
143
144       Test particle insertion. The last molecule in the topology is
145       the test particle. A trajectory must be provided to ``mdrun
146       -rerun``. This trajectory should not contain the molecule to be
147       inserted. Insertions are performed :mdp:`nsteps` times in each
148       frame at random locations and with random orientiations of the
149       molecule. When :mdp:`nstlist` is larger than one,
150       :mdp:`nstlist` insertions are performed in a sphere with radius
151       :mdp:`rtpi` around a the same random location using the same
152       neighborlist. Since neighborlist construction is expensive,
153       one can perform several extra insertions with the same list
154       almost for free. The random seed is set with
155       :mdp:`ld-seed`. The temperature for the Boltzmann weighting is
156       set with :mdp:`ref-t`, this should match the temperature of the
157       simulation of the original trajectory. Dispersion correction is
158       implemented correctly for TPI. All relevant quantities are
159       written to the file specified with ``mdrun -tpi``. The
160       distribution of insertion energies is written to the file
161       specified with ``mdrun -tpid``. No trajectory or energy file is
162       written. Parallel TPI gives identical results to single-node
163       TPI. For charged molecules, using PME with a fine grid is most
164       accurate and also efficient, since the potential in the system
165       only needs to be calculated once per frame.
166
167    .. mdp-value:: tpic
168
169       Test particle insertion into a predefined cavity location. The
170       procedure is the same as for :mdp-value:`integrator=tpi`, except
171       that one coordinate extra is read from the trajectory, which is
172       used as the insertion location. The molecule to be inserted
173       should be centered at 0,0,0. |Gromacs| does not do this for you,
174       since for different situations a different way of centering
175       might be optimal. Also :mdp:`rtpi` sets the radius for the
176       sphere around this location. Neighbor searching is done only
177       once per frame, :mdp:`nstlist` is not used. Parallel
178       :mdp-value:`integrator=tpic` gives identical results to
179       single-rank :mdp-value:`integrator=tpic`.
180
181 .. mdp:: tinit
182
183         (0) \[ps\]
184         starting time for your run (only makes sense for time-based
185         integrators)
186
187 .. mdp:: dt
188
189         (0.001) \[ps\]
190         time step for integration (only makes sense for time-based
191         integrators)
192
193 .. mdp:: nsteps
194
195         (0)
196         maximum number of steps to integrate or minimize, -1 is no
197         maximum
198
199 .. mdp:: init-step
200
201         (0)
202         The starting step. The time at an step i in a run is
203         calculated as: t = :mdp:`tinit` + :mdp:`dt` *
204         (:mdp:`init-step` + i). The free-energy lambda is calculated
205         as: lambda = :mdp:`init-lambda` + :mdp:`delta-lambda` *
206         (:mdp:`init-step` + i). Also non-equilibrium MD parameters can
207         depend on the step number. Thus for exact restarts or redoing
208         part of a run it might be necessary to set :mdp:`init-step` to
209         the step number of the restart frame. :ref:`gmx convert-tpr`
210         does this automatically.
211
212 .. mdp:: simulation-part
213
214          (0)
215          A simulation can consist of multiple parts, each of which has
216          a part number. This option specifies what that number will
217          be, which helps keep track of parts that are logically the
218          same simulation. This option is generally useful to set only
219          when coping with a crashed simulation where files were lost.
220
221 .. mdp:: comm-mode
222
223    .. mdp-value:: Linear
224
225       Remove center of mass translational velocity
226
227    .. mdp-value:: Angular
228
229       Remove center of mass translational and rotational velocity around
230       the center of mass
231
232    .. mdp-value:: Linear-acceleration-correction
233
234       Remove center of mass translational velocity. Correct the center of
235       mass position assuming linear acceleration over :mdp:`nstcomm` steps.
236       This is useful for cases where an acceleration is expected on the
237       center of mass which is nearly constant over mdp:`nstcomm` steps.
238       This can occur for example when pulling on a group using an absolute
239       reference.
240
241    .. mdp-value:: None
242
243       No restriction on the center of mass motion
244
245 .. mdp:: nstcomm
246
247    (100) \[steps\]
248    frequency for center of mass motion removal
249
250 .. mdp:: comm-grps
251
252    group(s) for center of mass motion removal, default is the whole
253    system
254
255
256 Langevin dynamics
257 ^^^^^^^^^^^^^^^^^
258
259 .. mdp:: bd-fric
260
261    (0) \[amu ps-1\]
262    Brownian dynamics friction coefficient. When :mdp:`bd-fric` is 0,
263    the friction coefficient for each particle is calculated as mass/
264    :mdp:`tau-t`.
265
266 .. mdp:: ld-seed
267
268    (-1) \[integer\]
269    used to initialize random generator for thermal noise for
270    stochastic and Brownian dynamics. When :mdp:`ld-seed` is set to -1,
271    a pseudo random seed is used. When running BD or SD on multiple
272    processors, each processor uses a seed equal to :mdp:`ld-seed` plus
273    the processor number.
274
275
276 Energy minimization
277 ^^^^^^^^^^^^^^^^^^^
278
279 .. mdp:: emtol
280
281    (10.0) \[kJ mol-1 nm-1\]
282    the minimization is converged when the maximum force is smaller
283    than this value
284
285 .. mdp:: emstep
286
287    (0.01) \[nm\]
288    initial step-size
289
290 .. mdp:: nstcgsteep
291
292    (1000) \[steps\]
293    frequency of performing 1 steepest descent step while doing
294    conjugate gradient energy minimization.
295
296 .. mdp:: nbfgscorr
297
298    (10)
299    Number of correction steps to use for L-BFGS minimization. A higher
300    number is (at least theoretically) more accurate, but slower.
301
302
303 Shell Molecular Dynamics
304 ^^^^^^^^^^^^^^^^^^^^^^^^
305
306 When shells or flexible constraints are present in the system the
307 positions of the shells and the lengths of the flexible constraints
308 are optimized at every time step until either the RMS force on the
309 shells and constraints is less than :mdp:`emtol`, or a maximum number
310 of iterations :mdp:`niter` has been reached. Minimization is converged
311 when the maximum force is smaller than :mdp:`emtol`. For shell MD this
312 value should be 1.0 at most.
313
314 .. mdp:: niter
315
316    (20)
317    maximum number of iterations for optimizing the shell positions and
318    the flexible constraints.
319
320 .. mdp:: fcstep
321
322    (0) \[ps^2\]
323    the step size for optimizing the flexible constraints. Should be
324    chosen as mu/(d2V/dq2) where mu is the reduced mass of two
325    particles in a flexible constraint and d2V/dq2 is the second
326    derivative of the potential in the constraint direction. Hopefully
327    this number does not differ too much between the flexible
328    constraints, as the number of iterations and thus the runtime is
329    very sensitive to fcstep. Try several values!
330
331
332 Test particle insertion
333 ^^^^^^^^^^^^^^^^^^^^^^^
334
335 .. mdp:: rtpi
336
337    (0.05) \[nm\]
338    the test particle insertion radius, see integrators
339    :mdp-value:`integrator=tpi` and :mdp-value:`integrator=tpic`
340
341
342 Output control
343 ^^^^^^^^^^^^^^
344
345 .. mdp:: nstxout
346
347    (0) \[steps\]
348    number of steps that elapse between writing coordinates to output
349    trajectory file, the last coordinates are always written
350
351 .. mdp:: nstvout
352
353    (0) \[steps\]
354    number of steps that elapse between writing velocities to output
355    trajectory, the last velocities are always written
356
357 .. mdp:: nstfout
358
359    (0) \[steps\]
360    number of steps that elapse between writing forces to output
361    trajectory.
362
363 .. mdp:: nstlog
364
365    (1000) \[steps\]
366    number of steps that elapse between writing energies to the log
367    file, the last energies are always written
368
369 .. mdp:: nstcalcenergy
370
371    (100)
372    number of steps that elapse between calculating the energies, 0 is
373    never. This option is only relevant with dynamics. This option affects the
374    performance in parallel simulations, because calculating energies
375    requires global communication between all processes which can
376    become a bottleneck at high parallelization.
377
378 .. mdp:: nstenergy
379
380    (1000) \[steps\]
381    number of steps that else between writing energies to energy file,
382    the last energies are always written, should be a multiple of
383    :mdp:`nstcalcenergy`. Note that the exact sums and fluctuations
384    over all MD steps modulo :mdp:`nstcalcenergy` are stored in the
385    energy file, so :ref:`gmx energy` can report exact energy averages
386    and fluctuations also when :mdp:`nstenergy` > 1
387
388 .. mdp:: nstxout-compressed
389
390    (0) \[steps\]
391    number of steps that elapse between writing position coordinates
392    using lossy compression
393
394 .. mdp:: compressed-x-precision
395
396    (1000) \[real\]
397    precision with which to write to the compressed trajectory file
398
399 .. mdp:: compressed-x-grps
400
401    group(s) to write to the compressed trajectory file, by default the
402    whole system is written (if :mdp:`nstxout-compressed` > 0)
403
404 .. mdp:: energygrps
405
406    group(s) for which to write to write short-ranged non-bonded
407    potential energies to the energy file (not supported on GPUs)
408
409
410 Neighbor searching
411 ^^^^^^^^^^^^^^^^^^
412
413 .. mdp:: cutoff-scheme
414
415    .. mdp-value:: Verlet
416
417       Generate a pair list with buffering. The buffer size is
418       automatically set based on :mdp:`verlet-buffer-tolerance`,
419       unless this is set to -1, in which case :mdp:`rlist` will be
420       used. This option has an explicit, exact cut-off at :mdp:`rvdw`
421       equal to :mdp:`rcoulomb`, unless PME or Ewald is used, in which
422       case :mdp:`rcoulomb` > :mdp:`rvdw` is allowed. Currently only
423       cut-off, reaction-field, PME or Ewald electrostatics and plain
424       LJ are supported. Some :ref:`gmx mdrun` functionality is not yet
425       supported with the :mdp:`Verlet` scheme, but :ref:`gmx grompp`
426       checks for this. Native GPU acceleration is only supported with
427       :mdp:`Verlet`. With GPU-accelerated PME or with separate PME
428       ranks, :ref:`gmx mdrun` will automatically tune the CPU/GPU load
429       balance by scaling :mdp:`rcoulomb` and the grid spacing. This
430       can be turned off with ``mdrun -notunepme``. :mdp:`Verlet` is
431       faster than :mdp:`group` when there is no water, or if
432       :mdp:`group` would use a pair-list buffer to conserve energy.
433
434    .. mdp-value:: group
435
436       Generate a pair list for groups of atoms. These groups
437       correspond to the charge groups in the topology. This was the
438       only cut-off treatment scheme before version 4.6, and is
439       **deprecated in |gmx-version|**. There is no explicit buffering of
440       the pair list. This enables efficient force calculations for
441       water, but energy is only conserved when a buffer is explicitly
442       added.
443
444 .. mdp:: nstlist
445
446    \(10) \[steps\]
447
448    .. mdp-value:: >0
449
450       Frequency to update the neighbor list. When this is 0, the
451       neighbor list is made only once. With energy minimization the
452       neighborlist will be updated for every energy evaluation when
453       :mdp:`nstlist` is greater than 0. With :mdp:`Verlet` and
454       :mdp:`verlet-buffer-tolerance` set, :mdp:`nstlist` is actually
455       a minimum value and :ref:`gmx mdrun` might increase it, unless
456       it is set to 1. With parallel simulations and/or non-bonded
457       force calculation on the GPU, a value of 20 or 40 often gives
458       the best performance. With :mdp:`group` and non-exact
459       cut-off's, :mdp:`nstlist` will affect the accuracy of your
460       simulation and it can not be chosen freely.
461
462    .. mdp-value:: 0
463
464       The neighbor list is only constructed once and never
465       updated. This is mainly useful for vacuum simulations in which
466       all particles see each other.
467
468    .. mdp-value:: <0
469
470       Unused.
471
472 .. mdp:: ns-type
473
474    .. mdp-value:: grid
475
476       Make a grid in the box and only check atoms in neighboring grid
477       cells when constructing a new neighbor list every
478       :mdp:`nstlist` steps. In large systems grid search is much
479       faster than simple search.
480
481    .. mdp-value:: simple
482
483       Check every atom in the box when constructing a new neighbor
484       list every :mdp:`nstlist` steps (only with :mdp:`group`
485       cut-off scheme).
486
487 .. mdp:: pbc
488
489    .. mdp-value:: xyz
490
491       Use periodic boundary conditions in all directions.
492
493    .. mdp-value:: no
494
495       Use no periodic boundary conditions, ignore the box. To simulate
496       without cut-offs, set all cut-offs and :mdp:`nstlist` to 0. For
497       best performance without cut-offs on a single MPI rank, set
498       :mdp:`nstlist` to zero and :mdp:`ns-type` =simple.
499
500    .. mdp-value:: xy
501
502       Use periodic boundary conditions in x and y directions
503       only. This works only with :mdp:`ns-type` =grid and can be used
504       in combination with walls_. Without walls or with only one wall
505       the system size is infinite in the z direction. Therefore
506       pressure coupling or Ewald summation methods can not be
507       used. These disadvantages do not apply when two walls are used.
508
509 .. mdp:: periodic-molecules
510
511    .. mdp-value:: no
512
513       molecules are finite, fast molecular PBC can be used
514
515    .. mdp-value:: yes
516
517       for systems with molecules that couple to themselves through the
518       periodic boundary conditions, this requires a slower PBC
519       algorithm and molecules are not made whole in the output
520
521 .. mdp:: verlet-buffer-tolerance
522
523    (0.005) \[kJ/mol/ps\]
524
525    Useful only with the :mdp:`Verlet` :mdp:`cutoff-scheme`. This sets
526    the maximum allowed error for pair interactions per particle caused
527    by the Verlet buffer, which indirectly sets :mdp:`rlist`. As both
528    :mdp:`nstlist` and the Verlet buffer size are fixed (for
529    performance reasons), particle pairs not in the pair list can
530    occasionally get within the cut-off distance during
531    :mdp:`nstlist` -1 steps. This causes very small jumps in the
532    energy. In a constant-temperature ensemble, these very small energy
533    jumps can be estimated for a given cut-off and :mdp:`rlist`. The
534    estimate assumes a homogeneous particle distribution, hence the
535    errors might be slightly underestimated for multi-phase
536    systems. (See the `reference manual`_ for details). For longer
537    pair-list life-time (:mdp:`nstlist` -1) * :mdp:`dt` the buffer is
538    overestimated, because the interactions between particles are
539    ignored. Combined with cancellation of errors, the actual drift of
540    the total energy is usually one to two orders of magnitude
541    smaller. Note that the generated buffer size takes into account
542    that the |Gromacs| pair-list setup leads to a reduction in the
543    drift by a factor 10, compared to a simple particle-pair based
544    list. Without dynamics (energy minimization etc.), the buffer is 5%
545    of the cut-off. For NVE simulations the initial temperature is
546    used, unless this is zero, in which case a buffer of 10% is
547    used. For NVE simulations the tolerance usually needs to be lowered
548    to achieve proper energy conservation on the nanosecond time
549    scale. To override the automated buffer setting, use
550    :mdp:`verlet-buffer-tolerance` =-1 and set :mdp:`rlist` manually.
551
552 .. mdp:: rlist
553
554    (1) \[nm\]
555    Cut-off distance for the short-range neighbor list. With the
556    :mdp:`Verlet` :mdp:`cutoff-scheme`, this is by default set by the
557    :mdp:`verlet-buffer-tolerance` option and the value of
558    :mdp:`rlist` is ignored.
559
560
561 Electrostatics
562 ^^^^^^^^^^^^^^
563
564 .. mdp:: coulombtype
565
566    .. mdp-value:: Cut-off
567
568       Plain cut-off with neighborlist radius :mdp:`rlist` and
569       Coulomb cut-off :mdp:`rcoulomb`, where :mdp:`rlist` >=
570       :mdp:`rcoulomb`.
571
572    .. mdp-value:: Ewald
573
574       Classical Ewald sum electrostatics. The real-space cut-off
575       :mdp:`rcoulomb` should be equal to :mdp:`rlist`. Use *e.g.*
576       :mdp:`rlist` =0.9, :mdp:`rcoulomb` =0.9. The highest magnitude
577       of wave vectors used in reciprocal space is controlled by
578       :mdp:`fourierspacing`. The relative accuracy of
579       direct/reciprocal space is controlled by :mdp:`ewald-rtol`.
580
581       NOTE: Ewald scales as O(N^3/2) and is thus extremely slow for
582       large systems. It is included mainly for reference - in most
583       cases PME will perform much better.
584
585    .. mdp-value:: PME
586
587       Fast smooth Particle-Mesh Ewald (SPME) electrostatics. Direct
588       space is similar to the Ewald sum, while the reciprocal part is
589       performed with FFTs. Grid dimensions are controlled with
590       :mdp:`fourierspacing` and the interpolation order with
591       :mdp:`pme-order`. With a grid spacing of 0.1 nm and cubic
592       interpolation the electrostatic forces have an accuracy of
593       2-3*10^-4. Since the error from the vdw-cutoff is larger than
594       this you might try 0.15 nm. When running in parallel the
595       interpolation parallelizes better than the FFT, so try
596       decreasing grid dimensions while increasing interpolation.
597
598    .. mdp-value:: P3M-AD
599
600       Particle-Particle Particle-Mesh algorithm with analytical
601       derivative for for long range electrostatic interactions. The
602       method and code is identical to SPME, except that the influence
603       function is optimized for the grid. This gives a slight increase
604       in accuracy.
605
606    .. mdp-value:: Reaction-Field
607
608       Reaction field electrostatics with Coulomb cut-off
609       :mdp:`rcoulomb`, where :mdp:`rlist` >= :mdp:`rvdw`. The
610       dielectric constant beyond the cut-off is
611       :mdp:`epsilon-rf`. The dielectric constant can be set to
612       infinity by setting :mdp:`epsilon-rf` =0.
613
614    .. mdp-value:: Generalized-Reaction-Field
615
616       Generalized reaction field with Coulomb cut-off
617       :mdp:`rcoulomb`, where :mdp:`rlist` >= :mdp:`rcoulomb`. The
618       dielectric constant beyond the cut-off is
619       :mdp:`epsilon-rf`. The ionic strength is computed from the
620       number of charged (*i.e.* with non zero charge) charge
621       groups. The temperature for the GRF potential is set with
622       :mdp:`ref-t`.
623
624    .. mdp-value:: Reaction-Field-zero
625
626       In |Gromacs|, normal reaction-field electrostatics with
627       :mdp:`cutoff-scheme` = :mdp:`group` leads to bad energy
628       conservation. :mdp:`Reaction-Field-zero` solves this by making
629       the potential zero beyond the cut-off. It can only be used with
630       an infinite dielectric constant (:mdp:`epsilon-rf` =0), because
631       only for that value the force vanishes at the
632       cut-off. :mdp:`rlist` should be 0.1 to 0.3 nm larger than
633       :mdp:`rcoulomb` to accommodate for the size of charge groups
634       and diffusion between neighbor list updates. This, and the fact
635       that table lookups are used instead of analytical functions make
636       :mdp:`Reaction-Field-zero` computationally more expensive than
637       normal reaction-field.
638
639    .. mdp-value:: Shift
640
641       Analogous to :mdp-value:`vdwtype=Shift` for :mdp:`vdwtype`. You
642       might want to use :mdp:`Reaction-Field-zero` instead, which has
643       a similar potential shape, but has a physical interpretation and
644       has better energies due to the exclusion correction terms.
645
646    .. mdp-value:: Encad-Shift
647
648       The Coulomb potential is decreased over the whole range, using
649       the definition from the Encad simulation package.
650
651    .. mdp-value:: Switch
652
653       Analogous to :mdp-value:`vdwtype=Switch` for
654       :mdp:`vdwtype`. Switching the Coulomb potential can lead to
655       serious artifacts, advice: use :mdp:`Reaction-Field-zero`
656       instead.
657
658    .. mdp-value:: User
659
660       :ref:`gmx mdrun` will now expect to find a file ``table.xvg``
661       with user-defined potential functions for repulsion, dispersion
662       and Coulomb. When pair interactions are present, :ref:`gmx
663       mdrun` also expects to find a file ``tablep.xvg`` for the pair
664       interactions. When the same interactions should be used for
665       non-bonded and pair interactions the user can specify the same
666       file name for both table files. These files should contain 7
667       columns: the ``x`` value, ``f(x)``, ``-f'(x)``, ``g(x)``,
668       ``-g'(x)``, ``h(x)``, ``-h'(x)``, where ``f(x)`` is the Coulomb
669       function, ``g(x)`` the dispersion function and ``h(x)`` the
670       repulsion function. When :mdp:`vdwtype` is not set to User the
671       values for ``g``, ``-g'``, ``h`` and ``-h'`` are ignored. For
672       the non-bonded interactions ``x`` values should run from 0 to
673       the largest cut-off distance + :mdp:`table-extension` and
674       should be uniformly spaced. For the pair interactions the table
675       length in the file will be used. The optimal spacing, which is
676       used for non-user tables, is ``0.002 nm`` when you run in mixed
677       precision or ``0.0005 nm`` when you run in double precision. The
678       function value at ``x=0`` is not important. More information is
679       in the printed manual.
680
681    .. mdp-value:: PME-Switch
682
683       A combination of PME and a switch function for the direct-space
684       part (see above). :mdp:`rcoulomb` is allowed to be smaller than
685       :mdp:`rlist`. This is mainly useful constant energy simulations
686       (note that using PME with :mdp:`cutoff-scheme` = :mdp:`Verlet`
687       will be more efficient).
688
689    .. mdp-value:: PME-User
690
691       A combination of PME and user tables (see
692       above). :mdp:`rcoulomb` is allowed to be smaller than
693       :mdp:`rlist`. The PME mesh contribution is subtracted from the
694       user table by :ref:`gmx mdrun`. Because of this subtraction the
695       user tables should contain about 10 decimal places.
696
697    .. mdp-value:: PME-User-Switch
698
699       A combination of PME-User and a switching function (see
700       above). The switching function is applied to final
701       particle-particle interaction, *i.e.* both to the user supplied
702       function and the PME Mesh correction part.
703
704 .. mdp:: coulomb-modifier
705
706    .. mdp-value:: Potential-shift-Verlet
707
708       Selects Potential-shift with the Verlet cutoff-scheme, as it is
709       (nearly) free; selects None with the group cutoff-scheme.
710
711    .. mdp-value:: Potential-shift
712
713       Shift the Coulomb potential by a constant such that it is zero
714       at the cut-off. This makes the potential the integral of the
715       force. Note that this does not affect the forces or the
716       sampling.
717
718    .. mdp-value:: None
719
720       Use an unmodified Coulomb potential. With the group scheme this
721       means no exact cut-off is used, energies and forces are
722       calculated for all pairs in the neighborlist.
723
724 .. mdp:: rcoulomb-switch
725
726    (0) \[nm\]
727    where to start switching the Coulomb potential, only relevant
728    when force or potential switching is used
729
730 .. mdp:: rcoulomb
731
732    (1) \[nm\]
733    distance for the Coulomb cut-off
734
735 .. mdp:: epsilon-r
736
737    (1)
738    The relative dielectric constant. A value of 0 means infinity.
739
740 .. mdp:: epsilon-rf
741
742    (0)
743    The relative dielectric constant of the reaction field. This
744    is only used with reaction-field electrostatics. A value of 0
745    means infinity.
746
747
748 Van der Waals
749 ^^^^^^^^^^^^^
750
751 .. mdp:: vdwtype
752
753    .. mdp-value:: Cut-off
754
755       Twin range cut-offs with neighbor list cut-off :mdp:`rlist` and
756       VdW cut-off :mdp:`rvdw`, where :mdp:`rvdw` >= :mdp:`rlist`.
757
758    .. mdp-value:: PME
759
760       Fast smooth Particle-mesh Ewald (SPME) for VdW interactions. The
761       grid dimensions are controlled with :mdp:`fourierspacing` in
762       the same way as for electrostatics, and the interpolation order
763       is controlled with :mdp:`pme-order`. The relative accuracy of
764       direct/reciprocal space is controlled by :mdp:`ewald-rtol-lj`,
765       and the specific combination rules that are to be used by the
766       reciprocal routine are set using :mdp:`lj-pme-comb-rule`.
767
768    .. mdp-value:: Shift
769
770       This functionality is deprecated and replaced by
771       :mdp:`vdw-modifier` = Force-switch. The LJ (not Buckingham)
772       potential is decreased over the whole range and the forces decay
773       smoothly to zero between :mdp:`rvdw-switch` and
774       :mdp:`rvdw`. The neighbor search cut-off :mdp:`rlist` should
775       be 0.1 to 0.3 nm larger than :mdp:`rvdw` to accommodate for the
776       size of charge groups and diffusion between neighbor list
777       updates.
778
779    .. mdp-value:: Switch
780
781       This functionality is deprecated and replaced by
782       :mdp:`vdw-modifier` = Potential-switch. The LJ (not Buckingham)
783       potential is normal out to :mdp:`rvdw-switch`, after which it
784       is switched off to reach zero at :mdp:`rvdw`. Both the
785       potential and force functions are continuously smooth, but be
786       aware that all switch functions will give rise to a bulge
787       (increase) in the force (since we are switching the
788       potential). The neighbor search cut-off :mdp:`rlist` should be
789       0.1 to 0.3 nm larger than :mdp:`rvdw` to accommodate for the
790       size of charge groups and diffusion between neighbor list
791       updates.
792
793    .. mdp-value:: Encad-Shift
794
795       The LJ (not Buckingham) potential is decreased over the whole
796       range, using the definition from the Encad simulation package.
797
798    .. mdp-value:: User
799
800       See user for :mdp:`coulombtype`. The function value at zero is
801       not important. When you want to use LJ correction, make sure
802       that :mdp:`rvdw` corresponds to the cut-off in the user-defined
803       function. When :mdp:`coulombtype` is not set to User the values
804       for the ``f`` and ``-f'`` columns are ignored.
805
806 .. mdp:: vdw-modifier
807
808    .. mdp-value:: Potential-shift-Verlet
809
810       Selects Potential-shift with the Verlet cutoff-scheme, as it is
811       (nearly) free; selects None with the group cutoff-scheme.
812
813    .. mdp-value:: Potential-shift
814
815       Shift the Van der Waals potential by a constant such that it is
816       zero at the cut-off. This makes the potential the integral of
817       the force. Note that this does not affect the forces or the
818       sampling.
819
820    .. mdp-value:: None
821
822       Use an unmodified Van der Waals potential. With the group scheme
823       this means no exact cut-off is used, energies and forces are
824       calculated for all pairs in the neighborlist.
825
826    .. mdp-value:: Force-switch
827
828       Smoothly switches the forces to zero between :mdp:`rvdw-switch`
829       and :mdp:`rvdw`. This shifts the potential shift over the whole
830       range and switches it to zero at the cut-off. Note that this is
831       more expensive to calculate than a plain cut-off and it is not
832       required for energy conservation, since Potential-shift
833       conserves energy just as well.
834
835    .. mdp-value:: Potential-switch
836
837       Smoothly switches the potential to zero between
838       :mdp:`rvdw-switch` and :mdp:`rvdw`. Note that this introduces
839       articifically large forces in the switching region and is much
840       more expensive to calculate. This option should only be used if
841       the force field you are using requires this.
842
843 .. mdp:: rvdw-switch
844
845    (0) \[nm\]
846
847    where to start switching the LJ force and possibly the potential,
848    only relevant when force or potential switching is used
849
850 .. mdp:: rvdw
851
852    (1) \[nm\]
853    distance for the LJ or Buckingham cut-off
854
855 .. mdp:: DispCorr
856
857    .. mdp-value:: no
858
859       don't apply any correction
860
861    .. mdp-value:: EnerPres
862
863       apply long range dispersion corrections for Energy and Pressure
864
865    .. mdp-value:: Ener
866
867       apply long range dispersion corrections for Energy only
868
869
870 Tables
871 ^^^^^^
872
873 .. mdp:: table-extension
874
875    (1) \[nm\]
876    Extension of the non-bonded potential lookup tables beyond the
877    largest cut-off distance. The value should be large enough to
878    account for charge group sizes and the diffusion between
879    neighbor-list updates. Without user defined potential the same
880    table length is used for the lookup tables for the 1-4
881    interactions, which are always tabulated irrespective of the use of
882    tables for the non-bonded interactions. The value of
883    :mdp:`table-extension` in no way affects the values of
884    :mdp:`rlist`, :mdp:`rcoulomb`, or :mdp:`rvdw`.
885
886 .. mdp:: energygrp-table
887
888    When user tables are used for electrostatics and/or VdW, here one
889    can give pairs of energy groups for which seperate user tables
890    should be used. The two energy groups will be appended to the table
891    file name, in order of their definition in :mdp:`energygrps`,
892    seperated by underscores. For example, if ``energygrps = Na Cl
893    Sol`` and ``energygrp-table = Na Na Na Cl``, :ref:`gmx mdrun` will
894    read ``table_Na_Na.xvg`` and ``table_Na_Cl.xvg`` in addition to the
895    normal ``table.xvg`` which will be used for all other energy group
896    pairs.
897
898
899 Ewald
900 ^^^^^
901
902 .. mdp:: fourierspacing
903
904    (0.12) \[nm\]
905    For ordinary Ewald, the ratio of the box dimensions and the spacing
906    determines a lower bound for the number of wave vectors to use in
907    each (signed) direction. For PME and P3M, that ratio determines a
908    lower bound for the number of Fourier-space grid points that will
909    be used along that axis. In all cases, the number for each
910    direction can be overridden by entering a non-zero value for that
911    :mdp:`fourier-nx` direction. For optimizing the relative load of
912    the particle-particle interactions and the mesh part of PME, it is
913    useful to know that the accuracy of the electrostatics remains
914    nearly constant when the Coulomb cut-off and the PME grid spacing
915    are scaled by the same factor.
916
917 .. mdp:: fourier-nx
918 .. mdp:: fourier-ny
919 .. mdp:: fourier-nz
920
921    (0)
922    Highest magnitude of wave vectors in reciprocal space when using Ewald.
923    Grid size when using PME or P3M. These values override
924    :mdp:`fourierspacing` per direction. The best choice is powers of
925    2, 3, 5 and 7. Avoid large primes.
926
927 .. mdp:: pme-order
928
929    (4)
930    Interpolation order for PME. 4 equals cubic interpolation. You
931    might try 6/8/10 when running in parallel and simultaneously
932    decrease grid dimension.
933
934 .. mdp:: ewald-rtol
935
936    (1e-5)
937    The relative strength of the Ewald-shifted direct potential at
938    :mdp:`rcoulomb` is given by :mdp:`ewald-rtol`. Decreasing this
939    will give a more accurate direct sum, but then you need more wave
940    vectors for the reciprocal sum.
941
942 .. mdp:: ewald-rtol-lj
943
944    (1e-3)
945    When doing PME for VdW-interactions, :mdp:`ewald-rtol-lj` is used
946    to control the relative strength of the dispersion potential at
947    :mdp:`rvdw` in the same way as :mdp:`ewald-rtol` controls the
948    electrostatic potential.
949
950 .. mdp:: lj-pme-comb-rule
951
952    (Geometric)
953    The combination rules used to combine VdW-parameters in the
954    reciprocal part of LJ-PME. Geometric rules are much faster than
955    Lorentz-Berthelot and usually the recommended choice, even when the
956    rest of the force field uses the Lorentz-Berthelot rules.
957
958    .. mdp-value:: Geometric
959
960       Apply geometric combination rules
961
962    .. mdp-value:: Lorentz-Berthelot
963
964       Apply Lorentz-Berthelot combination rules
965
966 .. mdp:: ewald-geometry
967
968    .. mdp-value:: 3d
969
970       The Ewald sum is performed in all three dimensions.
971
972    .. mdp-value:: 3dc
973
974       The reciprocal sum is still performed in 3D, but a force and
975       potential correction applied in the `z` dimension to produce a
976       pseudo-2D summation. If your system has a slab geometry in the
977       `x-y` plane you can try to increase the `z`-dimension of the box
978       (a box height of 3 times the slab height is usually ok) and use
979       this option.
980
981 .. mdp:: epsilon-surface
982
983    (0)
984    This controls the dipole correction to the Ewald summation in
985    3D. The default value of zero means it is turned off. Turn it on by
986    setting it to the value of the relative permittivity of the
987    imaginary surface around your infinite system. Be careful - you
988    shouldn't use this if you have free mobile charges in your
989    system. This value does not affect the slab 3DC variant of the long
990    range corrections.
991
992
993 Temperature coupling
994 ^^^^^^^^^^^^^^^^^^^^
995
996 .. mdp:: tcoupl
997
998    .. mdp-value:: no
999
1000       No temperature coupling.
1001
1002    .. mdp-value:: berendsen
1003
1004       Temperature coupling with a Berendsen-thermostat to a bath with
1005       temperature :mdp:`ref-t`, with time constant
1006       :mdp:`tau-t`. Several groups can be coupled separately, these
1007       are specified in the :mdp:`tc-grps` field separated by spaces.
1008
1009    .. mdp-value:: nose-hoover
1010
1011       Temperature coupling using a Nose-Hoover extended ensemble. The
1012       reference temperature and coupling groups are selected as above,
1013       but in this case :mdp:`tau-t` controls the period of the
1014       temperature fluctuations at equilibrium, which is slightly
1015       different from a relaxation time. For NVT simulations the
1016       conserved energy quantity is written to energy and log file.
1017
1018    .. mdp-value:: andersen
1019
1020       Temperature coupling by randomizing a fraction of the particles
1021       at each timestep. Reference temperature and coupling groups are
1022       selected as above. :mdp:`tau-t` is the average time between
1023       randomization of each molecule. Inhibits particle dynamics
1024       somewhat, but little or no ergodicity issues. Currently only
1025       implemented with velocity Verlet, and not implemented with
1026       constraints.
1027
1028    .. mdp-value:: andersen-massive
1029
1030       Temperature coupling by randomizing all particles at infrequent
1031       timesteps. Reference temperature and coupling groups are
1032       selected as above. :mdp:`tau-t` is the time between
1033       randomization of all molecules. Inhibits particle dynamics
1034       somewhat, but little or no ergodicity issues. Currently only
1035       implemented with velocity Verlet.
1036
1037    .. mdp-value:: v-rescale
1038
1039       Temperature coupling using velocity rescaling with a stochastic
1040       term (JCP 126, 014101). This thermostat is similar to Berendsen
1041       coupling, with the same scaling using :mdp:`tau-t`, but the
1042       stochastic term ensures that a proper canonical ensemble is
1043       generated. The random seed is set with :mdp:`ld-seed`. This
1044       thermostat works correctly even for :mdp:`tau-t` =0. For NVT
1045       simulations the conserved energy quantity is written to the
1046       energy and log file.
1047
1048 .. mdp:: nsttcouple
1049
1050    (-1)
1051    The frequency for coupling the temperature. The default value of -1
1052    sets :mdp:`nsttcouple` equal to :mdp:`nstlist`, unless
1053    :mdp:`nstlist` <=0, then a value of 10 is used. For velocity
1054    Verlet integrators :mdp:`nsttcouple` is set to 1.
1055
1056 .. mdp:: nh-chain-length
1057
1058    (10)
1059    The number of chained Nose-Hoover thermostats for velocity Verlet
1060    integrators, the leap-frog :mdp-value:`integrator=md` integrator
1061    only supports 1. Data for the NH chain variables is not printed to
1062    the :ref:`edr` file, but can be using the ``GMX_NOSEHOOVER_CHAINS``
1063    environment variable
1064
1065 .. mdp:: tc-grps
1066
1067    groups to couple to separate temperature baths
1068
1069 .. mdp:: tau-t
1070
1071    \[ps\]
1072    time constant for coupling (one for each group in
1073    :mdp:`tc-grps`), -1 means no temperature coupling
1074
1075 .. mdp:: ref-t
1076
1077    \[K\]
1078    reference temperature for coupling (one for each group in
1079    :mdp:`tc-grps`)
1080
1081
1082 Pressure coupling
1083 ^^^^^^^^^^^^^^^^^
1084
1085 .. mdp:: pcoupl
1086
1087    .. mdp-value:: no
1088
1089       No pressure coupling. This means a fixed box size.
1090
1091    .. mdp-value:: Berendsen
1092
1093       Exponential relaxation pressure coupling with time constant
1094       :mdp:`tau-p`. The box is scaled every timestep. It has been
1095       argued that this does not yield a correct thermodynamic
1096       ensemble, but it is the most efficient way to scale a box at the
1097       beginning of a run.
1098
1099    .. mdp-value:: Parrinello-Rahman
1100
1101       Extended-ensemble pressure coupling where the box vectors are
1102       subject to an equation of motion. The equation of motion for the
1103       atoms is coupled to this. No instantaneous scaling takes
1104       place. As for Nose-Hoover temperature coupling the time constant
1105       :mdp:`tau-p` is the period of pressure fluctuations at
1106       equilibrium. This is probably a better method when you want to
1107       apply pressure scaling during data collection, but beware that
1108       you can get very large oscillations if you are starting from a
1109       different pressure. For simulations where the exact fluctation
1110       of the NPT ensemble are important, or if the pressure coupling
1111       time is very short it may not be appropriate, as the previous
1112       time step pressure is used in some steps of the |Gromacs|
1113       implementation for the current time step pressure.
1114
1115    .. mdp-value:: MTTK
1116
1117       Martyna-Tuckerman-Tobias-Klein implementation, only useable with
1118       :mdp-value:`md-vv` or :mdp-value:`md-vv-avek`, very similar to
1119       Parrinello-Rahman. As for Nose-Hoover temperature coupling the
1120       time constant :mdp:`tau-p` is the period of pressure
1121       fluctuations at equilibrium. This is probably a better method
1122       when you want to apply pressure scaling during data collection,
1123       but beware that you can get very large oscillations if you are
1124       starting from a different pressure. Currently (as of version
1125       5.1), it only supports isotropic scaling, and only works without
1126       constraints.
1127
1128 .. mdp:: pcoupltype
1129
1130    Specifies the kind of isotropy of the pressure coupling used. Each
1131    kind takes one or more values for :mdp:`compressibility` and
1132    :mdp:`ref-p`. Only a single value is permitted for :mdp:`tau-p`.
1133
1134    .. mdp-value:: isotropic
1135
1136       Isotropic pressure coupling with time constant
1137       :mdp:`tau-p`. One value each for :mdp:`compressibility` and
1138       :mdp:`ref-p` is required.
1139
1140    .. mdp-value:: semiisotropic
1141
1142       Pressure coupling which is isotropic in the ``x`` and ``y``
1143       direction, but different in the ``z`` direction. This can be
1144       useful for membrane simulations. Two values each for
1145       :mdp:`compressibility` and :mdp:`ref-p` are required, for
1146       ``x/y`` and ``z`` directions respectively.
1147
1148    .. mdp-value:: anisotropic
1149
1150       Same as before, but 6 values are needed for ``xx``, ``yy``, ``zz``,
1151       ``xy/yx``, ``xz/zx`` and ``yz/zy`` components,
1152       respectively. When the off-diagonal compressibilities are set to
1153       zero, a rectangular box will stay rectangular. Beware that
1154       anisotropic scaling can lead to extreme deformation of the
1155       simulation box.
1156
1157    .. mdp-value:: surface-tension
1158
1159       Surface tension coupling for surfaces parallel to the
1160       xy-plane. Uses normal pressure coupling for the `z`-direction,
1161       while the surface tension is coupled to the `x/y` dimensions of
1162       the box. The first :mdp:`ref-p` value is the reference surface
1163       tension times the number of surfaces ``bar nm``, the second
1164       value is the reference `z`-pressure ``bar``. The two
1165       :mdp:`compressibility` values are the compressibility in the
1166       `x/y` and `z` direction respectively. The value for the
1167       `z`-compressibility should be reasonably accurate since it
1168       influences the convergence of the surface-tension, it can also
1169       be set to zero to have a box with constant height.
1170
1171 .. mdp:: nstpcouple
1172
1173    (-1)
1174    The frequency for coupling the pressure. The default value of -1
1175    sets :mdp:`nstpcouple` equal to :mdp:`nstlist`, unless
1176    :mdp:`nstlist` <=0, then a value of 10 is used. For velocity
1177    Verlet integrators :mdp:`nstpcouple` is set to 1.
1178
1179 .. mdp:: tau-p
1180
1181    (1) \[ps\]
1182    The time constant for pressure coupling (one value for all
1183    directions).
1184
1185 .. mdp:: compressibility
1186
1187    \[bar^-1\]
1188    The compressibility (NOTE: this is now really in bar^-1) For water at 1
1189    atm and 300 K the compressibility is 4.5e-5 bar^-1. The number of
1190    required values is implied by :mdp:`pcoupltype`.
1191
1192 .. mdp:: ref-p
1193
1194    \[bar\]
1195    The reference pressure for coupling. The number of required values
1196    is implied by :mdp:`pcoupltype`.
1197
1198 .. mdp:: refcoord-scaling
1199
1200    .. mdp-value:: no
1201
1202       The reference coordinates for position restraints are not
1203       modified. Note that with this option the virial and pressure
1204       will depend on the absolute positions of the reference
1205       coordinates.
1206
1207    .. mdp-value:: all
1208
1209       The reference coordinates are scaled with the scaling matrix of
1210       the pressure coupling.
1211
1212    .. mdp-value:: com
1213
1214       Scale the center of mass of the reference coordinates with the
1215       scaling matrix of the pressure coupling. The vectors of each
1216       reference coordinate to the center of mass are not scaled. Only
1217       one COM is used, even when there are multiple molecules with
1218       position restraints. For calculating the COM of the reference
1219       coordinates in the starting configuration, periodic boundary
1220       conditions are not taken into account.
1221
1222
1223 Simulated annealing
1224 ^^^^^^^^^^^^^^^^^^^
1225
1226 Simulated annealing is controlled separately for each temperature
1227 group in |Gromacs|. The reference temperature is a piecewise linear
1228 function, but you can use an arbitrary number of points for each
1229 group, and choose either a single sequence or a periodic behaviour for
1230 each group. The actual annealing is performed by dynamically changing
1231 the reference temperature used in the thermostat algorithm selected,
1232 so remember that the system will usually not instantaneously reach the
1233 reference temperature!
1234
1235 .. mdp:: annealing
1236
1237    Type of annealing for each temperature group
1238
1239    .. mdp-value:: no
1240
1241        No simulated annealing - just couple to reference temperature value.
1242
1243    .. mdp-value:: single
1244
1245        A single sequence of annealing points. If your simulation is
1246        longer than the time of the last point, the temperature will be
1247        coupled to this constant value after the annealing sequence has
1248        reached the last time point.
1249
1250    .. mdp-value:: periodic
1251
1252        The annealing will start over at the first reference point once
1253        the last reference time is reached. This is repeated until the
1254        simulation ends.
1255
1256 .. mdp:: annealing-npoints
1257
1258    A list with the number of annealing reference/control points used
1259    for each temperature group. Use 0 for groups that are not
1260    annealed. The number of entries should equal the number of
1261    temperature groups.
1262
1263 .. mdp:: annealing-time
1264
1265    List of times at the annealing reference/control points for each
1266    group. If you are using periodic annealing, the times will be used
1267    modulo the last value, *i.e.* if the values are 0, 5, 10, and 15,
1268    the coupling will restart at the 0ps value after 15ps, 30ps, 45ps,
1269    etc. The number of entries should equal the sum of the numbers
1270    given in :mdp:`annealing-npoints`.
1271
1272 .. mdp:: annealing-temp
1273
1274    List of temperatures at the annealing reference/control points for
1275    each group. The number of entries should equal the sum of the
1276    numbers given in :mdp:`annealing-npoints`.
1277
1278 Confused? OK, let's use an example. Assume you have two temperature
1279 groups, set the group selections to ``annealing = single periodic``,
1280 the number of points of each group to ``annealing-npoints = 3 4``, the
1281 times to ``annealing-time = 0 3 6 0 2 4 6`` and finally temperatures
1282 to ``annealing-temp = 298 280 270 298 320 320 298``. The first group
1283 will be coupled to 298K at 0ps, but the reference temperature will
1284 drop linearly to reach 280K at 3ps, and then linearly between 280K and
1285 270K from 3ps to 6ps. After this is stays constant, at 270K. The
1286 second group is coupled to 298K at 0ps, it increases linearly to 320K
1287 at 2ps, where it stays constant until 4ps. Between 4ps and 6ps it
1288 decreases to 298K, and then it starts over with the same pattern
1289 again, *i.e.* rising linearly from 298K to 320K between 6ps and
1290 8ps. Check the summary printed by :ref:`gmx grompp` if you are unsure!
1291
1292
1293 Velocity generation
1294 ^^^^^^^^^^^^^^^^^^^
1295
1296 .. mdp:: gen-vel
1297
1298    .. mdp-value:: no
1299
1300         Do not generate velocities. The velocities are set to zero
1301         when there are no velocities in the input structure file.
1302
1303    .. mdp-value:: yes
1304
1305         Generate velocities in :ref:`gmx grompp` according to a
1306         Maxwell distribution at temperature :mdp:`gen-temp`, with
1307         random seed :mdp:`gen-seed`. This is only meaningful with
1308         integrator :mdp-value:`integrator=md`.
1309
1310 .. mdp:: gen-temp
1311
1312    (300) \[K\]
1313    temperature for Maxwell distribution
1314
1315 .. mdp:: gen-seed
1316
1317    (-1) \[integer\]
1318    used to initialize random generator for random velocities,
1319    when :mdp:`gen-seed` is set to -1, a pseudo random seed is
1320    used.
1321
1322
1323 Bonds
1324 ^^^^^
1325
1326 .. mdp:: constraints
1327
1328    .. mdp-value:: none
1329
1330       No constraints except for those defined explicitly in the
1331       topology, *i.e.* bonds are represented by a harmonic (or other)
1332       potential or a Morse potential (depending on the setting of
1333       :mdp:`morse`) and angles by a harmonic (or other) potential.
1334
1335    .. mdp-value:: h-bonds
1336
1337       Convert the bonds with H-atoms to constraints.
1338
1339    .. mdp-value:: all-bonds
1340
1341       Convert all bonds to constraints.
1342
1343    .. mdp-value:: h-angles
1344
1345       Convert all bonds and additionally the angles that involve
1346       H-atoms to bond-constraints.
1347
1348    .. mdp-value:: all-angles
1349
1350       Convert all bonds and angles to bond-constraints.
1351
1352 .. mdp:: constraint-algorithm
1353
1354    .. mdp-value:: LINCS
1355
1356       LINear Constraint Solver. With domain decomposition the parallel
1357       version P-LINCS is used. The accuracy in set with
1358       :mdp:`lincs-order`, which sets the number of matrices in the
1359       expansion for the matrix inversion. After the matrix inversion
1360       correction the algorithm does an iterative correction to
1361       compensate for lengthening due to rotation. The number of such
1362       iterations can be controlled with :mdp:`lincs-iter`. The root
1363       mean square relative constraint deviation is printed to the log
1364       file every :mdp:`nstlog` steps. If a bond rotates more than
1365       :mdp:`lincs-warnangle` in one step, a warning will be printed
1366       both to the log file and to ``stderr``. LINCS should not be used
1367       with coupled angle constraints.
1368
1369    .. mdp-value:: SHAKE
1370
1371       SHAKE is slightly slower and less stable than LINCS, but does
1372       work with angle constraints. The relative tolerance is set with
1373       :mdp:`shake-tol`, 0.0001 is a good value for "normal" MD. SHAKE
1374       does not support constraints between atoms on different nodes,
1375       thus it can not be used with domain decompositon when inter
1376       charge-group constraints are present. SHAKE can not be used with
1377       energy minimization.
1378
1379 .. mdp:: continuation
1380
1381    This option was formerly known as unconstrained-start.
1382
1383    .. mdp-value:: no
1384
1385       apply constraints to the start configuration and reset shells
1386
1387    .. mdp-value:: yes
1388
1389       do not apply constraints to the start configuration and do not
1390       reset shells, useful for exact coninuation and reruns
1391
1392 .. mdp:: shake-tol
1393
1394    (0.0001)
1395    relative tolerance for SHAKE
1396
1397 .. mdp:: lincs-order
1398
1399    (4)
1400    Highest order in the expansion of the constraint coupling
1401    matrix. When constraints form triangles, an additional expansion of
1402    the same order is applied on top of the normal expansion only for
1403    the couplings within such triangles. For "normal" MD simulations an
1404    order of 4 usually suffices, 6 is needed for large time-steps with
1405    virtual sites or BD. For accurate energy minimization an order of 8
1406    or more might be required. With domain decomposition, the cell size
1407    is limited by the distance spanned by :mdp:`lincs-order` +1
1408    constraints. When one wants to scale further than this limit, one
1409    can decrease :mdp:`lincs-order` and increase :mdp:`lincs-iter`,
1410    since the accuracy does not deteriorate when (1+ :mdp:`lincs-iter`
1411    )* :mdp:`lincs-order` remains constant.
1412
1413 .. mdp:: lincs-iter
1414
1415    (1)
1416    Number of iterations to correct for rotational lengthening in
1417    LINCS. For normal runs a single step is sufficient, but for NVE
1418    runs where you want to conserve energy accurately or for accurate
1419    energy minimization you might want to increase it to 2.
1420
1421 .. mdp:: lincs-warnangle
1422
1423    (30) \[deg\]
1424    maximum angle that a bond can rotate before LINCS will complain
1425
1426 .. mdp:: morse
1427
1428    .. mdp-value:: no
1429
1430       bonds are represented by a harmonic potential
1431
1432    .. mdp-value:: yes
1433
1434       bonds are represented by a Morse potential
1435
1436
1437 Energy group exclusions
1438 ^^^^^^^^^^^^^^^^^^^^^^^
1439
1440 .. mdp:: energygrp-excl
1441
1442    Pairs of energy groups for which all non-bonded interactions are
1443    excluded. An example: if you have two energy groups ``Protein`` and
1444    ``SOL``, specifying ``energygrp-excl = Protein Protein SOL SOL``
1445    would give only the non-bonded interactions between the protein and
1446    the solvent. This is especially useful for speeding up energy
1447    calculations with ``mdrun -rerun`` and for excluding interactions
1448    within frozen groups.
1449
1450
1451 Walls
1452 ^^^^^
1453
1454 .. mdp:: nwall
1455
1456    (0)
1457    When set to 1 there is a wall at ``z=0``, when set to 2 there is
1458    also a wall at ``z=z-box``. Walls can only be used with :mdp:`pbc`
1459    ``=xy``. When set to 2 pressure coupling and Ewald summation can be
1460    used (it is usually best to use semiisotropic pressure coupling
1461    with the ``x/y`` compressibility set to 0, as otherwise the surface
1462    area will change). Walls interact wit the rest of the system
1463    through an optional :mdp:`wall-atomtype`. Energy groups ``wall0``
1464    and ``wall1`` (for :mdp:`nwall` =2) are added automatically to
1465    monitor the interaction of energy groups with each wall. The center
1466    of mass motion removal will be turned off in the ``z``-direction.
1467
1468 .. mdp:: wall-atomtype
1469
1470    the atom type name in the force field for each wall. By (for
1471    example) defining a special wall atom type in the topology with its
1472    own combination rules, this allows for independent tuning of the
1473    interaction of each atomtype with the walls.
1474
1475 .. mdp:: wall-type
1476
1477    .. mdp-value:: 9-3
1478
1479       LJ integrated over the volume behind the wall: 9-3 potential
1480
1481    .. mdp-value:: 10-4
1482
1483       LJ integrated over the wall surface: 10-4 potential
1484
1485    .. mdp-value:: 12-6
1486
1487       direct LJ potential with the ``z`` distance from the wall
1488
1489 .. mdp:: table
1490
1491    user defined potentials indexed with the ``z`` distance from the
1492    wall, the tables are read analogously to the
1493    :mdp:`energygrp-table` option, where the first name is for a
1494    "normal" energy group and the second name is ``wall0`` or
1495    ``wall1``, only the dispersion and repulsion columns are used
1496
1497 .. mdp:: wall-r-linpot
1498
1499    (-1) \[nm\]
1500    Below this distance from the wall the potential is continued
1501    linearly and thus the force is constant. Setting this option to a
1502    postive value is especially useful for equilibration when some
1503    atoms are beyond a wall. When the value is <=0 (<0 for
1504    :mdp:`wall-type` =table), a fatal error is generated when atoms
1505    are beyond a wall.
1506
1507 .. mdp:: wall-density
1508
1509    \[nm^-3/nm^-2\]
1510    the number density of the atoms for each wall for wall types 9-3
1511    and 10-4
1512
1513 .. mdp:: wall-ewald-zfac
1514
1515    (3)
1516    The scaling factor for the third box vector for Ewald summation
1517    only, the minimum is 2. Ewald summation can only be used with
1518    :mdp:`nwall` =2, where one should use :mdp:`ewald-geometry`
1519    ``=3dc``. The empty layer in the box serves to decrease the
1520    unphysical Coulomb interaction between periodic images.
1521
1522
1523 COM pulling
1524 ^^^^^^^^^^^
1525
1526 Note that where pulling coordinate are applicable, there can be more
1527 than one (set with :mdp:`pull-ncoords`) and multiple related :ref:`mdp`
1528 variables will exist accordingly. Documentation references to things
1529 like :mdp:`pull-coord1-vec` should be understood to apply to to the
1530 applicable pulling coordinate.
1531
1532 .. mdp:: pull
1533
1534    .. mdp-value:: no
1535
1536       No center of mass pulling. All the following pull options will
1537       be ignored (and if present in the :ref:`mdp` file, they unfortunately
1538       generate warnings)
1539
1540    .. mdp-value:: yes
1541
1542        Center of mass pulling will be applied on 1 or more groups using
1543        1 or more pull coordinates.
1544
1545 .. mdp:: pull-cylinder-r
1546
1547    (1.5) \[nm\]
1548    the radius of the cylinder for
1549    :mdp:`pull-coord1-geometry` = :mdp-value:`cylinder`
1550
1551 .. mdp:: pull-constr-tol
1552
1553    (1e-6)
1554    the relative constraint tolerance for constraint pulling
1555
1556 .. mdp:: pull-print-com
1557
1558    .. mdp-value:: no
1559
1560       do not print the COM for any group
1561
1562    .. mdp-value:: yes
1563
1564       print the COM of all groups for all pull coordinates
1565
1566 .. mdp:: pull-print-ref-value
1567
1568    .. mdp-value:: no
1569
1570       do not print the reference value for each pull coordinate
1571
1572    .. mdp-value:: yes
1573
1574       print the reference value for each pull coordinate
1575
1576 .. mdp:: pull-print-components
1577
1578    .. mdp-value:: no
1579
1580       only print the distance for each pull coordinate
1581    
1582    .. mdp-value:: yes
1583
1584       print the distance and Cartesian components selected in
1585       :mdp:`pull-coord1-dim`
1586
1587 .. mdp:: pull-nstxout
1588
1589    (50)
1590    frequency for writing out the COMs of all the pull group (0 is
1591    never)
1592
1593 .. mdp:: pull-nstfout
1594
1595    (50)
1596    frequency for writing out the force of all the pulled group
1597    (0 is never)
1598
1599
1600 .. mdp:: pull-ngroups
1601
1602    (1)
1603    The number of pull groups, not including the absolute reference
1604    group, when used. Pull groups can be reused in multiple pull
1605    coordinates. Below only the pull options for group 1 are given,
1606    further groups simply increase the group index number.
1607
1608 .. mdp:: pull-ncoords
1609
1610    (1)
1611    The number of pull coordinates. Below only the pull options for
1612    coordinate 1 are given, further coordinates simply increase the
1613    coordinate index number.
1614
1615 .. mdp:: pull-group1-name
1616
1617    The name of the pull group, is looked up in the index file or in
1618    the default groups to obtain the atoms involved.
1619
1620 .. mdp:: pull-group1-weights
1621
1622    Optional relative weights which are multiplied with the masses of
1623    the atoms to give the total weight for the COM. The number should
1624    be 0, meaning all 1, or the number of atoms in the pull group.
1625
1626 .. mdp:: pull-group1-pbcatom
1627
1628    (0)
1629    The reference atom for the treatment of periodic boundary
1630    conditions inside the group (this has no effect on the treatment of
1631    the pbc between groups). This option is only important when the
1632    diameter of the pull group is larger than half the shortest box
1633    vector. For determining the COM, all atoms in the group are put at
1634    their periodic image which is closest to
1635    :mdp:`pull-group1-pbcatom`. A value of 0 means that the middle
1636    atom (number wise) is used. This parameter is not used with
1637    :mdp:`pull-coord1-geometry` cylinder. A value of -1 turns on cosine
1638    weighting, which is useful for a group of molecules in a periodic
1639    system, *e.g.* a water slab (see Engin et al. J. Chem. Phys. B
1640    2010).
1641
1642 .. mdp:: pull-coord1-type
1643
1644    .. mdp-value:: umbrella
1645
1646       Center of mass pulling using an umbrella potential between the
1647       reference group and one or more groups.
1648
1649    .. mdp-value:: constraint
1650
1651       Center of mass pulling using a constraint between the reference
1652       group and one or more groups. The setup is identical to the
1653       option umbrella, except for the fact that a rigid constraint is
1654       applied instead of a harmonic potential.
1655
1656    .. mdp-value:: constant-force
1657
1658       Center of mass pulling using a linear potential and therefore a
1659       constant force. For this option there is no reference position
1660       and therefore the parameters :mdp:`pull-coord1-init` and
1661       :mdp:`pull-coord1-rate` are not used.
1662
1663    .. mdp-value:: flat-bottom
1664
1665       At distances above :mdp:`pull-coord1-init` a harmonic potential
1666       is applied, otherwise no potential is applied.
1667
1668    .. mdp-value:: flat-bottom-high
1669
1670       At distances below :mdp:`pull-coord1-init` a harmonic potential
1671       is applied, otherwise no potential is applied.
1672
1673    .. mdp-value:: external-potential
1674
1675       An external potential that needs to be provided by another
1676       module.
1677
1678 .. mdp:: pull-coord1-potential-provider
1679
1680       The name of the external module that provides the potential for
1681       the case where :mdp:`pull-coord1-type` is external-potential.
1682
1683 .. mdp:: pull-coord1-geometry
1684
1685    .. mdp-value:: distance
1686
1687       Pull along the vector connecting the two groups. Components can
1688       be selected with :mdp:`pull-coord1-dim`.
1689
1690    .. mdp-value:: direction
1691
1692       Pull in the direction of :mdp:`pull-coord1-vec`.
1693
1694    .. mdp-value:: direction-periodic
1695
1696       As :mdp-value:`direction`, but allows the distance to be larger
1697       than half the box size. With this geometry the box should not be
1698       dynamic (*e.g.* no pressure scaling) in the pull dimensions and
1699       the pull force is not added to virial.
1700
1701    .. mdp-value:: direction-relative
1702
1703       As :mdp-value:`direction`, but the pull vector is the vector
1704       that points from the COM of a third to the COM of a fourth pull
1705       group. This means that 4 groups need to be supplied in
1706       :mdp:`pull-coord1-groups`. Note that the pull force will give
1707       rise to a torque on the pull vector, which is turn leads to
1708       forces perpendicular to the pull vector on the two groups
1709       defining the vector. If you want a pull group to move between
1710       the two groups defining the vector, simply use the union of
1711       these two groups as the reference group.
1712
1713    .. mdp-value:: cylinder
1714
1715       Designed for pulling with respect to a layer where the reference
1716       COM is given by a local cylindrical part of the reference group.
1717       The pulling is in the direction of :mdp:`pull-coord1-vec`. From
1718       the first of the two groups in :mdp:`pull-coord1-groups` a
1719       cylinder is selected around the axis going through the COM of
1720       the second group with direction :mdp:`pull-coord1-vec` with
1721       radius :mdp:`pull-cylinder-r`. Weights of the atoms decrease
1722       continously to zero as the radial distance goes from 0 to
1723       :mdp:`pull-cylinder-r` (mass weighting is also used). The radial
1724       dependence gives rise to radial forces on both pull groups.
1725       Note that the radius should be smaller than half the box size.
1726       For tilted cylinders they should be even smaller than half the
1727       box size since the distance of an atom in the reference group
1728       from the COM of the pull group has both a radial and an axial
1729       component. This geometry is not supported with constraint
1730       pulling.
1731
1732    .. mdp-value:: angle
1733
1734       Pull along an angle defined by four groups. The angle is
1735       defined as the angle between two vectors: the vector connecting
1736       the COM of the first group to the COM of the second group and
1737       the vector connecting the COM of the third group to the COM of
1738       the fourth group.
1739
1740    .. mdp-value:: angle-axis
1741
1742       As :mdp-value:`angle` but the second vector is given by :mdp:`pull-coord1-vec`.
1743       Thus, only the two groups that define the first vector need to be given.
1744
1745    .. mdp-value:: dihedral
1746
1747       Pull along a dihedral angle defined by six groups. These pairwise
1748       define three vectors: the vector connecting the COM of group 1
1749       to the COM of group 2, the COM of group 3 to the COM of group 4,
1750       and the COM of group 5 to the COM group 6. The dihedral angle is
1751       then defined as the angle between two planes: the plane spanned by the
1752       the two first vectors and the plane spanned the two last vectors.
1753
1754
1755 .. mdp:: pull-coord1-groups
1756
1757    The group indices on which this pull coordinate will operate.
1758    The number of group indices required is geometry dependent.
1759    The first index can be 0, in which case an
1760    absolute reference of :mdp:`pull-coord1-origin` is used. With an
1761    absolute reference the system is no longer translation invariant
1762    and one should think about what to do with the center of mass
1763    motion.
1764
1765 .. mdp:: pull-coord1-dim
1766
1767    (Y Y Y)
1768    Selects the dimensions that this pull coordinate acts on and that
1769    are printed to the output files when
1770    :mdp:`pull-print-components` = :mdp-value:`yes`. With
1771    :mdp:`pull-coord1-geometry` = :mdp-value:`distance`, only Cartesian
1772    components set to Y contribute to the distance. Thus setting this
1773    to Y Y N results in a distance in the x/y plane. With other
1774    geometries all dimensions with non-zero entries in
1775    :mdp:`pull-coord1-vec` should be set to Y, the values for other
1776    dimensions only affect the output.
1777
1778 .. mdp:: pull-coord1-origin
1779
1780    (0.0 0.0 0.0)
1781    The pull reference position for use with an absolute reference.
1782
1783 .. mdp:: pull-coord1-vec
1784
1785    (0.0 0.0 0.0)
1786    The pull direction. :ref:`gmx grompp` normalizes the vector.
1787
1788 .. mdp:: pull-coord1-start
1789
1790    .. mdp-value:: no
1791
1792       do not modify :mdp:`pull-coord1-init`
1793
1794    .. mdp-value:: yes
1795
1796       add the COM distance of the starting conformation to
1797       :mdp:`pull-coord1-init`
1798
1799 .. mdp:: pull-coord1-init
1800
1801    (0.0) \[nm\] / \[deg\]
1802    The reference distance at t=0.
1803
1804 .. mdp:: pull-coord1-rate
1805
1806    (0) \[nm/ps\] / \[deg/ps\]
1807    The rate of change of the reference position.
1808
1809 .. mdp:: pull-coord1-k
1810
1811    (0) \[kJ mol-1 nm-2\] / \[kJ mol-1 nm-1\] / \[kJ mol-1 rad-2\] / \[kJ mol-1 rad-1\]
1812    The force constant. For umbrella pulling this is the harmonic force
1813    constant in kJ mol-1 nm-2 (or kJ mol-1 rad-2 for angles). For constant force pulling this is the
1814    force constant of the linear potential, and thus the negative (!)
1815    of the constant force in kJ mol-1 nm-1 (or kJ mol-1 rad-1 for angles).
1816    Note that for angles the force constant is expressed in terms of radians
1817    (while :mdp:`pull-coord1-init` and :mdp:`pull-coord1-rate` are expressed in degrees).
1818
1819 .. mdp:: pull-coord1-kB
1820
1821    (pull-k1) \[kJ mol-1 nm-2\] / \[kJ mol-1 nm-1\] / \[kJ mol-1 rad-2\] / \[kJ mol-1 rad-1\]
1822    As :mdp:`pull-coord1-k`, but for state B. This is only used when
1823    :mdp:`free-energy` is turned on. The force constant is then (1 -
1824    lambda) * :mdp:`pull-coord1-k` + lambda * :mdp:`pull-coord1-kB`.
1825
1826
1827 Enforced rotation
1828 ^^^^^^^^^^^^^^^^^
1829
1830 These :ref:`mdp` parameters can be used enforce the rotation of a group of atoms,
1831 e.g. a protein subunit. The `reference manual`_ describes in detail 13 different potentials
1832 that can be used to achieve such a rotation.
1833
1834 .. mdp:: rotation
1835
1836    .. mdp-value:: no
1837
1838       No enforced rotation will be applied. All enforced rotation options will
1839       be ignored (and if present in the :ref:`mdp` file, they unfortunately
1840       generate warnings).
1841
1842    .. mdp-value:: yes
1843
1844       Apply the rotation potential specified by :mdp:`rot-type` to the group of atoms given
1845       under the :mdp:`rot-group` option.
1846
1847 .. mdp:: rot-ngroups
1848
1849    (1)
1850    Number of rotation groups.
1851
1852 .. mdp:: rot-group0
1853
1854    Name of rotation group 0 in the index file.
1855
1856 .. mdp:: rot-type0
1857
1858    (iso)
1859    Type of rotation potential that is applied to rotation group 0. Can be of of the following:
1860    ``iso``, ``iso-pf``, ``pm``, ``pm-pf``, ``rm``, ``rm-pf``, ``rm2``, ``rm2-pf``,
1861    ``flex``, ``flex-t``, ``flex2``, or ``flex2-t``.
1862
1863 .. mdp:: rot-massw0
1864
1865    (no)
1866    Use mass weighted rotation group positions.
1867
1868 .. mdp:: rot-vec0
1869
1870    (1.0 0.0 0.0)
1871    Rotation vector, will get normalized.
1872
1873 .. mdp:: rot-pivot0
1874
1875    (0.0 0.0 0.0)
1876    Pivot point (nm) for the potentials ``iso``, ``pm``, ``rm``, and ``rm2``.
1877
1878 .. mdp:: rot-rate0
1879
1880    (0)
1881    Reference rotation rate (degree/ps) of group 0.
1882
1883 .. mdp:: rot-k0
1884
1885    (0)
1886    Force constant (kJ/(mol*nm^2)) for group 0.
1887
1888 .. mdp:: rot-slab-dist0
1889
1890    (1.5)
1891    Slab distance (nm), if a flexible axis rotation type was chosen.
1892
1893 .. mdp:: rot-min-gauss0
1894
1895    (0.001)
1896    Minimum value (cutoff) of Gaussian function for the force to be evaluated
1897    (for the flexible axis potentials).
1898
1899 .. mdp:: rot-eps0
1900
1901    (0.0001)
1902    Value of additive constant epsilon' (nm^2) for ``rm2*`` and ``flex2*`` potentials.
1903
1904 .. mdp:: rot-fit-method0
1905
1906    (rmsd)
1907    Fitting method when determining the actual angle of a rotation group
1908    (can be one of ``rmsd``, ``norm``, or ``potential``).
1909
1910 .. mdp:: rot-potfit-nsteps0
1911
1912    (21)
1913    For fit type ``potential``, the number of angular positions around the reference angle for which the
1914    rotation potential is evaluated.
1915
1916 .. mdp:: rot-potfit-step0
1917
1918    (0.25)
1919    For fit type ``potential``, the distance in degrees between two angular positions.
1920
1921 .. mdp:: rot-nstrout
1922
1923    (100)
1924    Output frequency (in steps) for the angle of the rotation group, as well as for the torque
1925    and the rotation potential energy.
1926
1927 .. mdp:: rot-nstsout
1928
1929    (1000)
1930    Output frequency for per-slab data of the flexible axis potentials, i.e. angles, torques and slab centers.
1931
1932
1933 NMR refinement
1934 ^^^^^^^^^^^^^^
1935
1936 .. mdp:: disre
1937
1938    .. mdp-value:: no
1939
1940       ignore distance restraint information in topology file
1941
1942    .. mdp-value:: simple
1943
1944       simple (per-molecule) distance restraints.
1945
1946    .. mdp-value:: ensemble
1947
1948       distance restraints over an ensemble of molecules in one
1949       simulation box. Normally, one would perform ensemble averaging
1950       over multiple subsystems, each in a separate box, using ``mdrun
1951       -multi``. Supply ``topol0.tpr``, ``topol1.tpr``, ... with
1952       different coordinates and/or velocities. The environment
1953       variable ``GMX_DISRE_ENSEMBLE_SIZE`` sets the number of systems
1954       within each ensemble (usually equal to the ``mdrun -multi``
1955       value).
1956
1957 .. mdp:: disre-weighting
1958
1959    .. mdp-value:: equal
1960
1961       divide the restraint force equally over all atom pairs in the
1962       restraint
1963
1964    .. mdp-value:: conservative
1965
1966       the forces are the derivative of the restraint potential, this
1967       results in an weighting of the atom pairs to the reciprocal
1968       seventh power of the displacement. The forces are conservative
1969       when :mdp:`disre-tau` is zero.
1970
1971 .. mdp:: disre-mixed
1972
1973    .. mdp-value:: no
1974
1975       the violation used in the calculation of the restraint force is
1976       the time-averaged violation
1977
1978    .. mdp-value:: yes
1979
1980       the violation used in the calculation of the restraint force is
1981       the square root of the product of the time-averaged violation
1982       and the instantaneous violation
1983
1984 .. mdp:: disre-fc
1985
1986    (1000) \[kJ mol-1 nm-2\]
1987    force constant for distance restraints, which is multiplied by a
1988    (possibly) different factor for each restraint given in the `fac`
1989    column of the interaction in the topology file.
1990
1991 .. mdp:: disre-tau
1992
1993    (0) \[ps\]
1994    time constant for distance restraints running average. A value of
1995    zero turns off time averaging.
1996
1997 .. mdp:: nstdisreout
1998
1999    (100) \[steps\]
2000    period between steps when the running time-averaged and
2001    instantaneous distances of all atom pairs involved in restraints
2002    are written to the energy file (can make the energy file very
2003    large)
2004
2005 .. mdp:: orire
2006
2007    .. mdp-value:: no
2008
2009       ignore orientation restraint information in topology file
2010
2011    .. mdp-value:: yes
2012
2013       use orientation restraints, ensemble averaging can be performed
2014       with `mdrun -multi`
2015
2016 .. mdp:: orire-fc
2017
2018    (0) \[kJ mol\]
2019    force constant for orientation restraints, which is multiplied by a
2020    (possibly) different weight factor for each restraint, can be set
2021    to zero to obtain the orientations from a free simulation
2022
2023 .. mdp:: orire-tau
2024
2025    (0) \[ps\]
2026    time constant for orientation restraints running average. A value
2027    of zero turns off time averaging.
2028
2029 .. mdp:: orire-fitgrp
2030
2031    fit group for orientation restraining. This group of atoms is used
2032    to determine the rotation **R** of the system with respect to the
2033    reference orientation. The reference orientation is the starting
2034    conformation of the first subsystem. For a protein, backbone is a
2035    reasonable choice
2036
2037 .. mdp:: nstorireout
2038
2039    (100) \[steps\]
2040    period between steps when the running time-averaged and
2041    instantaneous orientations for all restraints, and the molecular
2042    order tensor are written to the energy file (can make the energy
2043    file very large)
2044
2045
2046 Free energy calculations
2047 ^^^^^^^^^^^^^^^^^^^^^^^^
2048
2049 .. mdp:: free-energy
2050
2051    .. mdp-value:: no
2052
2053       Only use topology A.
2054
2055    .. mdp-value:: yes
2056
2057       Interpolate between topology A (lambda=0) to topology B
2058       (lambda=1) and write the derivative of the Hamiltonian with
2059       respect to lambda (as specified with :mdp:`dhdl-derivatives`),
2060       or the Hamiltonian differences with respect to other lambda
2061       values (as specified with foreign lambda) to the energy file
2062       and/or to ``dhdl.xvg``, where they can be processed by, for
2063       example :ref:`gmx bar`. The potentials, bond-lengths and angles
2064       are interpolated linearly as described in the manual. When
2065       :mdp:`sc-alpha` is larger than zero, soft-core potentials are
2066       used for the LJ and Coulomb interactions.
2067
2068 .. mdp:: expanded
2069
2070    Turns on expanded ensemble simulation, where the alchemical state
2071    becomes a dynamic variable, allowing jumping between different
2072    Hamiltonians. See the expanded ensemble options for controlling how
2073    expanded ensemble simulations are performed. The different
2074    Hamiltonians used in expanded ensemble simulations are defined by
2075    the other free energy options.
2076
2077 .. mdp:: init-lambda
2078
2079    (-1)
2080    starting value for lambda (float). Generally, this should only be
2081    used with slow growth (*i.e.* nonzero :mdp:`delta-lambda`). In
2082    other cases, :mdp:`init-lambda-state` should be specified
2083    instead. Must be greater than or equal to 0.
2084
2085 .. mdp:: delta-lambda
2086
2087    (0)
2088    increment per time step for lambda
2089
2090 .. mdp:: init-lambda-state
2091
2092    (-1)
2093    starting value for the lambda state (integer). Specifies which
2094    columm of the lambda vector (:mdp:`coul-lambdas`,
2095    :mdp:`vdw-lambdas`, :mdp:`bonded-lambdas`,
2096    :mdp:`restraint-lambdas`, :mdp:`mass-lambdas`,
2097    :mdp:`temperature-lambdas`, :mdp:`fep-lambdas`) should be
2098    used. This is a zero-based index: :mdp:`init-lambda-state` 0 means
2099    the first column, and so on.
2100
2101 .. mdp:: fep-lambdas
2102
2103    \[array\]
2104    Zero, one or more lambda values for which Delta H values will be
2105    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2106    steps. Values must be between 0 and 1. Free energy differences
2107    between different lambda values can then be determined with
2108    :ref:`gmx bar`. :mdp:`fep-lambdas` is different from the
2109    other -lambdas keywords because all components of the lambda vector
2110    that are not specified will use :mdp:`fep-lambdas` (including
2111    :mdp:`restraint-lambdas` and therefore the pull code restraints).
2112
2113 .. mdp:: coul-lambdas
2114
2115    \[array\]
2116    Zero, one or more lambda values for which Delta H values will be
2117    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2118    steps. Values must be between 0 and 1. Only the electrostatic
2119    interactions are controlled with this component of the lambda
2120    vector (and only if the lambda=0 and lambda=1 states have differing
2121    electrostatic interactions).
2122
2123 .. mdp:: vdw-lambdas
2124
2125    \[array\]
2126    Zero, one or more lambda values for which Delta H values will be
2127    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2128    steps. Values must be between 0 and 1. Only the van der Waals
2129    interactions are controlled with this component of the lambda
2130    vector.
2131
2132 .. mdp:: bonded-lambdas
2133
2134    \[array\]
2135    Zero, one or more lambda values for which Delta H values will be
2136    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2137    steps. Values must be between 0 and 1. Only the bonded interactions
2138    are controlled with this component of the lambda vector.
2139
2140 .. mdp:: restraint-lambdas
2141
2142    \[array\]
2143    Zero, one or more lambda values for which Delta H values will be
2144    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2145    steps. Values must be between 0 and 1. Only the restraint
2146    interactions: dihedral restraints, and the pull code restraints are
2147    controlled with this component of the lambda vector.
2148
2149 .. mdp:: mass-lambdas
2150
2151    \[array\]
2152    Zero, one or more lambda values for which Delta H values will be
2153    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2154    steps. Values must be between 0 and 1. Only the particle masses are
2155    controlled with this component of the lambda vector.
2156
2157 .. mdp:: temperature-lambdas
2158
2159    \[array\]
2160    Zero, one or more lambda values for which Delta H values will be
2161    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2162    steps. Values must be between 0 and 1. Only the temperatures
2163    controlled with this component of the lambda vector. Note that
2164    these lambdas should not be used for replica exchange, only for
2165    simulated tempering.
2166
2167 .. mdp:: calc-lambda-neighbors
2168
2169    (1)
2170    Controls the number of lambda values for which Delta H values will
2171    be calculated and written out, if :mdp:`init-lambda-state` has
2172    been set. A positive value will limit the number of lambda points
2173    calculated to only the nth neighbors of :mdp:`init-lambda-state`:
2174    for example, if :mdp:`init-lambda-state` is 5 and this parameter
2175    has a value of 2, energies for lambda points 3-7 will be calculated
2176    and writen out. A value of -1 means all lambda points will be
2177    written out. For normal BAR such as with :ref:`gmx bar`, a value of
2178    1 is sufficient, while for MBAR -1 should be used.
2179
2180 .. mdp:: sc-alpha
2181
2182    (0)
2183    the soft-core alpha parameter, a value of 0 results in linear
2184    interpolation of the LJ and Coulomb interactions
2185
2186 .. mdp:: sc-r-power
2187
2188    (6)
2189    the power of the radial term in the soft-core equation. Possible
2190    values are 6 and 48. 6 is more standard, and is the default. When
2191    48 is used, then sc-alpha should generally be much lower (between
2192    0.001 and 0.003).
2193
2194 .. mdp:: sc-coul
2195
2196    (no)
2197    Whether to apply the soft-core free energy interaction
2198    transformation to the Columbic interaction of a molecule. Default
2199    is no, as it is generally more efficient to turn off the Coulomic
2200    interactions linearly before turning off the van der Waals
2201    interactions. Note that it is only taken into account when lambda
2202    states are used, not with :mdp:`couple-lambda0` /
2203    :mdp:`couple-lambda1`, and you can still turn off soft-core
2204    interactions by setting :mdp:`sc-alpha` to 0.
2205
2206 .. mdp:: sc-power
2207
2208    (0)
2209    the power for lambda in the soft-core function, only the values 1
2210    and 2 are supported
2211
2212 .. mdp:: sc-sigma
2213
2214    (0.3) \[nm\]
2215    the soft-core sigma for particles which have a C6 or C12 parameter
2216    equal to zero or a sigma smaller than :mdp:`sc-sigma`
2217
2218 .. mdp:: couple-moltype
2219
2220    Here one can supply a molecule type (as defined in the topology)
2221    for calculating solvation or coupling free energies. There is a
2222    special option ``system`` that couples all molecule types in the
2223    system. This can be useful for equilibrating a system starting from
2224    (nearly) random coordinates. :mdp:`free-energy` has to be turned
2225    on. The Van der Waals interactions and/or charges in this molecule
2226    type can be turned on or off between lambda=0 and lambda=1,
2227    depending on the settings of :mdp:`couple-lambda0` and
2228    :mdp:`couple-lambda1`. If you want to decouple one of several
2229    copies of a molecule, you need to copy and rename the molecule
2230    definition in the topology.
2231
2232 .. mdp:: couple-lambda0
2233
2234    .. mdp-value:: vdw-q
2235
2236       all interactions are on at lambda=0
2237
2238    .. mdp-value:: vdw
2239
2240       the charges are zero (no Coulomb interactions) at lambda=0
2241
2242    .. mdp-value:: q
2243
2244       the Van der Waals interactions are turned at lambda=0; soft-core
2245       interactions will be required to avoid singularities
2246
2247    .. mdp-value:: none
2248
2249       the Van der Waals interactions are turned off and the charges
2250       are zero at lambda=0; soft-core interactions will be required to
2251       avoid singularities.
2252
2253 .. mdp:: couple-lambda1
2254
2255    analogous to :mdp:`couple-lambda1`, but for lambda=1
2256
2257 .. mdp:: couple-intramol
2258
2259    .. mdp-value:: no
2260
2261       All intra-molecular non-bonded interactions for moleculetype
2262       :mdp:`couple-moltype` are replaced by exclusions and explicit
2263       pair interactions. In this manner the decoupled state of the
2264       molecule corresponds to the proper vacuum state without
2265       periodicity effects.
2266
2267    .. mdp-value:: yes
2268
2269       The intra-molecular Van der Waals and Coulomb interactions are
2270       also turned on/off. This can be useful for partitioning
2271       free-energies of relatively large molecules, where the
2272       intra-molecular non-bonded interactions might lead to
2273       kinetically trapped vacuum conformations. The 1-4 pair
2274       interactions are not turned off.
2275
2276 .. mdp:: nstdhdl
2277
2278    (100)
2279    the frequency for writing dH/dlambda and possibly Delta H to
2280    dhdl.xvg, 0 means no ouput, should be a multiple of
2281    :mdp:`nstcalcenergy`.
2282
2283 .. mdp:: dhdl-derivatives
2284
2285    (yes)
2286
2287    If yes (the default), the derivatives of the Hamiltonian with
2288    respect to lambda at each :mdp:`nstdhdl` step are written
2289    out. These values are needed for interpolation of linear energy
2290    differences with :ref:`gmx bar` (although the same can also be
2291    achieved with the right foreign lambda setting, that may not be as
2292    flexible), or with thermodynamic integration
2293
2294 .. mdp:: dhdl-print-energy
2295
2296    (no)
2297
2298    Include either the total or the potential energy in the dhdl
2299    file. Options are 'no', 'potential', or 'total'. This information
2300    is needed for later free energy analysis if the states of interest
2301    are at different temperatures. If all states are at the same
2302    temperature, this information is not needed. 'potential' is useful
2303    in case one is using ``mdrun -rerun`` to generate the ``dhdl.xvg``
2304    file. When rerunning from an existing trajectory, the kinetic
2305    energy will often not be correct, and thus one must compute the
2306    residual free energy from the potential alone, with the kinetic
2307    energy component computed analytically.
2308
2309 .. mdp:: separate-dhdl-file
2310
2311    .. mdp-value:: yes
2312
2313       The free energy values that are calculated (as specified with
2314       the foreign lambda and :mdp:`dhdl-derivatives` settings) are
2315       written out to a separate file, with the default name
2316       ``dhdl.xvg``. This file can be used directly with :ref:`gmx
2317       bar`.
2318
2319    .. mdp-value:: no
2320
2321       The free energy values are written out to the energy output file
2322       (``ener.edr``, in accumulated blocks at every :mdp:`nstenergy`
2323       steps), where they can be extracted with :ref:`gmx energy` or
2324       used directly with :ref:`gmx bar`.
2325
2326 .. mdp:: dh-hist-size
2327
2328    (0)
2329    If nonzero, specifies the size of the histogram into which the
2330    Delta H values (specified with foreign lambda) and the derivative
2331    dH/dl values are binned, and written to ener.edr. This can be used
2332    to save disk space while calculating free energy differences. One
2333    histogram gets written for each foreign lambda and two for the
2334    dH/dl, at every :mdp:`nstenergy` step. Be aware that incorrect
2335    histogram settings (too small size or too wide bins) can introduce
2336    errors. Do not use histograms unless you're certain you need it.
2337
2338 .. mdp:: dh-hist-spacing
2339
2340    (0.1)
2341    Specifies the bin width of the histograms, in energy units. Used in
2342    conjunction with :mdp:`dh-hist-size`. This size limits the
2343    accuracy with which free energies can be calculated. Do not use
2344    histograms unless you're certain you need it.
2345
2346
2347 Expanded Ensemble calculations
2348 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2349
2350 .. mdp:: nstexpanded
2351
2352    The number of integration steps beween attempted moves changing the
2353    system Hamiltonian in expanded ensemble simulations. Must be a
2354    multiple of :mdp:`nstcalcenergy`, but can be greater or less than
2355    :mdp:`nstdhdl`.
2356
2357 .. mdp:: lmc-stats
2358
2359    .. mdp-value:: no
2360
2361       No Monte Carlo in state space is performed.
2362
2363    .. mdp-value:: metropolis-transition
2364
2365       Uses the Metropolis weights to update the expanded ensemble
2366       weight of each state. Min{1,exp(-(beta_new u_new - beta_old
2367       u_old)}
2368
2369    .. mdp-value:: barker-transition
2370
2371       Uses the Barker transition critera to update the expanded
2372       ensemble weight of each state i, defined by exp(-beta_new
2373       u_new)/(exp(-beta_new u_new)+exp(-beta_old u_old))
2374
2375    .. mdp-value:: wang-landau
2376
2377       Uses the Wang-Landau algorithm (in state space, not energy
2378       space) to update the expanded ensemble weights.
2379
2380    .. mdp-value:: min-variance
2381
2382       Uses the minimum variance updating method of Escobedo et al. to
2383       update the expanded ensemble weights. Weights will not be the
2384       free energies, but will rather emphasize states that need more
2385       sampling to give even uncertainty.
2386
2387 .. mdp:: lmc-mc-move
2388
2389    .. mdp-value:: no
2390
2391       No Monte Carlo in state space is performed.
2392
2393    .. mdp-value:: metropolis-transition
2394
2395       Randomly chooses a new state up or down, then uses the
2396       Metropolis critera to decide whether to accept or reject:
2397       Min{1,exp(-(beta_new u_new - beta_old u_old)}
2398
2399    .. mdp-value:: barker-transition
2400
2401       Randomly chooses a new state up or down, then uses the Barker
2402       transition critera to decide whether to accept or reject:
2403       exp(-beta_new u_new)/(exp(-beta_new u_new)+exp(-beta_old u_old))
2404
2405    .. mdp-value:: gibbs
2406
2407        Uses the conditional weights of the state given the coordinate
2408        (exp(-beta_i u_i) / sum_k exp(beta_i u_i) to decide which state
2409        to move to.
2410
2411    .. mdp-value:: metropolized-gibbs
2412
2413        Uses the conditional weights of the state given the coordinate
2414        (exp(-beta_i u_i) / sum_k exp(beta_i u_i) to decide which state
2415        to move to, EXCLUDING the current state, then uses a rejection
2416        step to ensure detailed balance. Always more efficient that
2417        Gibbs, though only marginally so in many situations, such as
2418        when only the nearest neighbors have decent phase space
2419        overlap.
2420
2421 .. mdp:: lmc-seed
2422
2423    (-1)
2424    random seed to use for Monte Carlo moves in state space. When
2425    :mdp:`lmc-seed` is set to -1, a pseudo random seed is us
2426
2427 .. mdp:: mc-temperature
2428
2429    Temperature used for acceptance/rejection for Monte Carlo moves. If
2430    not specified, the temperature of the simulation specified in the
2431    first group of :mdp:`ref-t` is used.
2432
2433 .. mdp:: wl-ratio
2434
2435    (0.8)
2436    The cutoff for the histogram of state occupancies to be reset, and
2437    the free energy incrementor to be changed from delta to delta *
2438    :mdp:`wl-scale`. If we define the Nratio = (number of samples at
2439    each histogram) / (average number of samples at each
2440    histogram). :mdp:`wl-ratio` of 0.8 means that means that the
2441    histogram is only considered flat if all Nratio > 0.8 AND
2442    simultaneously all 1/Nratio > 0.8.
2443
2444 .. mdp:: wl-scale
2445
2446    (0.8)
2447    Each time the histogram is considered flat, then the current value
2448    of the Wang-Landau incrementor for the free energies is multiplied
2449    by :mdp:`wl-scale`. Value must be between 0 and 1.
2450
2451 .. mdp:: init-wl-delta
2452
2453    (1.0)
2454    The initial value of the Wang-Landau incrementor in kT. Some value
2455    near 1 kT is usually most efficient, though sometimes a value of
2456    2-3 in units of kT works better if the free energy differences are
2457    large.
2458
2459 .. mdp:: wl-oneovert
2460
2461    (no)
2462    Set Wang-Landau incrementor to scale with 1/(simulation time) in
2463    the large sample limit. There is significant evidence that the
2464    standard Wang-Landau algorithms in state space presented here
2465    result in free energies getting 'burned in' to incorrect values
2466    that depend on the initial state. when :mdp:`wl-oneovert` is true,
2467    then when the incrementor becomes less than 1/N, where N is the
2468    mumber of samples collected (and thus proportional to the data
2469    collection time, hence '1 over t'), then the Wang-Lambda
2470    incrementor is set to 1/N, decreasing every step. Once this occurs,
2471    :mdp:`wl-ratio` is ignored, but the weights will still stop
2472    updating when the equilibration criteria set in
2473    :mdp:`lmc-weights-equil` is achieved.
2474
2475 .. mdp:: lmc-repeats
2476
2477    (1)
2478    Controls the number of times that each Monte Carlo swap type is
2479    performed each iteration. In the limit of large numbers of Monte
2480    Carlo repeats, then all methods converge to Gibbs sampling. The
2481    value will generally not need to be different from 1.
2482
2483 .. mdp:: lmc-gibbsdelta
2484
2485    (-1)
2486    Limit Gibbs sampling to selected numbers of neighboring states. For
2487    Gibbs sampling, it is sometimes inefficient to perform Gibbs
2488    sampling over all of the states that are defined. A positive value
2489    of :mdp:`lmc-gibbsdelta` means that only states plus or minus
2490    :mdp:`lmc-gibbsdelta` are considered in exchanges up and down. A
2491    value of -1 means that all states are considered. For less than 100
2492    states, it is probably not that expensive to include all states.
2493
2494 .. mdp:: lmc-forced-nstart
2495
2496    (0)
2497    Force initial state space sampling to generate weights. In order to
2498    come up with reasonable initial weights, this setting allows the
2499    simulation to drive from the initial to the final lambda state,
2500    with :mdp:`lmc-forced-nstart` steps at each state before moving on
2501    to the next lambda state. If :mdp:`lmc-forced-nstart` is
2502    sufficiently long (thousands of steps, perhaps), then the weights
2503    will be close to correct. However, in most cases, it is probably
2504    better to simply run the standard weight equilibration algorithms.
2505
2506 .. mdp:: nst-transition-matrix
2507
2508    (-1)
2509    Frequency of outputting the expanded ensemble transition matrix. A
2510    negative number means it will only be printed at the end of the
2511    simulation.
2512
2513 .. mdp:: symmetrized-transition-matrix
2514
2515    (no)
2516    Whether to symmetrize the empirical transition matrix. In the
2517    infinite limit the matrix will be symmetric, but will diverge with
2518    statistical noise for short timescales. Forced symmetrization, by
2519    using the matrix T_sym = 1/2 (T + transpose(T)), removes problems
2520    like the existence of (small magnitude) negative eigenvalues.
2521
2522 .. mdp:: mininum-var-min
2523
2524    (100)
2525    The min-variance strategy (option of :mdp:`lmc-stats` is only
2526    valid for larger number of samples, and can get stuck if too few
2527    samples are used at each state. :mdp:`mininum-var-min` is the
2528    minimum number of samples that each state that are allowed before
2529    the min-variance strategy is activated if selected.
2530
2531 .. mdp:: init-lambda-weights
2532
2533    The initial weights (free energies) used for the expanded ensemble
2534    states. Default is a vector of zero weights. format is similar to
2535    the lambda vector settings in :mdp:`fep-lambdas`, except the
2536    weights can be any floating point number. Units are kT. Its length
2537    must match the lambda vector lengths.
2538
2539 .. mdp:: lmc-weights-equil
2540
2541    .. mdp-value:: no
2542
2543       Expanded ensemble weights continue to be updated throughout the
2544       simulation.
2545
2546    .. mdp-value:: yes
2547
2548       The input expanded ensemble weights are treated as equilibrated,
2549       and are not updated throughout the simulation.
2550
2551    .. mdp-value:: wl-delta
2552
2553       Expanded ensemble weight updating is stopped when the
2554       Wang-Landau incrementor falls below this value.
2555
2556    .. mdp-value:: number-all-lambda
2557
2558       Expanded ensemble weight updating is stopped when the number of
2559       samples at all of the lambda states is greater than this value.
2560
2561    .. mdp-value:: number-steps
2562
2563       Expanded ensemble weight updating is stopped when the number of
2564       steps is greater than the level specified by this value.
2565
2566    .. mdp-value:: number-samples
2567
2568       Expanded ensemble weight updating is stopped when the number of
2569       total samples across all lambda states is greater than the level
2570       specified by this value.
2571
2572    .. mdp-value:: count-ratio
2573
2574       Expanded ensemble weight updating is stopped when the ratio of
2575       samples at the least sampled lambda state and most sampled
2576       lambda state greater than this value.
2577
2578 .. mdp:: simulated-tempering
2579
2580    (no)
2581    Turn simulated tempering on or off. Simulated tempering is
2582    implemented as expanded ensemble sampling with different
2583    temperatures instead of different Hamiltonians.
2584
2585 .. mdp:: sim-temp-low
2586
2587    (300) \[K\]
2588    Low temperature for simulated tempering.
2589
2590 .. mdp:: sim-temp-high
2591
2592    (300) \[K\]
2593    High temperature for simulated tempering.
2594
2595 .. mdp:: simulated-tempering-scaling
2596
2597    Controls the way that the temperatures at intermediate lambdas are
2598    calculated from the :mdp:`temperature-lambdas` part of the lambda
2599    vector.
2600
2601    .. mdp-value:: linear
2602
2603       Linearly interpolates the temperatures using the values of
2604       :mdp:`temperature-lambdas`, *i.e.* if :mdp:`sim-temp-low`
2605       =300, :mdp:`sim-temp-high` =400, then lambda=0.5 correspond to
2606       a temperature of 350. A nonlinear set of temperatures can always
2607       be implemented with uneven spacing in lambda.
2608
2609    .. mdp-value:: geometric
2610
2611       Interpolates temperatures geometrically between
2612       :mdp:`sim-temp-low` and :mdp:`sim-temp-high`. The i:th state
2613       has temperature :mdp:`sim-temp-low` * (:mdp:`sim-temp-high` /
2614       :mdp:`sim-temp-low`) raised to the power of
2615       (i/(ntemps-1)). This should give roughly equal exchange for
2616       constant heat capacity, though of course things simulations that
2617       involve protein folding have very high heat capacity peaks.
2618
2619    .. mdp-value:: exponential
2620
2621       Interpolates temperatures exponentially between
2622       :mdp:`sim-temp-low` and :mdp:`sim-temp-high`. The i:th state
2623       has temperature :mdp:`sim-temp-low` + (:mdp:`sim-temp-high` -
2624       :mdp:`sim-temp-low`)*((exp(:mdp:`temperature-lambdas`
2625       (i))-1)/(exp(1.0)-i)).
2626
2627
2628 Non-equilibrium MD
2629 ^^^^^^^^^^^^^^^^^^
2630
2631 .. mdp:: acc-grps
2632
2633    groups for constant acceleration (*e.g.* ``Protein Sol``) all atoms
2634    in groups Protein and Sol will experience constant acceleration as
2635    specified in the :mdp:`accelerate` line
2636
2637 .. mdp:: accelerate
2638
2639    (0) \[nm ps^-2\]
2640    acceleration for :mdp:`acc-grps`; x, y and z for each group
2641    (*e.g.* ``0.1 0.0 0.0 -0.1 0.0 0.0`` means that first group has
2642    constant acceleration of 0.1 nm ps-2 in X direction, second group
2643    the opposite).
2644
2645 .. mdp:: freezegrps
2646
2647    Groups that are to be frozen (*i.e.* their X, Y, and/or Z position
2648    will not be updated; *e.g.* ``Lipid SOL``). :mdp:`freezedim`
2649    specifies for which dimension the freezing applies. To avoid
2650    spurious contibrutions to the virial and pressure due to large
2651    forces between completely frozen atoms you need to use energy group
2652    exclusions, this also saves computing time. Note that coordinates
2653    of frozen atoms are not scaled by pressure-coupling algorithms.
2654
2655 .. mdp:: freezedim
2656
2657    dimensions for which groups in :mdp:`freezegrps` should be frozen,
2658    specify `Y` or `N` for X, Y and Z and for each group (*e.g.* ``Y Y
2659    N N N N`` means that particles in the first group can move only in
2660    Z direction. The particles in the second group can move in any
2661    direction).
2662
2663 .. mdp:: cos-acceleration
2664
2665    (0) \[nm ps^-2\]
2666    the amplitude of the acceleration profile for calculating the
2667    viscosity. The acceleration is in the X-direction and the magnitude
2668    is :mdp:`cos-acceleration` cos(2 pi z/boxheight). Two terms are
2669    added to the energy file: the amplitude of the velocity profile and
2670    1/viscosity.
2671
2672 .. mdp:: deform
2673
2674    (0 0 0 0 0 0) \[nm ps-1\]
2675    The velocities of deformation for the box elements: a(x) b(y) c(z)
2676    b(x) c(x) c(y). Each step the box elements for which :mdp:`deform`
2677    is non-zero are calculated as: box(ts)+(t-ts)*deform, off-diagonal
2678    elements are corrected for periodicity. The coordinates are
2679    transformed accordingly. Frozen degrees of freedom are (purposely)
2680    also transformed. The time ts is set to t at the first step and at
2681    steps at which x and v are written to trajectory to ensure exact
2682    restarts. Deformation can be used together with semiisotropic or
2683    anisotropic pressure coupling when the appropriate
2684    compressibilities are set to zero. The diagonal elements can be
2685    used to strain a solid. The off-diagonal elements can be used to
2686    shear a solid or a liquid.
2687
2688
2689 Electric fields
2690 ^^^^^^^^^^^^^^^
2691
2692 .. mdp:: E-x ; E-y ; E-z
2693
2694    If you want to use an electric field in a direction, enter 3
2695    numbers after the appropriate E-direction, the first number: the
2696    number of cosines, only 1 is implemented (with frequency 0) so
2697    enter 1, the second number: the strength of the electric field in V
2698    nm^-1, the third number: the phase of the cosine, you can enter any
2699    number here since a cosine of frequency zero has no phase.
2700
2701 .. mdp:: E-xt; E-yt; E-zt
2702
2703    Here you can specify a pulsed alternating electric field. The field
2704    has the form of a gaussian laser pulse:
2705
2706    E(t) = E0 exp ( -(t-t0)^2/(2 sigma^2) ) cos(omega (t-t0))
2707
2708    For example, the four parameters for direction x are set in the
2709    three fields of :mdp:`E-x` and :mdp:`E-xt` like
2710
2711    E-x  = 1 E0 0
2712
2713    E-xt = omega t0 sigma
2714
2715    In the special case that sigma = 0, the exponential term is omitted
2716    and only the cosine term is used.
2717
2718    More details in Carl Caleman and David van der Spoel: Picosecond
2719    Melting of Ice by an Infrared Laser Pulse - A Simulation Study
2720    Angew. Chem. Intl. Ed. 47 pp. 14 17-1420 (2008)
2721
2722
2723
2724 Mixed quantum/classical molecular dynamics
2725 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2726
2727 .. MDP:: QMMM
2728
2729    .. mdp-value:: no
2730
2731       No QM/MM.
2732
2733    .. mdp-value:: yes
2734
2735       Do a QM/MM simulation. Several groups can be described at
2736       different QM levels separately. These are specified in the
2737       :mdp:`QMMM-grps` field separated by spaces. The level of *ab
2738       initio* theory at which the groups are described is specified by
2739       :mdp:`QMmethod` and :mdp:`QMbasis` Fields. Describing the
2740       groups at different levels of theory is only possible with the
2741       ONIOM QM/MM scheme, specified by :mdp:`QMMMscheme`.
2742
2743 .. mdp:: QMMM-grps
2744
2745    groups to be descibed at the QM level
2746
2747 .. mdp:: QMMMscheme
2748
2749    .. mdp-value:: normal
2750
2751       normal QM/MM. There can only be one :mdp:`QMMM-grps` that is
2752       modelled at the :mdp:`QMmethod` and :mdp:`QMbasis` level of
2753       *ab initio* theory. The rest of the system is described at the
2754       MM level. The QM and MM subsystems interact as follows: MM point
2755       charges are included in the QM one-electron hamiltonian and all
2756       Lennard-Jones interactions are described at the MM level.
2757
2758    .. mdp-value:: ONIOM
2759
2760       The interaction between the subsystem is described using the
2761       ONIOM method by Morokuma and co-workers. There can be more than
2762       one :mdp:`QMMM-grps` each modeled at a different level of QM
2763       theory (:mdp:`QMmethod` and :mdp:`QMbasis`).
2764
2765 .. mdp:: QMmethod
2766
2767    (RHF)
2768    Method used to compute the energy and gradients on the QM
2769    atoms. Available methods are AM1, PM3, RHF, UHF, DFT, B3LYP, MP2,
2770    CASSCF, and MMVB. For CASSCF, the number of electrons and orbitals
2771    included in the active space is specified by :mdp:`CASelectrons`
2772    and :mdp:`CASorbitals`.
2773
2774 .. mdp:: QMbasis
2775
2776    (STO-3G)
2777    Basis set used to expand the electronic wavefuntion. Only Gaussian
2778    basis sets are currently available, *i.e.* ``STO-3G, 3-21G, 3-21G*,
2779    3-21+G*, 6-21G, 6-31G, 6-31G*, 6-31+G*,`` and ``6-311G``.
2780
2781 .. mdp:: QMcharge
2782
2783    (0) \[integer\]
2784    The total charge in `e` of the :mdp:`QMMM-grps`. In case there are
2785    more than one :mdp:`QMMM-grps`, the total charge of each ONIOM
2786    layer needs to be specified separately.
2787
2788 .. mdp:: QMmult
2789
2790    (1) \[integer\]
2791    The multiplicity of the :mdp:`QMMM-grps`. In case there are more
2792    than one :mdp:`QMMM-grps`, the multiplicity of each ONIOM layer
2793    needs to be specified separately.
2794
2795 .. mdp:: CASorbitals
2796
2797    (0) \[integer\]
2798    The number of orbitals to be included in the active space when
2799    doing a CASSCF computation.
2800
2801 .. mdp:: CASelectrons
2802
2803    (0) \[integer\]
2804    The number of electrons to be included in the active space when
2805    doing a CASSCF computation.
2806
2807 .. MDP:: SH
2808
2809    .. mdp-value:: no
2810
2811       No surface hopping. The system is always in the electronic
2812       ground-state.
2813
2814    .. mdp-value:: yes
2815
2816       Do a QM/MM MD simulation on the excited state-potential energy
2817       surface and enforce a *diabatic* hop to the ground-state when
2818       the system hits the conical intersection hyperline in the course
2819       the simulation. This option only works in combination with the
2820       CASSCF method.
2821
2822
2823 Implicit solvent
2824 ^^^^^^^^^^^^^^^^
2825
2826 .. mdp:: implicit-solvent
2827
2828    .. mdp-value:: no
2829
2830       No implicit solvent
2831
2832    .. mdp-value:: GBSA
2833
2834       Do a simulation with implicit solvent using the Generalized Born
2835       formalism. Three different methods for calculating the Born
2836       radii are available, Still, HCT and OBC. These are specified
2837       with the :mdp:`gb-algorithm` field. The non-polar solvation is
2838       specified with the :mdp:`sa-algorithm` field.
2839
2840 .. mdp:: gb-algorithm
2841
2842    .. mdp-value:: Still
2843
2844       Use the Still method to calculate the Born radii
2845
2846    .. mdp-value:: HCT
2847
2848       Use the Hawkins-Cramer-Truhlar method to calculate the Born
2849       radii
2850
2851    .. mdp-value:: OBC
2852
2853       Use the Onufriev-Bashford-Case method to calculate the Born
2854       radii
2855
2856 .. mdp:: nstgbradii
2857
2858    (1) \[steps\]
2859    Frequency to (re)-calculate the Born radii. For most practial
2860    purposes, setting a value larger than 1 violates energy
2861    conservation and leads to unstable trajectories.
2862
2863 .. mdp:: rgbradii
2864
2865    (1.0) \[nm\]
2866    Cut-off for the calculation of the Born radii. Currently must be
2867    equal to rlist
2868
2869 .. mdp:: gb-epsilon-solvent
2870
2871    (80)
2872    Dielectric constant for the implicit solvent
2873
2874 .. mdp:: gb-saltconc
2875
2876    (0) \[M\]
2877    Salt concentration for implicit solvent models, currently not used
2878
2879 .. mdp:: gb-obc-alpha
2880 .. mdp:: gb-obc-beta
2881 .. mdp:: gb-obc-gamma
2882
2883    Scale factors for the OBC model. Default values of 1, 0.78 and 4.85
2884    respectively are for OBC(II). Values for OBC(I) are 0.8, 0 and 2.91
2885    respectively
2886
2887 .. mdp:: gb-dielectric-offset
2888
2889    (0.009) \[nm\]
2890    Distance for the di-electric offset when calculating the Born
2891    radii. This is the offset between the center of each atom the
2892    center of the polarization energy for the corresponding atom
2893
2894 .. mdp:: sa-algorithm
2895
2896    .. mdp-value:: Ace-approximation
2897
2898       Use an Ace-type approximation
2899
2900    .. mdp-value:: None
2901
2902       No non-polar solvation calculation done. For GBSA only the polar
2903       part gets calculated
2904
2905 .. mdp:: sa-surface-tension
2906
2907    \[kJ mol-1 nm-2\]
2908    Default value for surface tension with SA algorithms. The default
2909    value is -1; Note that if this default value is not changed it will
2910    be overridden by :ref:`gmx grompp` using values that are specific
2911    for the choice of radii algorithm (0.0049 kcal/mol/Angstrom^2 for
2912    Still, 0.0054 kcal/mol/Angstrom2 for HCT/OBC) Setting it to 0 will
2913    while using an sa-algorithm other than None means no non-polar
2914    calculations are done.
2915
2916
2917 Computational Electrophysiology
2918 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2919 Use these options to switch on and control ion/water position exchanges in "Computational
2920 Electrophysiology" simulation setups. (See the `reference manual`_ for details).
2921
2922 .. mdp:: swapcoords
2923
2924    .. mdp-value:: no
2925
2926       Do not enable ion/water position exchanges.
2927
2928    .. mdp-value:: X ; Y ; Z
2929
2930       Allow for ion/water position exchanges along the chosen direction.
2931       In a typical setup with the membranes parallel to the x-y plane,
2932       ion/water pairs need to be exchanged in Z direction to sustain the
2933       requested ion concentrations in the compartments.
2934
2935 .. mdp:: swap-frequency
2936
2937    (1) The swap attempt frequency, i.e. every how many time steps the ion counts
2938    per compartment are determined and exchanges made if necessary.
2939    Normally it is not necessary to check at every time step.
2940    For typical Computational Electrophysiology setups, a value of about 100 is
2941    sufficient and yields a negligible performance impact.
2942
2943 .. mdp:: split-group0
2944
2945    Name of the index group of the membrane-embedded part of channel #0.
2946    The center of mass of these atoms defines one of the compartment boundaries
2947    and should be chosen such that it is near the center of the membrane.
2948
2949 .. mdp:: split-group1
2950
2951    Channel #1 defines the position of the other compartment boundary.
2952
2953 .. mdp:: massw-split0
2954
2955    (no) Defines whether or not mass-weighting is used to calculate the split group center.
2956
2957    .. mdp-value:: no
2958
2959       Use the geometrical center.
2960
2961    .. mdp-value:: yes
2962
2963       Use the center of mass.
2964
2965 .. mdp:: massw-split1
2966
2967    (no) As above, but for split-group #1.
2968
2969 .. mdp:: solvent-group
2970
2971    Name of the index group of solvent molecules.
2972
2973 .. mdp:: coupl-steps
2974
2975    (\10) Average the number of ions per compartment over these many swap attempt steps.
2976    This can be used to prevent that ions near a compartment boundary
2977    (diffusing through a channel, e.g.) lead to unwanted back and forth swaps.
2978
2979 .. mdp:: iontypes
2980
2981    (1) The number of different ion types to be controlled. These are during the
2982    simulation exchanged with solvent molecules to reach the desired reference numbers.
2983
2984 .. mdp:: iontype0-name
2985
2986    Name of the first ion type.
2987
2988 .. mdp:: iontype0-in-A
2989
2990    (-1) Requested (=reference) number of ions of type 0 in compartment A.
2991    The default value of -1 means: use the number of ions as found in time step 0
2992    as reference value.
2993
2994 .. mdp:: iontype0-in-B
2995
2996    (-1) Reference number of ions of type 0 for compartment B.
2997
2998 .. mdp:: bulk-offsetA
2999
3000    (0.0) Offset of the first swap layer from the compartment A midplane.
3001    By default (i.e. bulk offset = 0.0), ion/water exchanges happen between layers
3002    at maximum distance (= bulk concentration) to the split group layers. However,
3003    an offset b (-1.0 < b < +1.0) can be specified to offset the bulk layer from the middle at 0.0
3004    towards one of the compartment-partitioning layers (at +/- 1.0).
3005
3006 .. mdp:: bulk-offsetB
3007
3008    (0.0) Offset of the other swap layer from the compartment B midplane.
3009
3010
3011 .. mdp:: threshold
3012
3013    (\1) Only swap ions if threshold difference to requested count is reached.
3014
3015 .. mdp:: cyl0-r
3016
3017    (2.0) \[nm\] Radius of the split cylinder #0.
3018    Two split cylinders (mimicking the channel pores) can optionally be defined
3019    relative to the center of the split group. With the help of these cylinders
3020    it can be counted which ions have passed which channel. The split cylinder
3021    definition has no impact on whether or not ion/water swaps are done.
3022
3023 .. mdp:: cyl0-up
3024
3025    (1.0) \[nm\] Upper extension of the split cylinder #0.
3026
3027 .. mdp:: cyl0-down
3028
3029    (1.0) \[nm\] Lower extension of the split cylinder #0.
3030
3031 .. mdp:: cyl1-r
3032
3033    (2.0) \[nm\] Radius of the split cylinder #1.
3034
3035 .. mdp:: cyl1-up
3036
3037    (1.0) \[nm\] Upper extension of the split cylinder #1.
3038
3039 .. mdp:: cyl1-down
3040
3041    (1.0) \[nm\] Lower extension of the split cylinder #1.
3042
3043
3044 User defined thingies
3045 ^^^^^^^^^^^^^^^^^^^^^
3046
3047 .. mdp:: user1-grps
3048 .. mdp:: user2-grps
3049 .. mdp:: userint1 (0)
3050 .. mdp:: userint2 (0)
3051 .. mdp:: userint3 (0)
3052 .. mdp:: userint4 (0)
3053 .. mdp:: userreal1 (0)
3054 .. mdp:: userreal2 (0)
3055 .. mdp:: userreal3 (0)
3056 .. mdp:: userreal4 (0)
3057
3058    These you can use if you modify code. You can pass integers and
3059    reals and groups to your subroutine. Check the inputrec definition
3060    in ``src/gromacs/mdtypes/inputrec.h``
3061
3062 Removed features
3063 ^^^^^^^^^^^^^^^^
3064
3065 This feature has been removed from |Gromacs|, but so that old
3066 :ref:`mdp` and :ref:`tpr` files cannot be mistakenly misused, we still
3067 parse this option. :ref:`gmx grompp` and :ref:`gmx mdrun` will issue a
3068 fatal error if this is set.
3069
3070 .. mdp:: adress
3071
3072    (no)
3073
3074 .. _reference manual: gmx-manual-parent-dir_