Merge release-4-5-patches into release-4-6
authorBerk Hess <hess@kth.se>
Thu, 26 Apr 2012 15:40:34 +0000 (17:40 +0200)
committerBerk Hess <hess@kth.se>
Thu, 26 Apr 2012 18:23:02 +0000 (20:23 +0200)
Change-Id: Id1c62a482c6c3467704cc9b657b53f7df493b7ba

19 files changed:
1  2 
CMakeLists.txt
include/mdrun.h
share/html/online/mdp_opt.html
src/config.h.cmakein
src/gmxlib/checkpoint.c
src/gmxlib/futil.c
src/gmxlib/mshift.c
src/gmxlib/shift_util.c
src/gmxlib/tpxio.c
src/kernel/md.c
src/kernel/mdrun.c
src/kernel/runner.c
src/mdlib/domdec_setup.c
src/mdlib/md_support.c
src/mdlib/shellfc.c
src/mdlib/sim_util.c
src/tools/gmx_editconf.c
src/tools/gmx_membed.c
src/tools/hxprops.c

diff --cc CMakeLists.txt
index 0218f6d73bdbdd37e40abb77e40f6ee5674bef61,8fd987745f8af01c9a51ac40f57220922d917557..b4af587c314fe96b63f0be9fbc8c67d1cb9ee54b
@@@ -305,7 -347,7 +305,8 @@@ check_function_exists(fsyn
  check_function_exists(_fileno           HAVE__FILENO)
  check_function_exists(fileno            HAVE_FILENO)
  check_function_exists(_commit           HAVE__COMMIT)
+ check_function_exists(lstat             HAVE_LSTAT)
 +check_function_exists(sigaction         HAVE_SIGACTION)
  
  include(CheckLibraryExists)
  check_library_exists(m sqrt "" HAVE_LIBM)
diff --cc include/mdrun.h
Simple merge
index 3dcad45bd49c811647813895c08a3b66d402ab9b,170cf9478dadb596ce117f829f56c70de1891506..bf9057abd752b8279fe8e2f7bb6c62908d676d88
@@@ -503,17 -504,22 +504,17 @@@ might try 0.15 nm. When running in para
  parallelizes better than the FFT, so try decreasing grid dimensions
  while increasing interpolation.</dd>
  
 -<dt><b><!--Idx-->PPPM<!--EIdx--></b></dt>
 -<dd>Particle-Particle Particle-Mesh algorithm for long range
 -electrostatic interactions.
 -Use for example <b>rlist</b><tt>=0.9</tt>, <b>rcoulomb</b><tt>=0.9</TT>.
 -The grid dimensions are controlled by <b>fourierspacing</b>.
 -Reasonable grid spacing for PPPM is 0.05-0.1 nm.
 -See <tt>Shift</tt> for the details of the particle-particle potential.
 -<br>
 -NOTE: PPPM is not functional in the current version, but we plan to implement
 -PPPM through a small modification of the PME code.</dd>
 +<dt><b><!--Idx-->P3M-AD<!--EIdx--></b></dt>
 +<dd>Particle-Particle Particle-Mesh algorithm with analytical derivative
 +for for long range electrostatic interactions. The method and code
 +is identical to SPME, except that the influence function is optimized
 +for the grid. This gives a slight increase in accuracy.</dd>
  
- <dt><b><!--Idx-->Reaction-Field<!--EIdx--></b></dt>
+ <dt><b>Reaction-Field electrostatics<!--QuietIdx-->reaction-field electrostatics<!--EQuietIdx--></b></dt>
  <dd>Reaction field with Coulomb cut-off <b>rcoulomb</b>,
  where <b>rcoulomb</b> &ge; <b>rlist</b>.
 -The dielectric constant beyond the cut-off is <b>epsilon_rf</b>.
 -The dielectric constant can be set to infinity by setting <b>epsilon_rf</b><tt>=0</tt>.</dd>
 +The dielectric constant beyond the cut-off is <b>epsilon-rf</b>.
 +The dielectric constant can be set to infinity by setting <b>epsilon-rf</b><tt>=0</tt>.</dd>
  
  <dt><b>Generalized-Reaction-Field</b></dt>
  <dd>Generalized reaction field with Coulomb cut-off <b>rcoulomb</b>,
@@@ -721,13 -727,14 +722,14 @@@ energy group pairs
  <h3>Ewald</h3>
  <dl>
  <dt><b>fourierspacing: (0.12) [nm]</b></dt>
- <dd>The maximum grid spacing for the FFT grid when using PME or P3M.
- For ordinary Ewald the spacing times the box dimensions determines the
- highest magnitude to use in each direction. In all cases
- each direction can be overridden by entering a non-zero value for
- <b>fourier-n[xyz]</b>.
+ <dd>For ordinary Ewald, the ratio of the box dimensions and the spacing
+ determines a lower bound for the number of wave vectors to use in each
 -(signed) direction. For PME and PPPM, that ratio determines a lower bound
++(signed) direction. For PME and P3M, that ratio determines a lower bound
+ for the number of Fourier-space grid points that will be used along that
+ axis. In all cases, the number for each direction can be overridden by
+ entering a non-zero value for <b>fourier_n[xyz]</b>.
  For optimizing the relative load of the particle-particle interactions
- and the mesh part of PME it is useful to know that
+ and the mesh part of PME, it is useful to know that
  the accuracy of the electrostatics remains nearly constant
  when the Coulomb cut-off and the PME grid spacing are scaled
  by the same factor.</dd>
@@@ -1287,46 -1294,49 +1289,49 @@@ The force constant is then (1 - lambda)
  <dt><b>disre:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
- <dd>no <!--Idx-->distance restraints<!--EIdx--> (ignore distance
- restraint information in topology file)</dd>
+ <dd>ignore <!--Idx-->distance restraint<!--EIdx--> information in topology file</dd>
  <dt><b>simple</b></dt>
- <dd>simple (per-molecule) distance restraints,
- ensemble averaging can be performed with <tt>mdrun -multi</tt>
- where the environment variable <tt>GMX_DISRE_ENSEMBLE_SIZE</tt> sets the number
- of systems within each ensemble (usually equal to the <tt>mdrun -multi</tt> value)</dd>
+ <dd>simple (per-molecule) distance restraints.
  <dt><b>ensemble</b></dt>
- <dd>distance restraints over an ensemble of molecules in one simulation box,
- should only be used for special cases, such as dimers
- (this option is not fuctional in the current version of GROMACS)</dd>
+ <dd>distance restraints over an ensemble of molecules in one
+ simulation box. Normally, one would perform ensemble averaging over
+ multiple subsystems, each in a separate box, using <tt>mdrun -multi</tt>;s
+ upply <tt>topol0.tpr</tt>, <tt>topol1.tpr</tt>, ... with different
+ coordinates and/or velocities.
+ The environment variable <tt>GMX_DISRE_ENSEMBLE_SIZE</tt> sets the number
+ of systems within each ensemble (usually equal to the <tt>mdrun -multi</tt> value).</dd>
+ </dd>
  </dl></dd>
 -<dt><b>disre_weighting:</b></dt>
 +<dt><b>disre-weighting:</b></dt>
  <dd><dl compact>
+ <dt><b>equal</b> (default)</dt>
+ <dd>divide the restraint force equally over all atom pairs in the restraint</dd>
  <dt><b>conservative</b></dt>
  <dd>the forces are the derivative of the restraint potential,
- this results in an r<sup>-7</sup> weighting of the atom pairs</dd>
- <dt><b>equal</b></dt>
- <dd>divide the restraint force equally over all atom pairs in the restraint</dd>
+ this results in an r<sup>-7</sup> weighting of the atom pairs.
 -The forces are conservative when <tt>disre_tau</tt> is zero.</dd>
++The forces are conservative when <tt>disre-tau</tt> is zero.</dd>
  </dl></dd>
 -<dt><b>disre_mixed:</b></dt>
 +<dt><b>disre-mixed:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>the violation used in the calculation of the restraint force is the
- time averaged violation </dd>
+ time-averaged violation </dd>
  <dt><b>yes</b></dt>
  <dd>the violation used in the calculation of the restraint force is the
- square root of the time averaged violation times the instantaneous violation </dd>
+ square root of the product of the time-averaged violation and the instantaneous violation</dd>
  </dl></dd>
  
 -<dt><b>disre_fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
 +<dt><b>disre-fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
  <dd>force constant for distance restraints, which is multiplied by a
- (possibly) different factor for each restraint</dd>
+ (possibly) different factor for each restraint given in the <tt>fac</tt>
+ column of the interaction in the topology file.</dd>
  
 -<dt><b>disre_tau: (0) [ps]</b></dt>
 +<dt><b>disre-tau: (0) [ps]</b></dt>
- <dd>time constant for distance restraints running average</dd>
+ <dd>time constant for distance restraints running average. A value of zero turns off time averaging.</dd>
  
  <dt><b>nstdisreout: (100) [steps]</b></dt>
- <dd>frequency to write the running time averaged and instantaneous distances
- of all atom pairs involved in restraints to the energy file
+ <dd>period between steps when the running time-averaged and instantaneous distances
+ of all atom pairs involved in restraints are written to the energy file
  (can make the energy file very large)</dd>
  
  <A NAME="nmr2">
  <dd>use orientation restraints, ensemble averaging can be performed
  with <tt>mdrun -multi</tt></dd>
  </dl>
 -<dt><b>orire_fc: (0) [kJ mol]</b></dt>
 +<dt><b>orire-fc: (0) [kJ mol]</b></dt>
  <dd>force constant for orientation restraints, which is multiplied by a
- (possibly) different factor for each restraint, can be set to zero to
+ (possibly) different weight factor for each restraint, can be set to zero to
  obtain the orientations from a free simulation</dd>
 -<dt><b>orire_tau: (0) [ps]</b></dt>
 +<dt><b>orire-tau: (0) [ps]</b></dt>
- <dd>time constant for orientation restraints running average</dd>
+ <dd>time constant for orientation restraints running average. A value of zero turns off time averaging.</dd>
 -<dt><b>orire_fitgrp: </b></dt>
 +<dt><b>orire-fitgrp: </b></dt>
- <dd>fit group for orientation restraining, for a protein backbone is a good
+ <dd>fit group for orientation restraining. This group of atoms is used
+ to determine the rotation <b>R</b> of the system with respect to the
+ reference orientation. The reference orientation is the starting
+ conformation of the first subsystem. For a protein, backbone is a reasonable
  choice</dd>
  <dt><b>nstorireout: (100) [steps]</b></dt>
- <dd>frequency to write the running time averaged and instantaneous orientations
- for all restraints and the molecular order tensor to the energy file
+ <dd>period between steps when the running time-averaged and instantaneous orientations
+ for all restraints, and the molecular order tensor are written to the energy file
  (can make the energy file very large)</dd>
  </dl>
  
  <A NAME="free"><br>
  <hr>
- <h3><!--Idx-->Free energy calculations<!--EIdx--></h3>
+ <h3>Free energy calculations<!--QuietIdx-->free energy calculations<!--EQuietIdx--></h3>
  
  <dl>
 -<dt><b>free_energy:</b></dt>
 +<dt><b>free-energy:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>Only use topology A.</dd>
@@@ -1442,10 -1454,10 +1449,10 @@@ the molecule definition in the topology
  
  <A NAME="neq"><br>
  <hr>
- <h3><!--Idx-->Non-equilibrium MD<!--EIdx--></h3>
+ <h3>Non-equilibrium MD<!--QuietIdx-->non-equilibrium MD<!--EQuietIdx--></h3>
  
  <dl>
 -<dt><b>acc_grps: </b></dt>
 +<dt><b>acc-grps: </b></dt>
  <dd>groups for constant acceleration (e.g.: <tt>Protein Sol</tt>)
  all atoms in groups Protein and Sol will experience constant acceleration
  as specified in the <b>accelerate</b> line</dd>
@@@ -1494,12 -1506,12 +1501,12 @@@ or a liquid.</dd
  
  <A NAME="ef"><br>
  <hr>
- <h3><!--Idx-->Electric field<!--EIdx-->s</h3>
+ <h3>Electric fields<!--QuietIdx-->electric field<!--EQuietIdx--></h3>
  
  <dl>
 -<dt><b>E_x ; E_y ; E_z:</b></dt>
 +<dt><b>E-x ; E-y ; E-z:</b></dt>
  <dd>If you want to use an electric field in a direction, enter 3 numbers
 -after the appropriate <b>E_*</b>, the first number: the number of cosines,
 +after the appropriate <b>E-*</b>, the first number: the number of cosines,
  only 1 is implemented (with frequency 0) so enter 1,
  the second number: the strength of the electric field in
  <b>V nm<sup>-1</sup></b>,
Simple merge
index 718a2ab03cc73ea6d431b25f90d59ec8802e7e8a,0f7c8c71f0993b18e673649359091aa8b98e5d7d..a22263dac04f4023abc4865bee59e1eea614f806
@@@ -1773,7 -1746,11 +1774,11 @@@ static void read_checkpoint(const char 
              /* lock log file */                
              if (i==0)
              {
 -#if !((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined __CYGWIN__ && !defined __CYGWIN32__) 
+                 /* Note that there are systems where the lock operation
+                  * will succeed, but a second process can also lock the file.
+                  * We should probably try to detect this.
+                  */
 +#ifndef GMX_NATIVE_WINDOWS
                  if (fcntl(fileno(gmx_fio_getfp(chksum_file)), F_SETLK, &fl)
                      ==-1)
  #else
Simple merge
Simple merge
index c4cee2257c988deca87d816842b51054dd7839b9,176077a36e2fd9248bdda4784e2f5e79668cb8e2..449e4d6fcff5bdacfba5acfc070fb478978eda47
  #include "writeps.h"
  #include "macros.h"
  #include "xvgr.h"
 -#include "pppm.h"
  #include "gmxfio.h"
  
+ #ifdef GMX_THREADS
  #include "thread_mpi.h"
+ #endif
  
  #define p2(x) ((x)*(x))
  #define p3(x) ((x)*(x)*(x)) 
index 8d7d3f953da1e822dd2b4be9111681ed606c92f8,59fed9f4207f64b7ccd6ff8501ffa388eca059ac..c640bb5dac989eefa2a9ec9c00a2396ce6aaae40
@@@ -2538,12 -2394,8 +2538,12 @@@ gmx_bool read_tps_conf(const char *infi
    }
    else {
      get_stx_coordnum(infile,&natoms);
-     init_t_atoms(&top->atoms,natoms,FALSE);
+     init_t_atoms(&top->atoms,natoms,(fn2ftp(infile) == efPDB));
 -    bXNULL = (x == NULL);
 +    if (x == NULL)
 +    {
 +        snew(x,1);
 +        bXNULL = TRUE;
 +    }
      snew(*x,natoms);
      if (v)
        snew(*v,natoms);
diff --cc src/kernel/md.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 3295cffbf0cc555a9054c72a14bae7089d72610b,638f2b2bddb7aa1ba0bc076918eb365fb8ec5db4..5b6fa615b44815a0ebb718503bbf243814aec087
@@@ -362,9 -361,8 +362,9 @@@ gmx_shellfc_t init_shell_flexcon(FILE *
              shell[nsi].k    += ffparams->iparams[type].cubic.kb;
              break;
            case F_POLARIZATION:
-             if (qS != atom[aS].qB)
-               gmx_fatal(FARGS,"polarize can not be used with qA != qB");
 +          case F_ANHARM_POL:
+             if (!gmx_within_tol(qS, atom[aS].qB, GMX_REAL_EPS*10))
+               gmx_fatal(FARGS,"polarize can not be used with qA(%e) != qB(%e) for atom %d of molecule block %d", qS, atom[aS].qB, aS+1, mb+1);
              shell[nsi].k    += sqr(qS)*ONE_4PI_EPS0/
                ffparams->iparams[type].polarize.alpha;
              break;
Simple merge
Simple merge
Simple merge
Simple merge