Add AWH biasing module + tests
[gromacs.git] / docs / user-guide / mdp-options.rst
blobf708d8eba904cf78833ba5ec754c2df3b21886f2
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.
8 Molecular dynamics parameters (.mdp options)
9 ============================================
11 General information
12 -------------------
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.
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.
24 Preprocessing
25 ^^^^^^^^^^^^^
27 .. mdp:: include
29    directories to include in your topology. Format:
30    ``-I/home/john/mylib -I../otherlib``
32 .. mdp:: define
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
39       ``-DFLEXIBLE`` will use flexible water instead of rigid water
40       into your topology, this can be useful for normal mode analysis.
42       ``-DPOSRES`` will trigger the inclusion of ``posre.itp`` into
43       your topology, used for implementing position restraints.
46 Run control
47 ^^^^^^^^^^^
49 .. mdp:: integrator
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)
55    .. mdp-value:: md
57       A leap-frog algorithm for integrating Newton's equations of motion.
59    .. mdp-value:: md-vv
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.
76    .. mdp-value:: md-vv-avek
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.
86    .. mdp-value:: sd
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`.
104    .. mdp-value:: bd
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`.
114    .. mdp-value:: steep
116       A steepest descent algorithm for energy minimization. The
117       maximum step size is :mdp:`emstep`, the tolerance is
118       :mdp:`emtol`.
120    .. mdp-value:: cg
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.
129    .. mdp-value:: l-bfgs
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.
137    .. mdp-value:: nm
139       Normal mode analysis is performed on the structure in the :ref:`tpr`
140       file.  |Gromacs| should be compiled in double precision.
142    .. mdp-value:: tpi
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.
167    .. mdp-value:: tpic
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`.
181 .. mdp:: tinit
183         (0) \[ps\]
184         starting time for your run (only makes sense for time-based
185         integrators)
187 .. mdp:: dt
189         (0.001) \[ps\]
190         time step for integration (only makes sense for time-based
191         integrators)
193 .. mdp:: nsteps
195         (0)
196         maximum number of steps to integrate or minimize, -1 is no
197         maximum
199 .. mdp:: init-step
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.
212 .. mdp:: simulation-part
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.
221 .. mdp:: comm-mode
223    .. mdp-value:: Linear
225       Remove center of mass translational velocity
227    .. mdp-value:: Angular
229       Remove center of mass translational and rotational velocity around
230       the center of mass
232    .. mdp-value:: Linear-acceleration-correction
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.
241    .. mdp-value:: None
243       No restriction on the center of mass motion
245 .. mdp:: nstcomm
247    (100) \[steps\]
248    frequency for center of mass motion removal
250 .. mdp:: comm-grps
252    group(s) for center of mass motion removal, default is the whole
253    system
256 Langevin dynamics
257 ^^^^^^^^^^^^^^^^^
259 .. mdp:: bd-fric
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`.
266 .. mdp:: ld-seed
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.
276 Energy minimization
277 ^^^^^^^^^^^^^^^^^^^
279 .. mdp:: emtol
281    (10.0) \[kJ mol-1 nm-1\]
282    the minimization is converged when the maximum force is smaller
283    than this value
285 .. mdp:: emstep
287    (0.01) \[nm\]
288    initial step-size
290 .. mdp:: nstcgsteep
292    (1000) \[steps\]
293    frequency of performing 1 steepest descent step while doing
294    conjugate gradient energy minimization.
296 .. mdp:: nbfgscorr
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.
303 Shell Molecular Dynamics
304 ^^^^^^^^^^^^^^^^^^^^^^^^
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.
314 .. mdp:: niter
316    (20)
317    maximum number of iterations for optimizing the shell positions and
318    the flexible constraints.
320 .. mdp:: fcstep
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!
332 Test particle insertion
333 ^^^^^^^^^^^^^^^^^^^^^^^
335 .. mdp:: rtpi
337    (0.05) \[nm\]
338    the test particle insertion radius, see integrators
339    :mdp-value:`integrator=tpi` and :mdp-value:`integrator=tpic`
342 Output control
343 ^^^^^^^^^^^^^^
345 .. mdp:: nstxout
347    (0) \[steps\]
348    number of steps that elapse between writing coordinates to output
349    trajectory file, the last coordinates are always written
351 .. mdp:: nstvout
353    (0) \[steps\]
354    number of steps that elapse between writing velocities to output
355    trajectory, the last velocities are always written
357 .. mdp:: nstfout
359    (0) \[steps\]
360    number of steps that elapse between writing forces to output
361    trajectory.
363 .. mdp:: nstlog
365    (1000) \[steps\]
366    number of steps that elapse between writing energies to the log
367    file, the last energies are always written
369 .. mdp:: nstcalcenergy
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.
378 .. mdp:: nstenergy
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
388 .. mdp:: nstxout-compressed
390    (0) \[steps\]
391    number of steps that elapse between writing position coordinates
392    using lossy compression
394 .. mdp:: compressed-x-precision
396    (1000) \[real\]
397    precision with which to write to the compressed trajectory file
399 .. mdp:: compressed-x-grps
401    group(s) to write to the compressed trajectory file, by default the
402    whole system is written (if :mdp:`nstxout-compressed` > 0)
404 .. mdp:: energygrps
406    group(s) for which to write to write short-ranged non-bonded
407    potential energies to the energy file (not supported on GPUs)
410 Neighbor searching
411 ^^^^^^^^^^^^^^^^^^
413 .. mdp:: cutoff-scheme
415    .. mdp-value:: Verlet
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-value:`cutoff-scheme=Verlet` scheme, but :ref:`gmx grompp`
426       checks for this. Native GPU acceleration is only supported with
427       :mdp-value:`cutoff-scheme=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-value:`cutoff-scheme=Verlet` is
431       faster than :mdp-value:`cutoff-scheme=group` when there is no water, or if
432       :mdp-value:`cutoff-scheme=group` would use a pair-list buffer to conserve energy.
434    .. mdp-value:: group
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.
444 .. mdp:: nstlist
446    \(10) \[steps\]
448    .. mdp-value:: >0
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-value:`cutoff-scheme=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-value:`cutoff-scheme=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.
462    .. mdp-value:: 0
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.
468    .. mdp-value:: <0
470       Unused.
472 .. mdp:: ns-type
474    .. mdp-value:: grid
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.
481    .. mdp-value:: simple
483       Check every atom in the box when constructing a new neighbor
484       list every :mdp:`nstlist` steps (only with :mdp-value:`cutoff-scheme=group`
485       cut-off scheme).
487 .. mdp:: pbc
489    .. mdp-value:: xyz
491       Use periodic boundary conditions in all directions.
493    .. mdp-value:: no
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.
500    .. mdp-value:: xy
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.
509 .. mdp:: periodic-molecules
511    .. mdp-value:: no
513       molecules are finite, fast molecular PBC can be used
515    .. mdp-value:: yes
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
521 .. mdp:: verlet-buffer-tolerance
523    (0.005) \[kJ/mol/ps\]
525    Useful only with the :mdp-value:`cutoff-scheme=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.
552 .. mdp:: rlist
554    (1) \[nm\]
555    Cut-off distance for the short-range neighbor list. With the
556    :mdp-value:`cutoff-scheme=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.
561 Electrostatics
562 ^^^^^^^^^^^^^^
564 .. mdp:: coulombtype
566    .. mdp-value:: Cut-off
568       Plain cut-off with neighborlist radius :mdp:`rlist` and
569       Coulomb cut-off :mdp:`rcoulomb`, where :mdp:`rlist` >=
570       :mdp:`rcoulomb`.
572    .. mdp-value:: Ewald
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`.
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.
585    .. mdp-value:: PME
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.
598    .. mdp-value:: P3M-AD
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.
606    .. mdp-value:: Reaction-Field
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.
614    .. mdp-value:: Generalized-Reaction-Field
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`.
624    .. mdp-value:: Reaction-Field-zero
626       In |Gromacs|, normal reaction-field electrostatics with
627       :mdp:`cutoff-scheme` = :mdp-value:`cutoff-scheme=group` leads to bad energy
628       conservation. :mdp-value:`coulombtype=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-value:`coulombtype=Reaction-Field-zero` computationally more expensive than
637       normal reaction-field.
639    .. mdp-value:: Shift
641       Analogous to :mdp-value:`vdwtype=Shift` for :mdp:`vdwtype`. You
642       might want to use :mdp-value:`coulombtype=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.
646    .. mdp-value:: Encad-Shift
648       The Coulomb potential is decreased over the whole range, using
649       the definition from the Encad simulation package.
651    .. mdp-value:: Switch
653       Analogous to :mdp-value:`vdwtype=Switch` for
654       :mdp:`vdwtype`. Switching the Coulomb potential can lead to
655       serious artifacts, advice: use :mdp-value:`coulombtype=Reaction-Field-zero`
656       instead.
658    .. mdp-value:: User
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.
681    .. mdp-value:: PME-Switch
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-value:`cutoff-scheme=Verlet`
687       will be more efficient).
689    .. mdp-value:: PME-User
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.
697    .. mdp-value:: PME-User-Switch
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.
704 .. mdp:: coulomb-modifier
706    .. mdp-value:: Potential-shift-Verlet
708       Selects Potential-shift with the Verlet cutoff-scheme, as it is
709       (nearly) free; selects None with the group cutoff-scheme.
711    .. mdp-value:: Potential-shift
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.
718    .. mdp-value:: None
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.
724 .. mdp:: rcoulomb-switch
726    (0) \[nm\]
727    where to start switching the Coulomb potential, only relevant
728    when force or potential switching is used
730 .. mdp:: rcoulomb
732    (1) \[nm\]
733    distance for the Coulomb cut-off
735 .. mdp:: epsilon-r
737    (1)
738    The relative dielectric constant. A value of 0 means infinity.
740 .. mdp:: epsilon-rf
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.
748 Van der Waals
749 ^^^^^^^^^^^^^
751 .. mdp:: vdwtype
753    .. mdp-value:: Cut-off
755       Twin range cut-offs with neighbor list cut-off :mdp:`rlist` and
756       VdW cut-off :mdp:`rvdw`, where :mdp:`rvdw` >= :mdp:`rlist`.
758    .. mdp-value:: PME
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`.
768    .. mdp-value:: Shift
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.
779    .. mdp-value:: Switch
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.
793    .. mdp-value:: Encad-Shift
795       The LJ (not Buckingham) potential is decreased over the whole
796       range, using the definition from the Encad simulation package.
798    .. mdp-value:: User
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.
806 .. mdp:: vdw-modifier
808    .. mdp-value:: Potential-shift-Verlet
810       Selects Potential-shift with the Verlet cutoff-scheme, as it is
811       (nearly) free; selects None with the group cutoff-scheme.
813    .. mdp-value:: Potential-shift
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.
820    .. mdp-value:: None
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.
826    .. mdp-value:: Force-switch
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.
835    .. mdp-value:: Potential-switch
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.
843 .. mdp:: rvdw-switch
845    (0) \[nm\]
847    where to start switching the LJ force and possibly the potential,
848    only relevant when force or potential switching is used
850 .. mdp:: rvdw
852    (1) \[nm\]
853    distance for the LJ or Buckingham cut-off
855 .. mdp:: DispCorr
857    .. mdp-value:: no
859       don't apply any correction
861    .. mdp-value:: EnerPres
863       apply long range dispersion corrections for Energy and Pressure
865    .. mdp-value:: Ener
867       apply long range dispersion corrections for Energy only
870 Tables
871 ^^^^^^
873 .. mdp:: table-extension
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`.
886 .. mdp:: energygrp-table
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.
899 Ewald
900 ^^^^^
902 .. mdp:: fourierspacing
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.
917 .. mdp:: fourier-nx
918 .. mdp:: fourier-ny
919 .. mdp:: fourier-nz
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.
927 .. mdp:: pme-order
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.
934 .. mdp:: ewald-rtol
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.
942 .. mdp:: ewald-rtol-lj
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.
950 .. mdp:: lj-pme-comb-rule
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.
958    .. mdp-value:: Geometric
960       Apply geometric combination rules
962    .. mdp-value:: Lorentz-Berthelot
964       Apply Lorentz-Berthelot combination rules
966 .. mdp:: ewald-geometry
968    .. mdp-value:: 3d
970       The Ewald sum is performed in all three dimensions.
972    .. mdp-value:: 3dc
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.
981 .. mdp:: epsilon-surface
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.
993 Temperature coupling
994 ^^^^^^^^^^^^^^^^^^^^
996 .. mdp:: tcoupl
998    .. mdp-value:: no
1000       No temperature coupling.
1002    .. mdp-value:: berendsen
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.
1009    .. mdp-value:: nose-hoover
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.
1018    .. mdp-value:: andersen
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.
1028    .. mdp-value:: andersen-massive
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.
1037    .. mdp-value:: v-rescale
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.
1048 .. mdp:: nsttcouple
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.
1056 .. mdp:: nh-chain-length
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
1065 .. mdp:: tc-grps
1067    groups to couple to separate temperature baths
1069 .. mdp:: tau-t
1071    \[ps\]
1072    time constant for coupling (one for each group in
1073    :mdp:`tc-grps`), -1 means no temperature coupling
1075 .. mdp:: ref-t
1077    \[K\]
1078    reference temperature for coupling (one for each group in
1079    :mdp:`tc-grps`)
1082 Pressure coupling
1083 ^^^^^^^^^^^^^^^^^
1085 .. mdp:: pcoupl
1087    .. mdp-value:: no
1089       No pressure coupling. This means a fixed box size.
1091    .. mdp-value:: Berendsen
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.
1099    .. mdp-value:: Parrinello-Rahman
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.
1115    .. mdp-value:: MTTK
1117       Martyna-Tuckerman-Tobias-Klein implementation, only useable with
1118       :mdp-value:`integrator=md-vv` or :mdp-value:`integrator=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.
1128 .. mdp:: pcoupltype
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`.
1134    .. mdp-value:: isotropic
1136       Isotropic pressure coupling with time constant
1137       :mdp:`tau-p`. One value each for :mdp:`compressibility` and
1138       :mdp:`ref-p` is required.
1140    .. mdp-value:: semiisotropic
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.
1148    .. mdp-value:: anisotropic
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.
1157    .. mdp-value:: surface-tension
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.
1171 .. mdp:: nstpcouple
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.
1179 .. mdp:: tau-p
1181    (1) \[ps\]
1182    The time constant for pressure coupling (one value for all
1183    directions).
1185 .. mdp:: compressibility
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`.
1192 .. mdp:: ref-p
1194    \[bar\]
1195    The reference pressure for coupling. The number of required values
1196    is implied by :mdp:`pcoupltype`.
1198 .. mdp:: refcoord-scaling
1200    .. mdp-value:: no
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.
1207    .. mdp-value:: all
1209       The reference coordinates are scaled with the scaling matrix of
1210       the pressure coupling.
1212    .. mdp-value:: com
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.
1223 Simulated annealing
1224 ^^^^^^^^^^^^^^^^^^^
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!
1235 .. mdp:: annealing
1237    Type of annealing for each temperature group
1239    .. mdp-value:: no
1241        No simulated annealing - just couple to reference temperature value.
1243    .. mdp-value:: single
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.
1250    .. mdp-value:: periodic
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.
1256 .. mdp:: annealing-npoints
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.
1263 .. mdp:: annealing-time
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`.
1272 .. mdp:: annealing-temp
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`.
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!
1293 Velocity generation
1294 ^^^^^^^^^^^^^^^^^^^
1296 .. mdp:: gen-vel
1298    .. mdp-value:: no
1300         Do not generate velocities. The velocities are set to zero
1301         when there are no velocities in the input structure file.
1303    .. mdp-value:: yes
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`.
1310 .. mdp:: gen-temp
1312    (300) \[K\]
1313    temperature for Maxwell distribution
1315 .. mdp:: gen-seed
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.
1323 Bonds
1324 ^^^^^
1326 .. mdp:: constraints
1328    .. mdp-value:: none
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.
1335    .. mdp-value:: h-bonds
1337       Convert the bonds with H-atoms to constraints.
1339    .. mdp-value:: all-bonds
1341       Convert all bonds to constraints.
1343    .. mdp-value:: h-angles
1345       Convert all bonds and additionally the angles that involve
1346       H-atoms to bond-constraints.
1348    .. mdp-value:: all-angles
1350       Convert all bonds and angles to bond-constraints.
1352 .. mdp:: constraint-algorithm
1354    .. mdp-value:: LINCS
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.
1369    .. mdp-value:: SHAKE
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.
1379 .. mdp:: continuation
1381    This option was formerly known as unconstrained-start.
1383    .. mdp-value:: no
1385       apply constraints to the start configuration and reset shells
1387    .. mdp-value:: yes
1389       do not apply constraints to the start configuration and do not
1390       reset shells, useful for exact coninuation and reruns
1392 .. mdp:: shake-tol
1394    (0.0001)
1395    relative tolerance for SHAKE
1397 .. mdp:: lincs-order
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.
1413 .. mdp:: lincs-iter
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.
1421 .. mdp:: lincs-warnangle
1423    (30) \[deg\]
1424    maximum angle that a bond can rotate before LINCS will complain
1426 .. mdp:: morse
1428    .. mdp-value:: no
1430       bonds are represented by a harmonic potential
1432    .. mdp-value:: yes
1434       bonds are represented by a Morse potential
1437 Energy group exclusions
1438 ^^^^^^^^^^^^^^^^^^^^^^^
1440 .. mdp:: energygrp-excl
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.
1451 Walls
1452 ^^^^^
1454 .. mdp:: nwall
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.
1468 .. mdp:: wall-atomtype
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.
1475 .. mdp:: wall-type
1477    .. mdp-value:: 9-3
1479       LJ integrated over the volume behind the wall: 9-3 potential
1481    .. mdp-value:: 10-4
1483       LJ integrated over the wall surface: 10-4 potential
1485    .. mdp-value:: 12-6
1487       direct LJ potential with the ``z`` distance from the wall
1489 .. mdp:: table
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
1497 .. mdp:: wall-r-linpot
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.
1507 .. mdp:: wall-density
1509    \[nm^-3/nm^-2\]
1510    the number density of the atoms for each wall for wall types 9-3
1511    and 10-4
1513 .. mdp:: wall-ewald-zfac
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.
1523 COM pulling
1524 ^^^^^^^^^^^
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.
1532 .. mdp:: pull
1534    .. mdp-value:: no
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)
1540    .. mdp-value:: yes
1542        Center of mass pulling will be applied on 1 or more groups using
1543        1 or more pull coordinates.
1545 .. mdp:: pull-cylinder-r
1547    (1.5) \[nm\]
1548    the radius of the cylinder for
1549    :mdp:`pull-coord1-geometry` = :mdp-value:`pull-coord1-geometry=cylinder`
1551 .. mdp:: pull-constr-tol
1553    (1e-6)
1554    the relative constraint tolerance for constraint pulling
1556 .. mdp:: pull-print-com
1558    .. mdp-value:: no
1560       do not print the COM for any group
1562    .. mdp-value:: yes
1564       print the COM of all groups for all pull coordinates
1566 .. mdp:: pull-print-ref-value
1568    .. mdp-value:: no
1570       do not print the reference value for each pull coordinate
1572    .. mdp-value:: yes
1574       print the reference value for each pull coordinate
1576 .. mdp:: pull-print-components
1578    .. mdp-value:: no
1580       only print the distance for each pull coordinate
1581    
1582    .. mdp-value:: yes
1584       print the distance and Cartesian components selected in
1585       :mdp:`pull-coord1-dim`
1587 .. mdp:: pull-nstxout
1589    (50)
1590    frequency for writing out the COMs of all the pull group (0 is
1591    never)
1593 .. mdp:: pull-nstfout
1595    (50)
1596    frequency for writing out the force of all the pulled group
1597    (0 is never)
1600 .. mdp:: pull-ngroups
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.
1608 .. mdp:: pull-ncoords
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.
1615 .. mdp:: pull-group1-name
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.
1620 .. mdp:: pull-group1-weights
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.
1626 .. mdp:: pull-group1-pbcatom
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).
1642 .. mdp:: pull-coord1-type
1644    .. mdp-value:: umbrella
1646       Center of mass pulling using an umbrella potential between the
1647       reference group and one or more groups.
1649    .. mdp-value:: constraint
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.
1656    .. mdp-value:: constant-force
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.
1663    .. mdp-value:: flat-bottom
1665       At distances above :mdp:`pull-coord1-init` a harmonic potential
1666       is applied, otherwise no potential is applied.
1668    .. mdp-value:: flat-bottom-high
1670       At distances below :mdp:`pull-coord1-init` a harmonic potential
1671       is applied, otherwise no potential is applied.
1673    .. mdp-value:: external-potential
1675       An external potential that needs to be provided by another
1676       module.
1678 .. mdp:: pull-coord1-potential-provider
1680       The name of the external module that provides the potential for
1681       the case where :mdp:`pull-coord1-type` is external-potential.
1683 .. mdp:: pull-coord1-geometry
1685    .. mdp-value:: distance
1687       Pull along the vector connecting the two groups. Components can
1688       be selected with :mdp:`pull-coord1-dim`.
1690    .. mdp-value:: direction
1692       Pull in the direction of :mdp:`pull-coord1-vec`.
1694    .. mdp-value:: direction-periodic
1696       As :mdp-value:`pull-coord1-geometry=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.
1701    .. mdp-value:: direction-relative
1703       As :mdp-value:`pull-coord1-geometry=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.
1713    .. mdp-value:: cylinder
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.
1732    .. mdp-value:: angle
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.
1740    .. mdp-value:: angle-axis
1742       As :mdp-value:`pull-coord1-geometry=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.
1745    .. mdp-value:: dihedral
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.
1755 .. mdp:: pull-coord1-groups
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.
1765 .. mdp:: pull-coord1-dim
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:`pull-coord1-start=yes`. With
1771    :mdp:`pull-coord1-geometry` = :mdp-value:`pull-coord1-geometry=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.
1778 .. mdp:: pull-coord1-origin
1780    (0.0 0.0 0.0)
1781    The pull reference position for use with an absolute reference.
1783 .. mdp:: pull-coord1-vec
1785    (0.0 0.0 0.0)
1786    The pull direction. :ref:`gmx grompp` normalizes the vector.
1788 .. mdp:: pull-coord1-start
1790    .. mdp-value:: no
1792       do not modify :mdp:`pull-coord1-init`
1794    .. mdp-value:: yes
1796       add the COM distance of the starting conformation to
1797       :mdp:`pull-coord1-init`
1799 .. mdp:: pull-coord1-init
1801    (0.0) \[nm\] / \[deg\]
1802    The reference distance at t=0.
1804 .. mdp:: pull-coord1-rate
1806    (0) \[nm/ps\] / \[deg/ps\]
1807    The rate of change of the reference position.
1809 .. mdp:: pull-coord1-k
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).
1819 .. mdp:: pull-coord1-kB
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`.
1826 AWH adaptive biasing
1827 ^^^^^^^^^^^^^^^^^^^^
1829 .. mdp:: awh
1831    .. mdp-value:: no
1833       No biasing.
1835    .. mdp-value:: yes
1837       Adaptively bias a reaction coordinate using the AWH method and estimate
1838       the corresponding PMF. The PMF and other AWH data are written to energy
1839       file at an interval set by :mdp:`awh-nstout` and can be extracted with
1840       the ``gmx awh`` tool. The AWH coordinate can be
1841       multidimensional and is defined by mapping each dimension to a pull coordinate index.
1842       This is only allowed if :mdp-value:`pull-coord1-type=external-potential` and
1843       :mdp:`pull-coord1-potential-provider` = ``awh`` for the concerned pull coordinate
1844       indices.
1846 .. mdp:: awh-potential
1848    .. mdp-value:: convolved
1850       The applied biasing potential is the convolution of the bias function and a
1851       set of harmonic umbrella potentials (see :mdp-value:`awh-potential=umbrella` below). This results
1852       in a smooth potential function and force. The resolution of the potential is set
1853       by the force constant of each umbrella, see :mdp:`awh1-dim1-force-constant`.
1855    .. mdp-value:: umbrella
1857       The potential bias is applied by controlling the position of an harmonic potential
1858       using Monte-Carlo sampling.  The force constant is set with
1859       :mdp:`awh1-dim1-force-constant`. The umbrella location
1860       is sampled using Monte-Carlo every :mdp:`awh-nstsample` steps.
1861       This option can be useful for cases when calculating the convolved force for each step becomes
1862       computationally expensive.
1864 .. mdp:: awh-share-multisim
1866    .. mdp-value:: no
1868       AWH will not share biases across simulations started with
1869       :ref:`gmx mdrun` option ``-multidir``. The biases will be independent.
1871    .. mdp-value:: yes
1873       With :ref:`gmx mdrun` and option ``-multidir`` the bias and PMF estimates
1874       for biases with :mdp:`awh1-share-group` >0 will be shared across simulations
1875       with the biases with the same :mdp:`awh1-share-group` value.
1876       The simulations should have the same AWH settings for sharing to make sense.
1877       :ref:`gmx mdrun` will check whether the simulations are technically
1878       compatible for sharing, but the user should check that bias sharing
1879       physically makes sense.
1881 .. mdp:: awh-seed
1883    (-1) Random seed for Monte-Carlo sampling the umbrella position,
1884    where -1 indicates to generate a seed. Only used with
1885    :mdp-value:`awh-potential=umbrella`.
1887 .. mdp:: awh-nstout
1889    (100000)
1890    Number of steps between printing AWH data to the energy file, should be
1891    a multiple of :mdp:`nstenergy`.
1893 .. mdp:: awh-nstsample
1895    (10)
1896    Number of steps between sampling of the coordinate value. This sampling
1897    is the basis for updating the bias and estimating the PMF and other AWH observables.
1899 .. mdp:: awh-nsamples-update
1901    (10)
1902    The number of coordinate samples used for each AWH update.
1903    The update interval in steps is :mdp:`awh-nstsample` times this value.
1905 .. mdp:: awh-nbias
1907    (1)
1908    The number of biases, each acting on its own coordinate.
1909    The following options should be specified
1910    for each bias although below only the options for bias number 1 is shown. Options for
1911    other bias indices are  obtained by replacing '1' by the bias index.
1913 .. mdp:: awh1-error-init
1915    (10.0) \[kJ mol-1\]
1916    Estimated initial average error of the PMF for this bias. This value together with the
1917    given diffusion constant(s) :mdp:`awh1-dim1-diffusion` determine the initial biasing rate.
1918    The error is obviously not known *a priori*. Only a rough estimate of :mdp:`awh1-error-init`
1919    is needed however.
1920    As a  general guideline, leave :mdp:`awh1-error-init` to its default value when starting a new
1921    simulation. On the other hand, when there is *a priori* knowledge of the PMF (e.g. when
1922    an initial PMF estimate is provided, see the :mdp:`awh1-user-data` option)
1923    then :mdp:`awh1-error-init` should reflect that knowledge.
1925 .. mdp:: awh1-growth
1927    .. mdp-value:: exp-linear
1929    Each bias keeps a reference weight histogram for the coordinate samples.
1930    Its size sets the magnitude of the bias function and free energy estimate updates
1931    (few samples corresponds to large updates and vice versa).
1932    Thus, its growth rate sets the maximum convergence rate.
1933    By default, there is an initial stage in which the histogram grows close to exponentially (but slower than the sampling rate).
1934    In the final stage that follows, the growth rate is linear and equal to the sampling rate (set by :mdp:`awh-nstsample`).
1935    The initial stage is typically necessary for efficient convergence when starting a new simulation where
1936    high free energy barriers have not yet been flattened by the bias.
1938    .. mdp-value:: linear
1940    As :mdp-value:`awh1-growth=exp-linear` but skip the initial stage. This may be useful if there is *a priori*
1941    knowledge (see :mdp:`awh1-error-init`) which eliminates the need for an initial stage. This is also
1942    the setting compatible with :mdp-value:`awh1-target=local-boltzmann`.
1944 .. mdp:: awh1-equilibrate-histogram
1946    .. mdp-value:: no
1948       Do not equilibrate histogram.
1950    .. mdp-value:: yes
1952       Before entering the initial stage (see :mdp-value:`awh1-growth=exp-linear`), make sure the
1953       histogram of sampled weights is following the target distribution closely enough (specifically,
1954       at least 80% of the target region needs to have a local relative error of less than 20%). This
1955       option would typically only be used when :mdp:`awh1-share-group` > 0
1956       and the initial configurations poorly represent the target
1957       distribution.
1959 .. mdp:: awh1-target
1961    .. mdp-value:: constant
1963       The bias is tuned towards a constant (uniform) coordinate distribution
1964       in the defined sampling interval (defined by  \[:mdp:`awh1-dim1-start`, :mdp:`awh1-dim1-end`\]).
1966    .. mdp-value:: cutoff
1968       Similar to :mdp-value:`awh1-target=constant`, but the target
1969       distribution is proportional to 1/(1 + exp(F - :mdp-value:`awh1-target=cutoff`)),
1970       where F is the free energy relative to the estimated global minimum.
1971       This provides a smooth switch of a flat target distribution in
1972       regions with free energy lower than the cut-off to a Boltzmann
1973       distribution in regions with free energy higher than the cut-off.
1975    .. mdp-value:: boltzmann
1977       The target distribution is a Boltzmann distribtution with a scaled beta (inverse temperature)
1978       factor given by :mdp:`awh1-target-beta-scaling`. *E.g.*, a value of 0.1
1979       would give the same coordinate distribution as sampling with a simulation temperature
1980       scaled by 10.
1982    .. mdp-value:: local-boltzmann
1984       Same target distribution and use of :mdp:`awh1-target-beta-scaling`
1985       but the convergence towards the target distribution is inherently local *i.e.*, the rate of
1986       change of the bias only depends on the local sampling. This local convergence property is
1987       only compatible with :mdp-value:`awh1-growth=linear`, since for
1988       :mdp-value:`awh1-growth=exp-linear` histograms are globally rescaled in the initial stage.
1990 .. mdp:: awh1-target-beta-scaling
1992    [0] \[\]
1993    For :mdp-value:`awh1-target=boltzmann` and :mdp-value:`awh1-target=local-boltzmann`
1994    it is the unitless beta scaling factor taking values in (0,1).
1996 .. mdp:: awh1-target-cutoff
1998    [0] \[kJ mol-1\]
1999    For :mdp-value:`awh1-target=cutoff` this is the cutoff, should be > 0.
2001 .. mdp:: awh1-user-data
2003    .. mdp-value:: no
2005       Initialize the PMF and target distribution with default values.
2007    .. mdp-value:: yes
2009       Initialize the PMF and target distribution with user provided data. For :mdp:`awh-nbias` = 1,
2010       :ref:`gmx mdrun` will expect a file ``awh-init.xvg`` to be present in the run directory.
2011       For multiple biases, :ref:`gmx mdrun` expects files ``awh-init1.xvg``, ``awh-init2.xvg``, etc.
2012       The file name can be changed with the ``-awh`` option.
2013       The first :mdp:`awh1-ndim` columns of
2014       each input file should contain the coordinate values, such that each row defines a point in
2015       coordinate space. Column :mdp:`awh1-ndim` + 1 should contain the PMF value for each point.
2016       The target distribution column can either follow the PMF (column  :mdp:`awh1-ndim` + 2) or
2017       be in the same column as written by ``gmx awh``.
2019 .. mdp:: awh1-share-group
2021    .. mdp-value:: 0
2023       Do not share the bias.
2025    .. mdp-value:: positive
2027       Share the bias and PMF estimates within and/or between simulations.
2028       Within a simulation, the bias will be shared between biases that have the
2029       same :mdp:`awh1-share-group` index (note that the current code does not support this).
2030       With :mdp-value:`awh-share-multisim=yes` and
2031       :ref:`gmx mdrun` option ``-multidir`` the bias will also be shared across simulations.
2032       Sharing may increase convergence initially, although the starting configurations
2033       can be critical, especially when sharing between many biases.
2034       Currently, positive group values should start at 1 and increase
2035       by 1 for each subsequent bias that is shared.
2037 .. mdp:: awh1-ndim
2039    (1) \[integer\]
2040    Number of dimensions of the coordinate, each dimension maps to 1 pull coordinate.
2041    The following options should be specified for each such dimension. Below only
2042    the options for dimension number 1 is shown. Options for other dimension indices are
2043    obtained by replacing '1' by the dimension index.
2045 .. mdp:: awh1-dim1-coord-provider
2047    .. mdp-value:: pull
2049       The module providing the reaction coordinate for this dimension.
2050       Currently AWH can only act on pull coordinates.
2052 .. mdp:: awh1-dim1-coord-index
2054    (1)
2055    Index of the pull coordinate defining this coordinate dimension.
2057 .. mdp:: awh1-dim1-force-constant
2059    (0) \[kJ/mol/nm^2\] or \[kJ/mol/rad^2\]
2060    Force constant for the (convolved) umbrella potential(s) along this
2061    coordinate dimension.
2063 .. mdp:: awh1-dim1-start
2065    (0.0) \[nm\]/\[rad\]
2066    Start value of the sampling interval along this dimension. The range of allowed
2067    values depends on the relevant pull geometry (see :mdp:`pull-coord1-geometry`).
2068    For periodic geometries :mdp:`awh1-dim1-start` greater than :mdp:`awh1-dim1-end`
2069    is allowed. The interval will then wrap around from +period/2 to -period/2.
2071 .. mdp:: awh1-dim1-end
2073    (0.0) \[nm\]/\[rad\]
2074    End value defining the sampling interval together with :mdp:`awh1-dim1-start`.
2076 .. mdp:: awh1-dim1-period
2078    (0.0) \[nm\]/\[rad\]
2079    The period of this reaction coordinate, use 0 when the coordinate is not periodic.
2081 .. mdp:: awh1-dim1-diffusion
2083    (1e-5) \[nm^2/ps\]/\[rad^2/ps\]
2084    Estimated diffusion constant for this coordinate dimension determining the initial
2085    biasing rate. This needs only be a rough estimate and should not critically
2086    affect the results unless it is set to something very low, leading to slow convergence,
2087    or very high, forcing the system far from equilibrium. Not setting this value
2088    explicitly generates a warning.
2090 .. mdp:: awh1-dim1-cover-diameter
2092    (0.0)) \[nm\]/\[rad\]
2093    Diameter that needs to be sampled by a single simulation around a coordinate value
2094    before the point is considered covered in the initial stage (see :mdp-value:`awh1-growth=exp-linear`).
2095    A value > 0  ensures that for each covering there is a continuous transition of this diameter
2096    across each coordinate value.
2097    This is trivially true for independent simulations but not for for multiple bias-sharing simulations
2098    (:mdp:`awh1-share-group`>0).
2099    For a diameter = 0, covering occurs as soon as the simulations have sampled the whole interval, which
2100    for many sharing simulations does not guarantee transitions across free energy barriers.
2101    On the other hand, when the diameter >= the sampling interval length, covering occurs when a single simulation
2102    has independently sampled the whole interval.
2104 Enforced rotation
2105 ^^^^^^^^^^^^^^^^^
2107 These :ref:`mdp` parameters can be used enforce the rotation of a group of atoms,
2108 e.g. a protein subunit. The `reference manual`_ describes in detail 13 different potentials
2109 that can be used to achieve such a rotation.
2111 .. mdp:: rotation
2113    .. mdp-value:: no
2115       No enforced rotation will be applied. All enforced rotation options will
2116       be ignored (and if present in the :ref:`mdp` file, they unfortunately
2117       generate warnings).
2119    .. mdp-value:: yes
2121       Apply the rotation potential specified by :mdp:`rot-type0` to the group of atoms given
2122       under the :mdp:`rot-group0` option.
2124 .. mdp:: rot-ngroups
2126    (1)
2127    Number of rotation groups.
2129 .. mdp:: rot-group0
2131    Name of rotation group 0 in the index file.
2133 .. mdp:: rot-type0
2135    (iso)
2136    Type of rotation potential that is applied to rotation group 0. Can be of of the following:
2137    ``iso``, ``iso-pf``, ``pm``, ``pm-pf``, ``rm``, ``rm-pf``, ``rm2``, ``rm2-pf``,
2138    ``flex``, ``flex-t``, ``flex2``, or ``flex2-t``.
2140 .. mdp:: rot-massw0
2142    (no)
2143    Use mass weighted rotation group positions.
2145 .. mdp:: rot-vec0
2147    (1.0 0.0 0.0)
2148    Rotation vector, will get normalized.
2150 .. mdp:: rot-pivot0
2152    (0.0 0.0 0.0)
2153    Pivot point (nm) for the potentials ``iso``, ``pm``, ``rm``, and ``rm2``.
2155 .. mdp:: rot-rate0
2157    (0)
2158    Reference rotation rate (degree/ps) of group 0.
2160 .. mdp:: rot-k0
2162    (0)
2163    Force constant (kJ/(mol*nm^2)) for group 0.
2165 .. mdp:: rot-slab-dist0
2167    (1.5)
2168    Slab distance (nm), if a flexible axis rotation type was chosen.
2170 .. mdp:: rot-min-gauss0
2172    (0.001)
2173    Minimum value (cutoff) of Gaussian function for the force to be evaluated
2174    (for the flexible axis potentials).
2176 .. mdp:: rot-eps0
2178    (0.0001)
2179    Value of additive constant epsilon' (nm^2) for ``rm2*`` and ``flex2*`` potentials.
2181 .. mdp:: rot-fit-method0
2183    (rmsd)
2184    Fitting method when determining the actual angle of a rotation group
2185    (can be one of ``rmsd``, ``norm``, or ``potential``).
2187 .. mdp:: rot-potfit-nsteps0
2189    (21)
2190    For fit type ``potential``, the number of angular positions around the reference angle for which the
2191    rotation potential is evaluated.
2193 .. mdp:: rot-potfit-step0
2195    (0.25)
2196    For fit type ``potential``, the distance in degrees between two angular positions.
2198 .. mdp:: rot-nstrout
2200    (100)
2201    Output frequency (in steps) for the angle of the rotation group, as well as for the torque
2202    and the rotation potential energy.
2204 .. mdp:: rot-nstsout
2206    (1000)
2207    Output frequency for per-slab data of the flexible axis potentials, i.e. angles, torques and slab centers.
2210 NMR refinement
2211 ^^^^^^^^^^^^^^
2213 .. mdp:: disre
2215    .. mdp-value:: no
2217       ignore distance restraint information in topology file
2219    .. mdp-value:: simple
2221       simple (per-molecule) distance restraints.
2223    .. mdp-value:: ensemble
2225       distance restraints over an ensemble of molecules in one
2226       simulation box. Normally, one would perform ensemble averaging
2227       over multiple subsystems, each in a separate box, using ``mdrun
2228       -multi``. Supply ``topol0.tpr``, ``topol1.tpr``, ... with
2229       different coordinates and/or velocities. The environment
2230       variable ``GMX_DISRE_ENSEMBLE_SIZE`` sets the number of systems
2231       within each ensemble (usually equal to the ``mdrun -multi``
2232       value).
2234 .. mdp:: disre-weighting
2236    .. mdp-value:: equal
2238       divide the restraint force equally over all atom pairs in the
2239       restraint
2241    .. mdp-value:: conservative
2243       the forces are the derivative of the restraint potential, this
2244       results in an weighting of the atom pairs to the reciprocal
2245       seventh power of the displacement. The forces are conservative
2246       when :mdp:`disre-tau` is zero.
2248 .. mdp:: disre-mixed
2250    .. mdp-value:: no
2252       the violation used in the calculation of the restraint force is
2253       the time-averaged violation
2255    .. mdp-value:: yes
2257       the violation used in the calculation of the restraint force is
2258       the square root of the product of the time-averaged violation
2259       and the instantaneous violation
2261 .. mdp:: disre-fc
2263    (1000) \[kJ mol-1 nm-2\]
2264    force constant for distance restraints, which is multiplied by a
2265    (possibly) different factor for each restraint given in the `fac`
2266    column of the interaction in the topology file.
2268 .. mdp:: disre-tau
2270    (0) \[ps\]
2271    time constant for distance restraints running average. A value of
2272    zero turns off time averaging.
2274 .. mdp:: nstdisreout
2276    (100) \[steps\]
2277    period between steps when the running time-averaged and
2278    instantaneous distances of all atom pairs involved in restraints
2279    are written to the energy file (can make the energy file very
2280    large)
2282 .. mdp:: orire
2284    .. mdp-value:: no
2286       ignore orientation restraint information in topology file
2288    .. mdp-value:: yes
2290       use orientation restraints, ensemble averaging can be performed
2291       with `mdrun -multi`
2293 .. mdp:: orire-fc
2295    (0) \[kJ mol\]
2296    force constant for orientation restraints, which is multiplied by a
2297    (possibly) different weight factor for each restraint, can be set
2298    to zero to obtain the orientations from a free simulation
2300 .. mdp:: orire-tau
2302    (0) \[ps\]
2303    time constant for orientation restraints running average. A value
2304    of zero turns off time averaging.
2306 .. mdp:: orire-fitgrp
2308    fit group for orientation restraining. This group of atoms is used
2309    to determine the rotation **R** of the system with respect to the
2310    reference orientation. The reference orientation is the starting
2311    conformation of the first subsystem. For a protein, backbone is a
2312    reasonable choice
2314 .. mdp:: nstorireout
2316    (100) \[steps\]
2317    period between steps when the running time-averaged and
2318    instantaneous orientations for all restraints, and the molecular
2319    order tensor are written to the energy file (can make the energy
2320    file very large)
2323 Free energy calculations
2324 ^^^^^^^^^^^^^^^^^^^^^^^^
2326 .. mdp:: free-energy
2328    .. mdp-value:: no
2330       Only use topology A.
2332    .. mdp-value:: yes
2334       Interpolate between topology A (lambda=0) to topology B
2335       (lambda=1) and write the derivative of the Hamiltonian with
2336       respect to lambda (as specified with :mdp:`dhdl-derivatives`),
2337       or the Hamiltonian differences with respect to other lambda
2338       values (as specified with foreign lambda) to the energy file
2339       and/or to ``dhdl.xvg``, where they can be processed by, for
2340       example :ref:`gmx bar`. The potentials, bond-lengths and angles
2341       are interpolated linearly as described in the manual. When
2342       :mdp:`sc-alpha` is larger than zero, soft-core potentials are
2343       used for the LJ and Coulomb interactions.
2345 .. mdp:: expanded
2347    Turns on expanded ensemble simulation, where the alchemical state
2348    becomes a dynamic variable, allowing jumping between different
2349    Hamiltonians. See the expanded ensemble options for controlling how
2350    expanded ensemble simulations are performed. The different
2351    Hamiltonians used in expanded ensemble simulations are defined by
2352    the other free energy options.
2354 .. mdp:: init-lambda
2356    (-1)
2357    starting value for lambda (float). Generally, this should only be
2358    used with slow growth (*i.e.* nonzero :mdp:`delta-lambda`). In
2359    other cases, :mdp:`init-lambda-state` should be specified
2360    instead. Must be greater than or equal to 0.
2362 .. mdp:: delta-lambda
2364    (0)
2365    increment per time step for lambda
2367 .. mdp:: init-lambda-state
2369    (-1)
2370    starting value for the lambda state (integer). Specifies which
2371    columm of the lambda vector (:mdp:`coul-lambdas`,
2372    :mdp:`vdw-lambdas`, :mdp:`bonded-lambdas`,
2373    :mdp:`restraint-lambdas`, :mdp:`mass-lambdas`,
2374    :mdp:`temperature-lambdas`, :mdp:`fep-lambdas`) should be
2375    used. This is a zero-based index: :mdp:`init-lambda-state` 0 means
2376    the first column, and so on.
2378 .. mdp:: fep-lambdas
2380    \[array\]
2381    Zero, one or more lambda values for which Delta H values will be
2382    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2383    steps. Values must be between 0 and 1. Free energy differences
2384    between different lambda values can then be determined with
2385    :ref:`gmx bar`. :mdp:`fep-lambdas` is different from the
2386    other -lambdas keywords because all components of the lambda vector
2387    that are not specified will use :mdp:`fep-lambdas` (including
2388    :mdp:`restraint-lambdas` and therefore the pull code restraints).
2390 .. mdp:: coul-lambdas
2392    \[array\]
2393    Zero, one or more lambda values for which Delta H values will be
2394    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2395    steps. Values must be between 0 and 1. Only the electrostatic
2396    interactions are controlled with this component of the lambda
2397    vector (and only if the lambda=0 and lambda=1 states have differing
2398    electrostatic interactions).
2400 .. mdp:: vdw-lambdas
2402    \[array\]
2403    Zero, one or more lambda values for which Delta H values will be
2404    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2405    steps. Values must be between 0 and 1. Only the van der Waals
2406    interactions are controlled with this component of the lambda
2407    vector.
2409 .. mdp:: bonded-lambdas
2411    \[array\]
2412    Zero, one or more lambda values for which Delta H values will be
2413    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2414    steps. Values must be between 0 and 1. Only the bonded interactions
2415    are controlled with this component of the lambda vector.
2417 .. mdp:: restraint-lambdas
2419    \[array\]
2420    Zero, one or more lambda values for which Delta H values will be
2421    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2422    steps. Values must be between 0 and 1. Only the restraint
2423    interactions: dihedral restraints, and the pull code restraints are
2424    controlled with this component of the lambda vector.
2426 .. mdp:: mass-lambdas
2428    \[array\]
2429    Zero, one or more lambda values for which Delta H values will be
2430    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2431    steps. Values must be between 0 and 1. Only the particle masses are
2432    controlled with this component of the lambda vector.
2434 .. mdp:: temperature-lambdas
2436    \[array\]
2437    Zero, one or more lambda values for which Delta H values will be
2438    determined and written to dhdl.xvg every :mdp:`nstdhdl`
2439    steps. Values must be between 0 and 1. Only the temperatures
2440    controlled with this component of the lambda vector. Note that
2441    these lambdas should not be used for replica exchange, only for
2442    simulated tempering.
2444 .. mdp:: calc-lambda-neighbors
2446    (1)
2447    Controls the number of lambda values for which Delta H values will
2448    be calculated and written out, if :mdp:`init-lambda-state` has
2449    been set. A positive value will limit the number of lambda points
2450    calculated to only the nth neighbors of :mdp:`init-lambda-state`:
2451    for example, if :mdp:`init-lambda-state` is 5 and this parameter
2452    has a value of 2, energies for lambda points 3-7 will be calculated
2453    and writen out. A value of -1 means all lambda points will be
2454    written out. For normal BAR such as with :ref:`gmx bar`, a value of
2455    1 is sufficient, while for MBAR -1 should be used.
2457 .. mdp:: sc-alpha
2459    (0)
2460    the soft-core alpha parameter, a value of 0 results in linear
2461    interpolation of the LJ and Coulomb interactions
2463 .. mdp:: sc-r-power
2465    (6)
2466    the power of the radial term in the soft-core equation. Possible
2467    values are 6 and 48. 6 is more standard, and is the default. When
2468    48 is used, then sc-alpha should generally be much lower (between
2469    0.001 and 0.003).
2471 .. mdp:: sc-coul
2473    (no)
2474    Whether to apply the soft-core free energy interaction
2475    transformation to the Columbic interaction of a molecule. Default
2476    is no, as it is generally more efficient to turn off the Coulomic
2477    interactions linearly before turning off the van der Waals
2478    interactions. Note that it is only taken into account when lambda
2479    states are used, not with :mdp:`couple-lambda0` /
2480    :mdp:`couple-lambda1`, and you can still turn off soft-core
2481    interactions by setting :mdp:`sc-alpha` to 0.
2483 .. mdp:: sc-power
2485    (0)
2486    the power for lambda in the soft-core function, only the values 1
2487    and 2 are supported
2489 .. mdp:: sc-sigma
2491    (0.3) \[nm\]
2492    the soft-core sigma for particles which have a C6 or C12 parameter
2493    equal to zero or a sigma smaller than :mdp:`sc-sigma`
2495 .. mdp:: couple-moltype
2497    Here one can supply a molecule type (as defined in the topology)
2498    for calculating solvation or coupling free energies. There is a
2499    special option ``system`` that couples all molecule types in the
2500    system. This can be useful for equilibrating a system starting from
2501    (nearly) random coordinates. :mdp:`free-energy` has to be turned
2502    on. The Van der Waals interactions and/or charges in this molecule
2503    type can be turned on or off between lambda=0 and lambda=1,
2504    depending on the settings of :mdp:`couple-lambda0` and
2505    :mdp:`couple-lambda1`. If you want to decouple one of several
2506    copies of a molecule, you need to copy and rename the molecule
2507    definition in the topology.
2509 .. mdp:: couple-lambda0
2511    .. mdp-value:: vdw-q
2513       all interactions are on at lambda=0
2515    .. mdp-value:: vdw
2517       the charges are zero (no Coulomb interactions) at lambda=0
2519    .. mdp-value:: q
2521       the Van der Waals interactions are turned at lambda=0; soft-core
2522       interactions will be required to avoid singularities
2524    .. mdp-value:: none
2526       the Van der Waals interactions are turned off and the charges
2527       are zero at lambda=0; soft-core interactions will be required to
2528       avoid singularities.
2530 .. mdp:: couple-lambda1
2532    analogous to :mdp:`couple-lambda1`, but for lambda=1
2534 .. mdp:: couple-intramol
2536    .. mdp-value:: no
2538       All intra-molecular non-bonded interactions for moleculetype
2539       :mdp:`couple-moltype` are replaced by exclusions and explicit
2540       pair interactions. In this manner the decoupled state of the
2541       molecule corresponds to the proper vacuum state without
2542       periodicity effects.
2544    .. mdp-value:: yes
2546       The intra-molecular Van der Waals and Coulomb interactions are
2547       also turned on/off. This can be useful for partitioning
2548       free-energies of relatively large molecules, where the
2549       intra-molecular non-bonded interactions might lead to
2550       kinetically trapped vacuum conformations. The 1-4 pair
2551       interactions are not turned off.
2553 .. mdp:: nstdhdl
2555    (100)
2556    the frequency for writing dH/dlambda and possibly Delta H to
2557    dhdl.xvg, 0 means no ouput, should be a multiple of
2558    :mdp:`nstcalcenergy`.
2560 .. mdp:: dhdl-derivatives
2562    (yes)
2564    If yes (the default), the derivatives of the Hamiltonian with
2565    respect to lambda at each :mdp:`nstdhdl` step are written
2566    out. These values are needed for interpolation of linear energy
2567    differences with :ref:`gmx bar` (although the same can also be
2568    achieved with the right foreign lambda setting, that may not be as
2569    flexible), or with thermodynamic integration
2571 .. mdp:: dhdl-print-energy
2573    (no)
2575    Include either the total or the potential energy in the dhdl
2576    file. Options are 'no', 'potential', or 'total'. This information
2577    is needed for later free energy analysis if the states of interest
2578    are at different temperatures. If all states are at the same
2579    temperature, this information is not needed. 'potential' is useful
2580    in case one is using ``mdrun -rerun`` to generate the ``dhdl.xvg``
2581    file. When rerunning from an existing trajectory, the kinetic
2582    energy will often not be correct, and thus one must compute the
2583    residual free energy from the potential alone, with the kinetic
2584    energy component computed analytically.
2586 .. mdp:: separate-dhdl-file
2588    .. mdp-value:: yes
2590       The free energy values that are calculated (as specified with
2591       the foreign lambda and :mdp:`dhdl-derivatives` settings) are
2592       written out to a separate file, with the default name
2593       ``dhdl.xvg``. This file can be used directly with :ref:`gmx
2594       bar`.
2596    .. mdp-value:: no
2598       The free energy values are written out to the energy output file
2599       (``ener.edr``, in accumulated blocks at every :mdp:`nstenergy`
2600       steps), where they can be extracted with :ref:`gmx energy` or
2601       used directly with :ref:`gmx bar`.
2603 .. mdp:: dh-hist-size
2605    (0)
2606    If nonzero, specifies the size of the histogram into which the
2607    Delta H values (specified with foreign lambda) and the derivative
2608    dH/dl values are binned, and written to ener.edr. This can be used
2609    to save disk space while calculating free energy differences. One
2610    histogram gets written for each foreign lambda and two for the
2611    dH/dl, at every :mdp:`nstenergy` step. Be aware that incorrect
2612    histogram settings (too small size or too wide bins) can introduce
2613    errors. Do not use histograms unless you're certain you need it.
2615 .. mdp:: dh-hist-spacing
2617    (0.1)
2618    Specifies the bin width of the histograms, in energy units. Used in
2619    conjunction with :mdp:`dh-hist-size`. This size limits the
2620    accuracy with which free energies can be calculated. Do not use
2621    histograms unless you're certain you need it.
2624 Expanded Ensemble calculations
2625 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2627 .. mdp:: nstexpanded
2629    The number of integration steps beween attempted moves changing the
2630    system Hamiltonian in expanded ensemble simulations. Must be a
2631    multiple of :mdp:`nstcalcenergy`, but can be greater or less than
2632    :mdp:`nstdhdl`.
2634 .. mdp:: lmc-stats
2636    .. mdp-value:: no
2638       No Monte Carlo in state space is performed.
2640    .. mdp-value:: metropolis-transition
2642       Uses the Metropolis weights to update the expanded ensemble
2643       weight of each state. Min{1,exp(-(beta_new u_new - beta_old
2644       u_old)}
2646    .. mdp-value:: barker-transition
2648       Uses the Barker transition critera to update the expanded
2649       ensemble weight of each state i, defined by exp(-beta_new
2650       u_new)/(exp(-beta_new u_new)+exp(-beta_old u_old))
2652    .. mdp-value:: wang-landau
2654       Uses the Wang-Landau algorithm (in state space, not energy
2655       space) to update the expanded ensemble weights.
2657    .. mdp-value:: min-variance
2659       Uses the minimum variance updating method of Escobedo et al. to
2660       update the expanded ensemble weights. Weights will not be the
2661       free energies, but will rather emphasize states that need more
2662       sampling to give even uncertainty.
2664 .. mdp:: lmc-mc-move
2666    .. mdp-value:: no
2668       No Monte Carlo in state space is performed.
2670    .. mdp-value:: metropolis-transition
2672       Randomly chooses a new state up or down, then uses the
2673       Metropolis critera to decide whether to accept or reject:
2674       Min{1,exp(-(beta_new u_new - beta_old u_old)}
2676    .. mdp-value:: barker-transition
2678       Randomly chooses a new state up or down, then uses the Barker
2679       transition critera to decide whether to accept or reject:
2680       exp(-beta_new u_new)/(exp(-beta_new u_new)+exp(-beta_old u_old))
2682    .. mdp-value:: gibbs
2684        Uses the conditional weights of the state given the coordinate
2685        (exp(-beta_i u_i) / sum_k exp(beta_i u_i) to decide which state
2686        to move to.
2688    .. mdp-value:: metropolized-gibbs
2690        Uses the conditional weights of the state given the coordinate
2691        (exp(-beta_i u_i) / sum_k exp(beta_i u_i) to decide which state
2692        to move to, EXCLUDING the current state, then uses a rejection
2693        step to ensure detailed balance. Always more efficient that
2694        Gibbs, though only marginally so in many situations, such as
2695        when only the nearest neighbors have decent phase space
2696        overlap.
2698 .. mdp:: lmc-seed
2700    (-1)
2701    random seed to use for Monte Carlo moves in state space. When
2702    :mdp:`lmc-seed` is set to -1, a pseudo random seed is us
2704 .. mdp:: mc-temperature
2706    Temperature used for acceptance/rejection for Monte Carlo moves. If
2707    not specified, the temperature of the simulation specified in the
2708    first group of :mdp:`ref-t` is used.
2710 .. mdp:: wl-ratio
2712    (0.8)
2713    The cutoff for the histogram of state occupancies to be reset, and
2714    the free energy incrementor to be changed from delta to delta *
2715    :mdp:`wl-scale`. If we define the Nratio = (number of samples at
2716    each histogram) / (average number of samples at each
2717    histogram). :mdp:`wl-ratio` of 0.8 means that means that the
2718    histogram is only considered flat if all Nratio > 0.8 AND
2719    simultaneously all 1/Nratio > 0.8.
2721 .. mdp:: wl-scale
2723    (0.8)
2724    Each time the histogram is considered flat, then the current value
2725    of the Wang-Landau incrementor for the free energies is multiplied
2726    by :mdp:`wl-scale`. Value must be between 0 and 1.
2728 .. mdp:: init-wl-delta
2730    (1.0)
2731    The initial value of the Wang-Landau incrementor in kT. Some value
2732    near 1 kT is usually most efficient, though sometimes a value of
2733    2-3 in units of kT works better if the free energy differences are
2734    large.
2736 .. mdp:: wl-oneovert
2738    (no)
2739    Set Wang-Landau incrementor to scale with 1/(simulation time) in
2740    the large sample limit. There is significant evidence that the
2741    standard Wang-Landau algorithms in state space presented here
2742    result in free energies getting 'burned in' to incorrect values
2743    that depend on the initial state. when :mdp:`wl-oneovert` is true,
2744    then when the incrementor becomes less than 1/N, where N is the
2745    mumber of samples collected (and thus proportional to the data
2746    collection time, hence '1 over t'), then the Wang-Lambda
2747    incrementor is set to 1/N, decreasing every step. Once this occurs,
2748    :mdp:`wl-ratio` is ignored, but the weights will still stop
2749    updating when the equilibration criteria set in
2750    :mdp:`lmc-weights-equil` is achieved.
2752 .. mdp:: lmc-repeats
2754    (1)
2755    Controls the number of times that each Monte Carlo swap type is
2756    performed each iteration. In the limit of large numbers of Monte
2757    Carlo repeats, then all methods converge to Gibbs sampling. The
2758    value will generally not need to be different from 1.
2760 .. mdp:: lmc-gibbsdelta
2762    (-1)
2763    Limit Gibbs sampling to selected numbers of neighboring states. For
2764    Gibbs sampling, it is sometimes inefficient to perform Gibbs
2765    sampling over all of the states that are defined. A positive value
2766    of :mdp:`lmc-gibbsdelta` means that only states plus or minus
2767    :mdp:`lmc-gibbsdelta` are considered in exchanges up and down. A
2768    value of -1 means that all states are considered. For less than 100
2769    states, it is probably not that expensive to include all states.
2771 .. mdp:: lmc-forced-nstart
2773    (0)
2774    Force initial state space sampling to generate weights. In order to
2775    come up with reasonable initial weights, this setting allows the
2776    simulation to drive from the initial to the final lambda state,
2777    with :mdp:`lmc-forced-nstart` steps at each state before moving on
2778    to the next lambda state. If :mdp:`lmc-forced-nstart` is
2779    sufficiently long (thousands of steps, perhaps), then the weights
2780    will be close to correct. However, in most cases, it is probably
2781    better to simply run the standard weight equilibration algorithms.
2783 .. mdp:: nst-transition-matrix
2785    (-1)
2786    Frequency of outputting the expanded ensemble transition matrix. A
2787    negative number means it will only be printed at the end of the
2788    simulation.
2790 .. mdp:: symmetrized-transition-matrix
2792    (no)
2793    Whether to symmetrize the empirical transition matrix. In the
2794    infinite limit the matrix will be symmetric, but will diverge with
2795    statistical noise for short timescales. Forced symmetrization, by
2796    using the matrix T_sym = 1/2 (T + transpose(T)), removes problems
2797    like the existence of (small magnitude) negative eigenvalues.
2799 .. mdp:: mininum-var-min
2801    (100)
2802    The min-variance strategy (option of :mdp:`lmc-stats` is only
2803    valid for larger number of samples, and can get stuck if too few
2804    samples are used at each state. :mdp:`mininum-var-min` is the
2805    minimum number of samples that each state that are allowed before
2806    the min-variance strategy is activated if selected.
2808 .. mdp:: init-lambda-weights
2810    The initial weights (free energies) used for the expanded ensemble
2811    states. Default is a vector of zero weights. format is similar to
2812    the lambda vector settings in :mdp:`fep-lambdas`, except the
2813    weights can be any floating point number. Units are kT. Its length
2814    must match the lambda vector lengths.
2816 .. mdp:: lmc-weights-equil
2818    .. mdp-value:: no
2820       Expanded ensemble weights continue to be updated throughout the
2821       simulation.
2823    .. mdp-value:: yes
2825       The input expanded ensemble weights are treated as equilibrated,
2826       and are not updated throughout the simulation.
2828    .. mdp-value:: wl-delta
2830       Expanded ensemble weight updating is stopped when the
2831       Wang-Landau incrementor falls below this value.
2833    .. mdp-value:: number-all-lambda
2835       Expanded ensemble weight updating is stopped when the number of
2836       samples at all of the lambda states is greater than this value.
2838    .. mdp-value:: number-steps
2840       Expanded ensemble weight updating is stopped when the number of
2841       steps is greater than the level specified by this value.
2843    .. mdp-value:: number-samples
2845       Expanded ensemble weight updating is stopped when the number of
2846       total samples across all lambda states is greater than the level
2847       specified by this value.
2849    .. mdp-value:: count-ratio
2851       Expanded ensemble weight updating is stopped when the ratio of
2852       samples at the least sampled lambda state and most sampled
2853       lambda state greater than this value.
2855 .. mdp:: simulated-tempering
2857    (no)
2858    Turn simulated tempering on or off. Simulated tempering is
2859    implemented as expanded ensemble sampling with different
2860    temperatures instead of different Hamiltonians.
2862 .. mdp:: sim-temp-low
2864    (300) \[K\]
2865    Low temperature for simulated tempering.
2867 .. mdp:: sim-temp-high
2869    (300) \[K\]
2870    High temperature for simulated tempering.
2872 .. mdp:: simulated-tempering-scaling
2874    Controls the way that the temperatures at intermediate lambdas are
2875    calculated from the :mdp:`temperature-lambdas` part of the lambda
2876    vector.
2878    .. mdp-value:: linear
2880       Linearly interpolates the temperatures using the values of
2881       :mdp:`temperature-lambdas`, *i.e.* if :mdp:`sim-temp-low`
2882       =300, :mdp:`sim-temp-high` =400, then lambda=0.5 correspond to
2883       a temperature of 350. A nonlinear set of temperatures can always
2884       be implemented with uneven spacing in lambda.
2886    .. mdp-value:: geometric
2888       Interpolates temperatures geometrically between
2889       :mdp:`sim-temp-low` and :mdp:`sim-temp-high`. The i:th state
2890       has temperature :mdp:`sim-temp-low` * (:mdp:`sim-temp-high` /
2891       :mdp:`sim-temp-low`) raised to the power of
2892       (i/(ntemps-1)). This should give roughly equal exchange for
2893       constant heat capacity, though of course things simulations that
2894       involve protein folding have very high heat capacity peaks.
2896    .. mdp-value:: exponential
2898       Interpolates temperatures exponentially between
2899       :mdp:`sim-temp-low` and :mdp:`sim-temp-high`. The i:th state
2900       has temperature :mdp:`sim-temp-low` + (:mdp:`sim-temp-high` -
2901       :mdp:`sim-temp-low`)*((exp(:mdp:`temperature-lambdas`
2902       (i))-1)/(exp(1.0)-i)).
2905 Non-equilibrium MD
2906 ^^^^^^^^^^^^^^^^^^
2908 .. mdp:: acc-grps
2910    groups for constant acceleration (*e.g.* ``Protein Sol``) all atoms
2911    in groups Protein and Sol will experience constant acceleration as
2912    specified in the :mdp:`accelerate` line
2914 .. mdp:: accelerate
2916    (0) \[nm ps^-2\]
2917    acceleration for :mdp:`acc-grps`; x, y and z for each group
2918    (*e.g.* ``0.1 0.0 0.0 -0.1 0.0 0.0`` means that first group has
2919    constant acceleration of 0.1 nm ps-2 in X direction, second group
2920    the opposite).
2922 .. mdp:: freezegrps
2924    Groups that are to be frozen (*i.e.* their X, Y, and/or Z position
2925    will not be updated; *e.g.* ``Lipid SOL``). :mdp:`freezedim`
2926    specifies for which dimension the freezing applies. To avoid
2927    spurious contibrutions to the virial and pressure due to large
2928    forces between completely frozen atoms you need to use energy group
2929    exclusions, this also saves computing time. Note that coordinates
2930    of frozen atoms are not scaled by pressure-coupling algorithms.
2932 .. mdp:: freezedim
2934    dimensions for which groups in :mdp:`freezegrps` should be frozen,
2935    specify `Y` or `N` for X, Y and Z and for each group (*e.g.* ``Y Y
2936    N N N N`` means that particles in the first group can move only in
2937    Z direction. The particles in the second group can move in any
2938    direction).
2940 .. mdp:: cos-acceleration
2942    (0) \[nm ps^-2\]
2943    the amplitude of the acceleration profile for calculating the
2944    viscosity. The acceleration is in the X-direction and the magnitude
2945    is :mdp:`cos-acceleration` cos(2 pi z/boxheight). Two terms are
2946    added to the energy file: the amplitude of the velocity profile and
2947    1/viscosity.
2949 .. mdp:: deform
2951    (0 0 0 0 0 0) \[nm ps-1\]
2952    The velocities of deformation for the box elements: a(x) b(y) c(z)
2953    b(x) c(x) c(y). Each step the box elements for which :mdp:`deform`
2954    is non-zero are calculated as: box(ts)+(t-ts)*deform, off-diagonal
2955    elements are corrected for periodicity. The coordinates are
2956    transformed accordingly. Frozen degrees of freedom are (purposely)
2957    also transformed. The time ts is set to t at the first step and at
2958    steps at which x and v are written to trajectory to ensure exact
2959    restarts. Deformation can be used together with semiisotropic or
2960    anisotropic pressure coupling when the appropriate
2961    compressibilities are set to zero. The diagonal elements can be
2962    used to strain a solid. The off-diagonal elements can be used to
2963    shear a solid or a liquid.
2966 Electric fields
2967 .. mdp:: electric-field-x ; electric-field-y ; electric-field-z
2969    Here you can specify an electric field that optionally can be
2970    alternating and pulsed. The general expression for the field
2971    has the form of a gaussian laser pulse:
2973    E(t) = E0 exp ( -(t-t0)^2/(2 sigma^2) ) cos(omega (t-t0))
2975    For example, the four parameters for direction x are set in the
2976    three fields of :mdp:`electric-field-x` (and similar for y and z) 
2977    like
2979    electric-field-x  = E0 omega t0 sigma
2981    In the special case that sigma = 0, the exponential term is omitted
2982    and only the cosine term is used. If also omega = 0 a static
2983    electric field is applied.
2985    More details in Carl Caleman and David van der Spoel: Picosecond
2986    Melting of Ice by an Infrared Laser Pulse - A Simulation Study
2987    Angew. Chem. Intl. Ed. 47 pp. 14 17-1420 (2008)
2991 Mixed quantum/classical molecular dynamics
2992 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2994 .. MDP:: QMMM
2996    .. mdp-value:: no
2998       No QM/MM.
3000    .. mdp-value:: yes
3002       Do a QM/MM simulation. Several groups can be described at
3003       different QM levels separately. These are specified in the
3004       :mdp:`QMMM-grps` field separated by spaces. The level of *ab
3005       initio* theory at which the groups are described is specified by
3006       :mdp:`QMmethod` and :mdp:`QMbasis` Fields. Describing the
3007       groups at different levels of theory is only possible with the
3008       ONIOM QM/MM scheme, specified by :mdp:`QMMMscheme`.
3010 .. mdp:: QMMM-grps
3012    groups to be descibed at the QM level
3014 .. mdp:: QMMMscheme
3016    .. mdp-value:: normal
3018       normal QM/MM. There can only be one :mdp:`QMMM-grps` that is
3019       modelled at the :mdp:`QMmethod` and :mdp:`QMbasis` level of
3020       *ab initio* theory. The rest of the system is described at the
3021       MM level. The QM and MM subsystems interact as follows: MM point
3022       charges are included in the QM one-electron hamiltonian and all
3023       Lennard-Jones interactions are described at the MM level.
3025    .. mdp-value:: ONIOM
3027       The interaction between the subsystem is described using the
3028       ONIOM method by Morokuma and co-workers. There can be more than
3029       one :mdp:`QMMM-grps` each modeled at a different level of QM
3030       theory (:mdp:`QMmethod` and :mdp:`QMbasis`).
3032 .. mdp:: QMmethod
3034    (RHF)
3035    Method used to compute the energy and gradients on the QM
3036    atoms. Available methods are AM1, PM3, RHF, UHF, DFT, B3LYP, MP2,
3037    CASSCF, and MMVB. For CASSCF, the number of electrons and orbitals
3038    included in the active space is specified by :mdp:`CASelectrons`
3039    and :mdp:`CASorbitals`.
3041 .. mdp:: QMbasis
3043    (STO-3G)
3044    Basis set used to expand the electronic wavefuntion. Only Gaussian
3045    basis sets are currently available, *i.e.* ``STO-3G, 3-21G, 3-21G*,
3046    3-21+G*, 6-21G, 6-31G, 6-31G*, 6-31+G*,`` and ``6-311G``.
3048 .. mdp:: QMcharge
3050    (0) \[integer\]
3051    The total charge in `e` of the :mdp:`QMMM-grps`. In case there are
3052    more than one :mdp:`QMMM-grps`, the total charge of each ONIOM
3053    layer needs to be specified separately.
3055 .. mdp:: QMmult
3057    (1) \[integer\]
3058    The multiplicity of the :mdp:`QMMM-grps`. In case there are more
3059    than one :mdp:`QMMM-grps`, the multiplicity of each ONIOM layer
3060    needs to be specified separately.
3062 .. mdp:: CASorbitals
3064    (0) \[integer\]
3065    The number of orbitals to be included in the active space when
3066    doing a CASSCF computation.
3068 .. mdp:: CASelectrons
3070    (0) \[integer\]
3071    The number of electrons to be included in the active space when
3072    doing a CASSCF computation.
3074 .. MDP:: SH
3076    .. mdp-value:: no
3078       No surface hopping. The system is always in the electronic
3079       ground-state.
3081    .. mdp-value:: yes
3083       Do a QM/MM MD simulation on the excited state-potential energy
3084       surface and enforce a *diabatic* hop to the ground-state when
3085       the system hits the conical intersection hyperline in the course
3086       the simulation. This option only works in combination with the
3087       CASSCF method.
3090 Implicit solvent
3091 ^^^^^^^^^^^^^^^^
3093 .. mdp:: implicit-solvent
3095    .. mdp-value:: no
3097       No implicit solvent
3099    .. mdp-value:: GBSA
3101       Do a simulation with implicit solvent using the Generalized Born
3102       formalism. Three different methods for calculating the Born
3103       radii are available, Still, HCT and OBC. These are specified
3104       with the :mdp:`gb-algorithm` field. The non-polar solvation is
3105       specified with the :mdp:`sa-algorithm` field.
3107 .. mdp:: gb-algorithm
3109    .. mdp-value:: Still
3111       Use the Still method to calculate the Born radii
3113    .. mdp-value:: HCT
3115       Use the Hawkins-Cramer-Truhlar method to calculate the Born
3116       radii
3118    .. mdp-value:: OBC
3120       Use the Onufriev-Bashford-Case method to calculate the Born
3121       radii
3123 .. mdp:: nstgbradii
3125    (1) \[steps\]
3126    Frequency to (re)-calculate the Born radii. For most practial
3127    purposes, setting a value larger than 1 violates energy
3128    conservation and leads to unstable trajectories.
3130 .. mdp:: rgbradii
3132    (1.0) \[nm\]
3133    Cut-off for the calculation of the Born radii. Currently must be
3134    equal to rlist
3136 .. mdp:: gb-epsilon-solvent
3138    (80)
3139    Dielectric constant for the implicit solvent
3141 .. mdp:: gb-saltconc
3143    (0) \[M\]
3144    Salt concentration for implicit solvent models, currently not used
3146 .. mdp:: gb-obc-alpha
3147 .. mdp:: gb-obc-beta
3148 .. mdp:: gb-obc-gamma
3150    Scale factors for the OBC model. Default values of 1, 0.78 and 4.85
3151    respectively are for OBC(II). Values for OBC(I) are 0.8, 0 and 2.91
3152    respectively
3154 .. mdp:: gb-dielectric-offset
3156    (0.009) \[nm\]
3157    Distance for the di-electric offset when calculating the Born
3158    radii. This is the offset between the center of each atom the
3159    center of the polarization energy for the corresponding atom
3161 .. mdp:: sa-algorithm
3163    .. mdp-value:: Ace-approximation
3165       Use an Ace-type approximation
3167    .. mdp-value:: None
3169       No non-polar solvation calculation done. For GBSA only the polar
3170       part gets calculated
3172 .. mdp:: sa-surface-tension
3174    \[kJ mol-1 nm-2\]
3175    Default value for surface tension with SA algorithms. The default
3176    value is -1; Note that if this default value is not changed it will
3177    be overridden by :ref:`gmx grompp` using values that are specific
3178    for the choice of radii algorithm (0.0049 kcal/mol/Angstrom^2 for
3179    Still, 0.0054 kcal/mol/Angstrom2 for HCT/OBC) Setting it to 0 will
3180    while using an sa-algorithm other than None means no non-polar
3181    calculations are done.
3184 Computational Electrophysiology
3185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3186 Use these options to switch on and control ion/water position exchanges in "Computational
3187 Electrophysiology" simulation setups. (See the `reference manual`_ for details).
3189 .. mdp:: swapcoords
3191    .. mdp-value:: no
3193       Do not enable ion/water position exchanges.
3195    .. mdp-value:: X ; Y ; Z
3197       Allow for ion/water position exchanges along the chosen direction.
3198       In a typical setup with the membranes parallel to the x-y plane,
3199       ion/water pairs need to be exchanged in Z direction to sustain the
3200       requested ion concentrations in the compartments.
3202 .. mdp:: swap-frequency
3204    (1) The swap attempt frequency, i.e. every how many time steps the ion counts
3205    per compartment are determined and exchanges made if necessary.
3206    Normally it is not necessary to check at every time step.
3207    For typical Computational Electrophysiology setups, a value of about 100 is
3208    sufficient and yields a negligible performance impact.
3210 .. mdp:: split-group0
3212    Name of the index group of the membrane-embedded part of channel #0.
3213    The center of mass of these atoms defines one of the compartment boundaries
3214    and should be chosen such that it is near the center of the membrane.
3216 .. mdp:: split-group1
3218    Channel #1 defines the position of the other compartment boundary.
3220 .. mdp:: massw-split0
3222    (no) Defines whether or not mass-weighting is used to calculate the split group center.
3224    .. mdp-value:: no
3226       Use the geometrical center.
3228    .. mdp-value:: yes
3230       Use the center of mass.
3232 .. mdp:: massw-split1
3234    (no) As above, but for split-group #1.
3236 .. mdp:: solvent-group
3238    Name of the index group of solvent molecules.
3240 .. mdp:: coupl-steps
3242    (\10) Average the number of ions per compartment over these many swap attempt steps.
3243    This can be used to prevent that ions near a compartment boundary
3244    (diffusing through a channel, e.g.) lead to unwanted back and forth swaps.
3246 .. mdp:: iontypes
3248    (1) The number of different ion types to be controlled. These are during the
3249    simulation exchanged with solvent molecules to reach the desired reference numbers.
3251 .. mdp:: iontype0-name
3253    Name of the first ion type.
3255 .. mdp:: iontype0-in-A
3257    (-1) Requested (=reference) number of ions of type 0 in compartment A.
3258    The default value of -1 means: use the number of ions as found in time step 0
3259    as reference value.
3261 .. mdp:: iontype0-in-B
3263    (-1) Reference number of ions of type 0 for compartment B.
3265 .. mdp:: bulk-offsetA
3267    (0.0) Offset of the first swap layer from the compartment A midplane.
3268    By default (i.e. bulk offset = 0.0), ion/water exchanges happen between layers
3269    at maximum distance (= bulk concentration) to the split group layers. However,
3270    an offset b (-1.0 < b < +1.0) can be specified to offset the bulk layer from the middle at 0.0
3271    towards one of the compartment-partitioning layers (at +/- 1.0).
3273 .. mdp:: bulk-offsetB
3275    (0.0) Offset of the other swap layer from the compartment B midplane.
3278 .. mdp:: threshold
3280    (\1) Only swap ions if threshold difference to requested count is reached.
3282 .. mdp:: cyl0-r
3284    (2.0) \[nm\] Radius of the split cylinder #0.
3285    Two split cylinders (mimicking the channel pores) can optionally be defined
3286    relative to the center of the split group. With the help of these cylinders
3287    it can be counted which ions have passed which channel. The split cylinder
3288    definition has no impact on whether or not ion/water swaps are done.
3290 .. mdp:: cyl0-up
3292    (1.0) \[nm\] Upper extension of the split cylinder #0.
3294 .. mdp:: cyl0-down
3296    (1.0) \[nm\] Lower extension of the split cylinder #0.
3298 .. mdp:: cyl1-r
3300    (2.0) \[nm\] Radius of the split cylinder #1.
3302 .. mdp:: cyl1-up
3304    (1.0) \[nm\] Upper extension of the split cylinder #1.
3306 .. mdp:: cyl1-down
3308    (1.0) \[nm\] Lower extension of the split cylinder #1.
3311 User defined thingies
3312 ^^^^^^^^^^^^^^^^^^^^^
3314 .. mdp:: user1-grps
3315 .. mdp:: user2-grps
3316 .. mdp:: userint1 (0)
3317 .. mdp:: userint2 (0)
3318 .. mdp:: userint3 (0)
3319 .. mdp:: userint4 (0)
3320 .. mdp:: userreal1 (0)
3321 .. mdp:: userreal2 (0)
3322 .. mdp:: userreal3 (0)
3323 .. mdp:: userreal4 (0)
3325    These you can use if you modify code. You can pass integers and
3326    reals and groups to your subroutine. Check the inputrec definition
3327    in ``src/gromacs/mdtypes/inputrec.h``
3329 Removed features
3330 ^^^^^^^^^^^^^^^^
3332 This feature has been removed from |Gromacs|, but so that old
3333 :ref:`mdp` and :ref:`tpr` files cannot be mistakenly misused, we still
3334 parse this option. :ref:`gmx grompp` and :ref:`gmx mdrun` will issue a
3335 fatal error if this is set.
3337 .. mdp:: adress
3339    (no)
3341 .. _reference manual: gmx-manual-parent-dir_