Merge release-5-0 into master
authorRoland Schulz <roland@utk.edu>
Tue, 3 Jun 2014 15:06:20 +0000 (11:06 -0400)
committerRoland Schulz <roland@utk.edu>
Tue, 3 Jun 2014 15:06:20 +0000 (11:06 -0400)
Conflicts:
share/top/gurgle.dat

Change-Id: I95bb9d2ce43ed7fdfe6cfd535e4f88fac9dfb5ea

1  2 
CMakeLists.txt
share/top/gurgle.dat
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxpreprocess/topio.c
src/gromacs/mdlib/coupling.c
src/gromacs/tools/dump.c

diff --combined CMakeLists.txt
index 939754ee61105c4702418f8083c056badb39418d,c06b6248310c1ef632d554f6685ec2c0aa93d2f2..4a07b24e2d29dc0396cb9ce1b1f7e95f991cc6a4
@@@ -54,7 -54,7 +54,7 @@@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CM
  # NOTE: when releasing the "-dev" suffix needs to be stripped off!
  # REGRESSIONTEST_VERSION and REGRESSIONTEST_BRANCH should always be
  # defined.
 -set(PROJECT_VERSION "5.0-rc1-dev")
 +set(PROJECT_VERSION "5.1-dev")
  # If this is a released tarball, "-dev" will not be present in
  # PROJECT_VERSION, and REGRESSIONTEST_VERSION specifies the version
  # number of the regressiontest tarball against which the code tarball
@@@ -64,7 -64,7 +64,7 @@@ set(REGRESSIONTEST_VERSION "5.0-rc1"
  # PROJECT_VERSION, and REGRESSIONTEST_BRANCH specifies the name of the
  # gerrit.gromacs.org branch whose HEAD can test this code, *if* this
  # code contains all recent fixes from the corresponding code branch.
 -set(REGRESSIONTEST_BRANCH "refs/heads/release-5-0")
 +set(REGRESSIONTEST_BRANCH "refs/heads/master")
  
  set(CUSTOM_VERSION_STRING ""
      CACHE STRING "Custom version string (if empty, use hard-coded default)")
@@@ -76,7 -76,7 +76,7 @@@ set(LIBRARY_SOVERSION 0
  set(LIBRARY_VERSION ${LIBRARY_SOVERSION}.0.0)
  # It is a bit irritating, but this has to be set separately for now!
  SET(CPACK_PACKAGE_VERSION_MAJOR "5")
 -SET(CPACK_PACKAGE_VERSION_MINOR "0")
 +SET(CPACK_PACKAGE_VERSION_MINOR "1")
  #SET(CPACK_PACKAGE_VERSION_PATCH "0")
  
  # The numerical gromacs version. It is 40600 for 4.6.0.
@@@ -103,17 -103,15 +103,17 @@@ set(GMX_INSTALL_PREFIX "" CACHE STRING 
  mark_as_advanced(GMX_INSTALL_PREFIX)
  
  include(gmxBuildTypeReference)
 -include(gmxBuildTypeThreadSanitizer)
 +include(gmxBuildTypeProfile)
 +include(gmxBuildTypeTSAN)
 +include(gmxBuildTypeASAN)
  include(gmxBuildTypeReleaseWithAssert)
  
  if(NOT CMAKE_BUILD_TYPE)
 -    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel Reference RelWithAssert." FORCE)
 +    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel Reference RelWithAssert Profile." FORCE)
      # There's no need to offer a user the choice of ThreadSanitizer
      # Set the possible values of build type for cmake-gui
      set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
 -        "MinSizeRel" "RelWithDebInfo" "Reference" "RelWithAssert")
 +        "MinSizeRel" "RelWithDebInfo" "Reference" "RelWithAssert" "Profile")
  endif()
  if(CMAKE_CONFIGURATION_TYPES)
      # Add appropriate GROMACS-specific build types for the Visual
          "List of configuration types"
          FORCE)
  endif()
 -set(build_types_with_explicit_flags RELEASE DEBUG RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL)
 +set(build_types_with_explicit_flags RELEASE DEBUG RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL PROFILE)
  
  enable_language(C)
  enable_language(CXX)
@@@ -218,6 -216,8 +218,8 @@@ gmx_detect_target_architecture(
  if(GMX_CPU_ACCELERATION)
      # Stay compatible with old Jenkins command line options for specific SIMD acceleration
      set(GMX_SIMD "${GMX_CPU_ACCELERATION}" CACHE STRING "SIMD instruction set level and compiler optimization" FORCE)
+     message("You set GMX_CPU_ACCELERATION, which is deprecated, and will be removed in a later version of GROMACS. It is replaced by GMX_SIMD. For now, copying the value from GMX_CPU_ACCELERATION to GMX_SIMD.")
+     # TODO remove all references to GMX_CPU_ACCELERATION in master branch
  endif()
  
  if(NOT GMX_TARGET_MIC)
@@@ -592,7 -592,7 +594,7 @@@ gmx_set_build_information(
  # Note: it's better to not use the later set value of GMX_SIMD because
  # it reflects the system's capability of both compiling and running AVX code.
  # TODO: After merge with 5.0 one could implement a cache variable dependency
- # such that GMX_USE_RDTSCP can change if GMX_CPU_ACCELERATION is changed to AVX
+ # such that GMX_USE_RDTSCP can change if GMX_SIMD is changed to AVX
  # after the first cmake pass.
  if (BUILD_CPU_FEATURES MATCHES "rdtscp" OR GMX_SIMD MATCHES "AVX")
      set(GMX_USE_RDTSCP_DEFAULT_VALUE ON)
diff --combined share/top/gurgle.dat
index 9e997a1d981a0c7b31023b646d9294f02bc69b53,22cea815631341dcefab9df2ef5f573b586e1b8a..1f5aa7406cc69585932c03509af142ebdb197df1
@@@ -1,4 -1,4 +1,4 @@@
- 399
 -401
++402
  If You Want Something Done You Have to Do It Yourself_(Highlander II)
  I Live the Life They Wish They Did_(Tricky)
  Jesus Built My Hotrod_(Ministry)
@@@ -397,4 -397,6 +397,7 @@@ Restraint! What possible restraint?_(Jo
  It was something to at least have a choice of nightmares_(Joseph Conrad)
  You fight, work, sweat, nearly kill yourself, sometimes you do kill yourself, trying to accomplish something - and you can't._(Joseph Conrad)
  And after some more talk we agreed that the wisdom of rats had been grossly overrated, being in fact no greater than that of men_(Joseph Conrad)
 +It's an easy game, just don't let the ball past!_(Szilard Pall)
+ The soul? There's nothing but chemistry here_(Breaking Bad)
+ You got one part of that wrong. This is not meth._(Breaking Bad)
+ It's easy to remember: a half a kT is equal to five fourths of a kJ/mol._(Anders Gabrielsson)
index ca554147d99bc82dde1596b3520a5e59ca4df553,1ea7e0b7fe0345ff8ddcc2a2aecee3e63d4cec6b..62726f169ba85cfa92a9639636435577b0fd046d
  #include <config.h>
  #endif
  
 -#include <string.h>
  #include <math.h>
 +#include <stdlib.h>
 +#include <string.h>
  
  #include "copyrite.h"
  #include "macros.h"
 -#include "sysstuff.h"
 -#include "gromacs/utility/smalloc.h"
  #include "typedefs.h"
  #include "gromacs/fileio/gmxfio.h"
  #include "gromacs/fileio/tpxio.h"
  #include "gromacs/fileio/trxio.h"
  #include "gromacs/fileio/trnio.h"
  #include "gromacs/fileio/tngio_for_tools.h"
 -#include "gromacs/commandline/pargs.h"
 -#include "gromacs/fileio/futil.h"
 +#include "gromacs/utility/futil.h"
  #include "gromacs/fileio/pdbio.h"
  #include "gromacs/fileio/confio.h"
  #include "names.h"
  #include "index.h"
 -#include "vec.h"
 +#include "gromacs/math/vec.h"
  #include "gromacs/fileio/xtcio.h"
 -#include "rmpbc.h"
 -#include "pbc.h"
  #include "viewit.h"
 -#include "xvgr.h"
  #include "gmx_ana.h"
  
 +#include "gromacs/commandline/pargs.h"
 +#include "gromacs/fileio/xvgr.h"
  #include "gromacs/math/do_fit.h"
 -#include "gmx_fatal.h"
 +#include "gromacs/pbcutil/pbc.h"
 +#include "gromacs/pbcutil/rmpbc.h"
 +#include "gromacs/topology/topology.h"
 +#include "gromacs/utility/fatalerror.h"
 +#include "gromacs/utility/smalloc.h"
  
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
@@@ -1033,9 -1032,10 +1033,10 @@@ int gmx_trjconv(int argc, char *argv[]
          {
              /* check if velocities are possible in input and output files */
              ftpin = fn2ftp(in_file);
-             bVels = (ftp == efTRR || ftp == efTRJ || ftp == efGRO || ftp == efG96)
-                 && (ftpin == efTRR || ftpin == efTRJ || ftpin == efGRO || ftpin == efG96 ||
-                     ftpin == efCPT);
+             bVels = (ftp == efTRR || ftp == efTRJ || ftp == efGRO ||
+                      ftp == efG96 || ftp == efTNG)
+                 && (ftpin == efTRR || ftpin == efTRJ || ftpin == efGRO ||
+                     ftpin == efG96 || ftpin == efTNG || ftpin == efCPT);
          }
          if (bSeparate || bSplit)
          {
index 6154ded2c796ea6a6a659a673bf0e06ed85f4e95,e5b97a4d4320dd813de6c441f60b6f57a50867b7..78124c50fb1ef6a21d2ccaef7c78719b7dcdaa11
  #include <config.h>
  #endif
  
 +#include <assert.h>
 +#include <ctype.h>
 +#include <errno.h>
  #include <math.h>
 -#include <sys/types.h>
  #include <stdio.h>
 +#include <stdlib.h>
  #include <string.h>
 -#include <errno.h>
 -#include <ctype.h>
 -#include <assert.h>
  
 -#include "gromacs/fileio/futil.h"
 -#include "sysstuff.h"
 +#include <sys/types.h>
 +
 +#include "gromacs/utility/futil.h"
  #include "typedefs.h"
  #include "gromacs/utility/smalloc.h"
  #include "macros.h"
  #include "gromacs/fileio/gmxfio.h"
  #include "txtdump.h"
 -#include "physics.h"
 +#include "gromacs/math/units.h"
  #include "macros.h"
  #include "names.h"
  #include "gromacs/utility/cstringutil.h"
 -#include "symtab.h"
 -#include "gmx_fatal.h"
 +#include "gromacs/topology/block.h"
 +#include "gromacs/topology/symtab.h"
 +#include "gromacs/topology/topology.h"
 +#include "gromacs/utility/fatalerror.h"
  #include "warninp.h"
  #include "vsite_parm.h"
  
@@@ -176,7 -173,7 +176,7 @@@ double check_mol(gmx_mtop_t *mtop, warn
      char     buf[256];
      int      i, mb, nmol, ri, pt;
      double   q;
-     real     m;
+     real     m, mB;
      t_atoms *atoms;
  
      /* Check mass and charge */
          {
              q += nmol*atoms->atom[i].q;
              m  = atoms->atom[i].m;
+             mB = atoms->atom[i].mB;
              pt = atoms->atom[i].ptype;
              /* If the particle is an atom or a nucleus it must have a mass,
               * else, if it is a shell, a vsite or a bondshell it can have mass zero
               */
-             if ((m <= 0.0) && ((pt == eptAtom) || (pt == eptNucleus)))
+             if (((m <= 0.0) || (mB <= 0.0)) && ((pt == eptAtom) || (pt == eptNucleus)))
              {
                  ri = atoms->atom[i].resind;
-                 sprintf(buf, "atom %s (Res %s-%d) has mass %g\n",
+                 sprintf(buf, "atom %s (Res %s-%d) has mass %g (state A) / %g (state B)\n",
                          *(atoms->atomname[i]),
                          *(atoms->resinfo[ri].name),
                          atoms->resinfo[ri].nr,
-                         m);
+                         m, mB);
                  warning_error(wi, buf);
              }
              else
-             if ((m != 0) && (pt == eptVSite))
+             if (((m != 0) || (mB != 0)) && (pt == eptVSite))
              {
                  ri = atoms->atom[i].resind;
-                 sprintf(buf, "virtual site %s (Res %s-%d) has non-zero mass %g\n"
+                 sprintf(buf, "virtual site %s (Res %s-%d) has non-zero mass %g (state A) / %g (state B)\n"
                          "     Check your topology.\n",
                          *(atoms->atomname[i]),
                          *(atoms->resinfo[ri].name),
                          atoms->resinfo[ri].nr,
-                         m);
+                         m, mB);
                  warning_error(wi, buf);
                  /* The following statements make LINCS break! */
                  /* atoms->atom[i].m=0; */
@@@ -1362,6 -1360,7 +1363,6 @@@ static void generate_qmexcl_moltype(gmx
          j       = 0;
          while (j < molt->ilist[i].nr)
          {
 -            bexcl = FALSE;
              a1    = molt->ilist[i].iatoms[j+1];
              a2    = molt->ilist[i].iatoms[j+2];
              bexcl = ((bQMMM[a1] && bQMMM[a2]) ||
index fd8d11f05372e1f92724e8be257a6223bca25006,0898371728aca74a1a835ed6d9f471378154813f..3eb1d2ff2b354ca15422deba20f5fcff0ba73485
  #include "types/commrec.h"
  #include "gromacs/utility/smalloc.h"
  #include "update.h"
 -#include "vec.h"
 +#include "gromacs/math/vec.h"
  #include "macros.h"
 -#include "physics.h"
 +#include "gromacs/math/units.h"
  #include "names.h"
 -#include "gmx_fatal.h"
 +#include "gromacs/utility/fatalerror.h"
  #include "txtdump.h"
  #include "nrnb.h"
  #include "gromacs/random/random.h"
@@@ -1520,7 -1520,7 +1520,7 @@@ void vrescale_tcoupl(t_inputrec *ir, gm
  
              Ek_new  = vrescale_resamplekin(Ek, Ek_ref, opts->nrdf[i],
                                             opts->tau_t[i]/dt,
-                                            ir->ld_seed, step);
+                                            step, ir->ld_seed);
  
              /* Analytically Ek_new>=0, but we check for rounding errors */
              if (Ek_new <= 0)
diff --combined src/gromacs/tools/dump.c
index 28aa6da5580a676ff649e136d23911154e01d3b2,559328908cf96362d2099f32b5400df04f10243a..cdf422d4ae573639b1ebb32139e9079ac598691b
  #include <config.h>
  #endif
  
 +#include <assert.h>
 +#include <math.h>
  #include <stdio.h>
  #include <string.h>
 -#include <math.h>
 -#include <assert.h>
 -#include "main.h"
 +
  #include "macros.h"
 -#include "gromacs/commandline/pargs.h"
 -#include "sysstuff.h"
  #include "txtdump.h"
 -#include "gmx_fatal.h"
 -#include "gromacs/utility/smalloc.h"
  #include "names.h"
  #include "txtdump.h"
 -#include "gromacs/gmxpreprocess/gmxcpp.h"
  #include "checkpoint.h"
 -#include "mtop_util.h"
 +#include "gromacs/topology/mtop_util.h"
  #include "gromacs/fileio/xtcio.h"
  #include "gromacs/fileio/enxio.h"
  #include "gromacs/fileio/gmxfio.h"
  #include "gromacs/fileio/tpxio.h"
  #include "gromacs/fileio/trnio.h"
 -#include "gromacs/fileio/futil.h"
 +#include "gromacs/utility/futil.h"
  #include "gromacs/fileio/tngio.h"
  #include "gromacs/fileio/tngio_for_tools.h"
  
  #include <unistd.h>
  #endif
  
 -#include "gromacs/linearalgebra/mtxio.h"
 +#include "gromacs/commandline/pargs.h"
 +#include "gromacs/fileio/mtxio.h"
 +#include "gromacs/gmxpreprocess/gmxcpp.h"
  #include "gromacs/linearalgebra/sparsematrix.h"
 -
 +#include "gromacs/utility/fatalerror.h"
 +#include "gromacs/utility/smalloc.h"
  
  static void list_tpx(const char *fn, gmx_bool bShowNumbers, const char *mdpfn,
                       gmx_bool bSysTop)
@@@ -382,6 -384,9 +382,9 @@@ static void list_tng(const char gmx_unu
                  /* Can't write any output because we don't know what
                     arrays are valid. */
                  fprintf(stderr, "\nWARNING: Incomplete frame at time %g, will not write output\n", frame_time);
+             }
+             else
+             {
                  list_tng_inner(fn, (0 == i), values, step, frame_time,
                                 n_values_per_frame, n_atoms, prec, nframe, block_name);
              }