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