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
*/
#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++)
{
#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"
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);
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;
#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[])
{
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;
#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;
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)
{