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