Merge release-5-0 into release-5-1
authorRoland Schulz <roland@utk.edu>
Wed, 8 Jul 2015 07:35:13 +0000 (03:35 -0400)
committerRoland Schulz <roland@utk.edu>
Wed, 8 Jul 2015 17:14:49 +0000 (13:14 -0400)
Conflicts:
src/gromacs/gmxana/gmx_dos.c

Change-Id: I06208bcafb880b9bac3f45050d709fae5eab9a9d

1  2 
src/gromacs/gmxana/gmx_dos.c
src/gromacs/trajectoryanalysis/modules/distance.cpp

index 52a7d9d61ef50703e1d77167b23039cee49b8b36,f14fe882b43b58c7ea53140c74ce42f7bdfb62ba..5ac2090141823f2d2a777fe6b98036675984139b
   * To help us fund GROMACS development, we humbly ask that you cite
   * the research papers on the package. Check out http://www.gromacs.org.
   */
 -#ifdef HAVE_CONFIG_H
 -#include <config.h>
 -#endif
 -#include <stdio.h>
 +#include "gmxpre.h"
 +
  #include <math.h>
 +#include <stdio.h>
 +#include <stdlib.h>
 +#include <string.h>
  
 +#include "gromacs/commandline/pargs.h"
 +#include "gromacs/correlationfunctions/autocorr.h"
 +#include "gromacs/correlationfunctions/integrate.h"
 +#include "gromacs/fft/fft.h"
  #include "gromacs/fileio/confio.h"
 -#include "copyrite.h"
 -#include "gmx_fatal.h"
 -#include "gromacs/fileio/futil.h"
 -#include "gstat.h"
 -#include "macros.h"
 +#include "gromacs/fileio/trxio.h"
 +#include "gromacs/fileio/xvgr.h"
 +#include "gromacs/gmxana/gmx_ana.h"
 +#include "gromacs/legacyheaders/copyrite.h"
 +#include "gromacs/legacyheaders/macros.h"
 +#include "gromacs/legacyheaders/txtdump.h"
 +#include "gromacs/legacyheaders/typedefs.h"
 +#include "gromacs/legacyheaders/viewit.h"
 +#include "gromacs/math/units.h"
  #include "gromacs/math/utilities.h"
 -#include "physics.h"
 -#include "index.h"
 +#include "gromacs/math/vec.h"
++#include "gromacs/topology/index.h"
 +#include "gromacs/utility/fatalerror.h"
 +#include "gromacs/utility/futil.h"
  #include "gromacs/utility/smalloc.h"
 -#include "gromacs/commandline/pargs.h"
 -#include <string.h>
 -#include "sysstuff.h"
 -#include "txtdump.h"
 -#include "typedefs.h"
 -#include "vec.h"
 -#include "xvgr.h"
 -#include "correl.h"
  #include "gmx_ana.h"
 -#include "gromacs/fft/fft.h"
 -#include "gromacs/fileio/trxio.h"
  
  enum {
      VACF, MVACF, DOS, DOS_SOLID, DOS_DIFF, DOS_CP, DOS_S, DOS_A, DOS_E, DOS_NR
@@@ -343,17 -338,20 +339,20 @@@ int gmx_dos(int argc, char *argv[]
      please_cite(fplog, "Pascal2011a");
      please_cite(fplog, "Caleman2011b");
  
-     read_tps_conf(ftp2fn(efTPR, NFILE, fnm), title, &top, &ePBC, NULL, NULL, box,
-                   TRUE);
 -    read_tps_conf(ftp2fn(efTPX, NFILE, fnm), title, &top, &ePBC, NULL, NULL, box, TRUE);
++    read_tps_conf(ftp2fn(efTPR, NFILE, fnm), title, &top, &ePBC, NULL, NULL, box, TRUE);
+     /* Handle index groups */
+     get_index(&top.atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &grpNatoms, &index, &grpname);
      V     = det(box);
      tmass = 0;
-     for (i = 0; (i < top.atoms.nr); i++)
+     for (i = 0; i < grpNatoms; i++)
      {
-         tmass += top.atoms.atom[i].m;
+         tmass += top.atoms.atom[index[i]].m;
      }
  
-     Natom = top.atoms.nr;
-     Nmol  = top.mols.nr;
+     Natom = grpNatoms;
+     Nmol  = calcMoleculesInIndexGroup(&top.mols, top.atoms.nr, index, grpNatoms);
      gnx   = Natom*DIM;
  
      /* Correlation stuff */