Merge release-5-0 into master
authorRoland Schulz <roland@utk.edu>
Sat, 28 Jun 2014 05:12:35 +0000 (01:12 -0400)
committerRoland Schulz <roland@utk.edu>
Sat, 28 Jun 2014 06:06:41 +0000 (02:06 -0400)
Conflicts:
src/contrib/pmetest.c
src/gromacs/gmxpreprocess/pdb2top.cpp
src/programs/mdrun/repl_ex.cpp

Fixed minor issues in:
src/gromacs/gmxana/gmx_principal.c
src/gromacs/gmxlib/checkpoint.cpp
src/gromacs/gmxlib/nonbonded/nb_free_energy.c
src/gromacs/mdlib/shellfc.c

Change-Id: Idbd2ef28223f8a868ca313f9702c8e6890e6ddc1

69 files changed:
1  2 
CMakeLists.txt
cmake/gmxCFlags.cmake
manual/monster.bib
src/gromacs/CMakeLists.txt
src/gromacs/fileio/libxdrf.c
src/gromacs/fileio/pdbio.c
src/gromacs/fileio/pdbio.h
src/gromacs/fileio/tngio.cpp
src/gromacs/fileio/tpxio.c
src/gromacs/fileio/trx.h
src/gromacs/fileio/trxio.c
src/gromacs/gmxana/anadih.c
src/gromacs/gmxana/gmx_anaeig.c
src/gromacs/gmxana/gmx_analyze.c
src/gromacs/gmxana/gmx_angle.c
src/gromacs/gmxana/gmx_chi.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_density.c
src/gromacs/gmxana/gmx_dos.c
src/gromacs/gmxana/gmx_editconf.c
src/gromacs/gmxana/gmx_enemat.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxana/gmx_genpr.c
src/gromacs/gmxana/gmx_mdmat.c
src/gromacs/gmxana/gmx_mindist.c
src/gromacs/gmxana/gmx_polystat.c
src/gromacs/gmxana/gmx_principal.c
src/gromacs/gmxana/gmx_rama.c
src/gromacs/gmxana/gmx_rms.c
src/gromacs/gmxana/gmx_tcaf.c
src/gromacs/gmxana/gmx_traj.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxana/gmx_vanhove.c
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxlib/bondfree.c
src/gromacs/gmxlib/checkpoint.cpp
src/gromacs/gmxlib/nonbonded/nb_free_energy.c
src/gromacs/gmxlib/nonbonded/nb_generic.c
src/gromacs/gmxlib/nonbonded/nonbonded.c
src/gromacs/gmxlib/txtdump.c
src/gromacs/gmxpreprocess/addconf.c
src/gromacs/gmxpreprocess/grompp.c
src/gromacs/gmxpreprocess/hackblock.c
src/gromacs/gmxpreprocess/pdb2gmx.c
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/readir.c
src/gromacs/gmxpreprocess/readpull.c
src/gromacs/gmxpreprocess/topio.c
src/gromacs/gmxpreprocess/toppush.c
src/gromacs/gmxpreprocess/xlate.c
src/gromacs/legacyheaders/nonbonded.h
src/gromacs/legacyheaders/shellfc.h
src/gromacs/legacyheaders/types/inputrec.h
src/gromacs/mdlib/constr.c
src/gromacs/mdlib/domdec.c
src/gromacs/mdlib/forcerec.c
src/gromacs/mdlib/ns.c
src/gromacs/mdlib/pme.c
src/gromacs/mdlib/shellfc.c
src/gromacs/mdlib/sim_util.c
src/gromacs/mdlib/tables.c
src/gromacs/mdlib/update.c
src/gromacs/mdlib/wall.c
src/gromacs/pulling/pull.c
src/gromacs/tools/compare.c
src/programs/mdrun/md.cpp
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/repl_ex.cpp
src/programs/mdrun/runner.cpp

diff --cc CMakeLists.txt
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index a8f41a62b384d3a9fb7275fa5fcf05ba25ce974a,ab53be32925cc2863acbc36776a5e02db3e4213f..241239a8a6aa27039b43b75b254f9682d9a45a9e
  extern "C" {
  #endif
  
 +struct gmx_atomprop;
 +struct t_atoms;
 +struct t_topology;
 +
  typedef struct gmx_conect_t *gmx_conect;
  
- /* THE pdb format (for ATOM/HETATOM lines) */
- const char* get_pdbformat(void);
- const char* get_pdbformat4(void);
  /* Enumerated type for pdb records. The other entries are ignored
   * when reading a pdb file
   */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c13e907598c98bf30bd0796a7bf1a2b901ae70fd,8fbb7d3712a6b426e4743d5e5b8adebadf2677dd..6897befaa0437f0852e6772de446896d645f0e96
  #include "typedefs.h"
  #include "gromacs/utility/smalloc.h"
  #include "macros.h"
 -#include "vec.h"
 -#include "xvgr.h"
 -#include "pbc.h"
 -#include "gromacs/fileio/futil.h"
 +#include "gromacs/math/vec.h"
 +#include "gromacs/fileio/xvgr.h"
 +#include "viewit.h"
 +#include "gromacs/pbcutil/pbc.h"
 +#include "gromacs/utility/futil.h"
  #include "gromacs/commandline/pargs.h"
 -#include "index.h"
 +#include "gromacs/topology/index.h"
  #include "gromacs/fileio/tpxio.h"
  #include "gromacs/fileio/trxio.h"
 -#include "rmpbc.h"
 +#include "gromacs/pbcutil/rmpbc.h"
  #include "gmx_ana.h"
+ #include "names.h"
  
  
- static void periodic_dist(matrix box, rvec x[], int n, atom_id index[],
+ static void periodic_dist(int ePBC,
+                           matrix box, rvec x[], int n, atom_id index[],
                            real *rmin, real *rmax, int *min_ind)
  {
- #define NSHIFT 26
-     int  sx, sy, sz, i, j, s;
+ #define NSHIFT_MAX 26
+     int  nsz, nshift, sx, sy, sz, i, j, s;
      real sqr_box, r2min, r2max, r2;
-     rvec shift[NSHIFT], d0, d;
+     rvec shift[NSHIFT_MAX], d0, d;
  
-     sqr_box = sqr(min(norm(box[XX]), min(norm(box[YY]), norm(box[ZZ]))));
+     sqr_box = min(norm2(box[XX]), norm2(box[YY]));
+     if (ePBC == epbcXYZ)
+     {
+         sqr_box = min(sqr_box, norm2(box[ZZ]));
+         nsz     = 1;
+     }
+     else if (ePBC == epbcXY)
+     {
+         nsz = 0;
+     }
+     else
+     {
+         gmx_fatal(FARGS, "pbc = %s is not supported by g_mindist",
+                   epbc_names[ePBC]);
+         nsz = 0; /* Keep compilers quiet */
+     }
  
-     s = 0;
-     for (sz = -1; sz <= 1; sz++)
+     nshift = 0;
+     for (sz = -nsz; sz <= nsz; sz++)
      {
          for (sy = -1; sy <= 1; sy++)
          {
Simple merge
index 8e9a2d46299b51c0cb7271d092e2121fc17422ec,2e668f05f11f2cb0f6a112c228515c037b624817..b0ee02ca013400f53eb043bf160b85f59102d8b9
@@@ -53,6 -57,6 +53,7 @@@
  #include "txtdump.h"
  #include "gromacs/fileio/tpxio.h"
  #include "gromacs/fileio/trxio.h"
++#include "gromacs/fileio/xvgr.h"
  #include "gstat.h"
  #include "gmx_ana.h"
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 5cb9a23cdc827fc8abe7417e04b0969fb62f47ce,825a8968dad1cbb59ef6e5b94ce8b750b8019395..05edae309621284e92bdac2e981c4e7284c056b0
@@@ -1780,11 -1789,26 +1780,26 @@@ static void check_match(FILE *fplog
                          ivec dd_nc, ivec dd_nc_f)
  {
      int      npp;
-     gmx_bool mm;
-     mm = FALSE;
+     gmx_bool mm                 = FALSE;
+     gmx_bool patchlevel_differs = FALSE;
+     gmx_bool version_differs    = FALSE;
  
      check_string(fplog, "Version", gmx_version(), version, &mm);
 -        sscanf(gmx_version(), "VERSION %d.%d", &gmx_major, &gmx_minor);
 -        sscanf(version, "VERSION %d.%d", &cpt_major, &cpt_minor);
+     patchlevel_differs = mm;
+     if (patchlevel_differs)
+     {
+         /* Gromacs should be able to continue from checkpoints between
+          * different patch level versions, but we do not guarantee
+          * compatibility between different major/minor versions - check this.
+          */
+         int   gmx_major, gmx_minor;
+         int   cpt_major, cpt_minor;
++        sscanf(gmx_version(), "VERSION %5d.%5d", &gmx_major, &gmx_minor);
++        sscanf(version, "VERSION %5d.%5d", &cpt_major, &cpt_minor);
+         version_differs = (gmx_major != cpt_major || gmx_minor != cpt_minor);
+     }
      check_string(fplog, "Build time", BUILD_TIME, btime, &mm);
      check_string(fplog, "Build user", BUILD_USER, buser, &mm);
      check_string(fplog, "Build host", BUILD_HOST, bhost, &mm);
index 5414c668c6936a22a2238e2a079fba88c91e34ae,058b2a87eb2df4fae11ecc0e39fbded877bb2803..bba7805fb74a88edb74174ec5c280092130a7797
@@@ -164,7 -175,7 +175,6 @@@ gmx_nb_free_energy_kernel(const t_nblis
      bDoPotential        = kernel_data->flags & GMX_NONBONDED_DO_POTENTIAL;
  
      rcoulomb            = fr->rcoulomb;
--    sh_ewald            = fr->ic->sh_ewald;
      rvdw                = fr->rvdw;
      sh_invrc6           = fr->ic->sh_invrc6;
  
Simple merge
Simple merge
index 2eef5b7b63baf691e67e63330d927c7fda4ff653,04ee47de4053d37c9ffca49f81165448a4312224..1aab6bf4eafd20121076baa7e910c71554bf55db
  #include "calc_verletbuf.h"
  #include "tomorse.h"
  #include "gromacs/imd/imd.h"
+ #include "gromacs/utility/cstringutil.h"
  
 +#include "gromacs/commandline/pargs.h"
 +#include "gromacs/pbcutil/pbc.h"
 +#include "gromacs/random/random.h"
 +#include "gromacs/topology/symtab.h"
 +#include "gromacs/topology/topology.h"
 +#include "gromacs/utility/fatalerror.h"
 +#include "gromacs/utility/smalloc.h"
  
  static int rm_interactions(int ifunc, int nrmols, t_molinfo mols[])
  {
Simple merge
Simple merge
index 9a688ce2dbe8ea6b08a96e181a8f7f5701bcb2fd,befb6a6a7ff01f3a912d874a5893680b7dbbf242..7b08b863c42bc69caf7e78d21223ceba7401bb0b
@@@ -441,8 -442,8 +441,8 @@@ void choose_watermodel(const char *wmse
      sfree(model);
  }
  
- static int name2type(t_atoms *at, int **cgnr, gpp_atomtype_t atype,
+ static int name2type(t_atoms *at, int **cgnr,
 -                     t_restp restp[], gmx_residuetype_t rt)
 +                     t_restp restp[], gmx_residuetype_t *rt)
  {
      int         i, j, prevresind, resind, i0, prevcg, cg, curcg;
      char       *name;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 8ddbc94859f6c3b1150e41d49a5398d89a422c78,7c1f8679f44741ccb1d2d16ad8c5842106623e89..ffe4469567ba13ef7bc539a0567b45be8fc3e539
  #include "chargegroup.h"
  #include "macros.h"
  
 +#include "gromacs/math/vec.h"
 +#include "gromacs/pbcutil/mshift.h"
++#include "gromacs/pbcutil/pbc.h"
 +#include "gromacs/utility/fatalerror.h"
 +#include "gromacs/utility/smalloc.h"
  
  typedef struct {
      int     nnucl;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 47a3d94e262f6ac0390d4af0369963edf2149672,46a9bc0113cd1cd6755cca7903cc71128c2386f4..2fa1ff6d51fb26f66350a373da916f6ec6576907
@@@ -898,9 -905,10 +908,9 @@@ test_for_replica_exchange(FIL
      gmx_bool  bEpot    = FALSE;
      gmx_bool  bDLambda = FALSE;
      gmx_bool  bVol     = FALSE;
 -    gmx_rng_t rng;
  
      bMultiEx = (re->nex > 1);  /* multiple exchanges at each state */
-     fprintf(fplog, "Replica exchange at step " "%" GMX_PRId64 " time %g\n", step, time);
 -    fprintf(fplog, "Replica exchange at step " "%"GMX_PRId64 " time %.5f\n", step, time);
++    fprintf(fplog, "Replica exchange at step %" GMX_PRId64 " time %.5f\n", step, time);
  
      if (re->bNPT)
      {
Simple merge