.. mdp:: pcoupltype
+ Specifies the kind of isotropy of the pressure coupling used. Each
+ kind takes one or more values for :mdp:`compressibility` and
+ :mdp:`ref-p`. Only a single value is permitted for :mdp:`tau-p`.
+
.. mdp-value:: isotropic
Isotropic pressure coupling with time constant
- :mdp:`tau-p`. The compressibility and reference pressure are
- set with :mdp:`compressibility` and :mdp:`ref-p`, one value is
- needed.
+ :mdp:`tau-p`. One value each for :mdp:`compressibility` and
+ :mdp:`ref-p` is required.
.. mdp-value:: semiisotropic
Pressure coupling which is isotropic in the ``x`` and ``y``
direction, but different in the ``z`` direction. This can be
- useful for membrane simulations. 2 values are needed for ``x/y``
- and ``z`` directions respectively.
+ useful for membrane simulations. Two values each for
+ :mdp:`compressibility` and :mdp:`ref-p` are required, for
+ ``x/y`` and ``z`` directions respectively.
.. mdp-value:: anisotropic
.. mdp:: tau-p
(1) \[ps\]
- time constant for coupling
+ The time constant for pressure coupling (one value for all
+ directions).
.. mdp:: compressibility
\[bar^-1\]
- compressibility (NOTE: this is now really in bar-1) For water at 1
- atm and 300 K the compressibility is 4.5e-5 bar^-1.
+ The compressibility (NOTE: this is now really in bar^-1) For water at 1
+ atm and 300 K the compressibility is 4.5e-5 bar^-1. The number of
+ required values is implied by :mdp:`pcoupltype`.
.. mdp:: ref-p
\[bar\]
- reference pressure for coupling
+ The reference pressure for coupling. The number of required values
+ is implied by :mdp:`pcoupltype`.
.. mdp:: refcoord-scaling
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
z1 = x1[a[index[i-1]+j]][axis];
z2 = x1[a[index[i+1]+j]][axis];
z_ave = 0.5 * (z1 + z2);
- if (z_ave < 0)
+ slice = (int)((nslices*z_ave)/box[axis][axis]);
+ while (slice < 0)
{
- z_ave += box[axis][axis];
- }
- if (z_ave > box[axis][axis])
- {
- z_ave -= box[axis][axis];
+ slice += nslices;
}
+ slice = slice % nslices;
- slice = static_cast<int>((0.5 + (z_ave / (*slWidth))) - 1);
slCount[slice]++; /* determine slice, increase count */
slFrameorder[slice] += 0.5 * (3 * cossum[axis] - 1);