From: Roland Schulz Date: Sat, 28 Jun 2014 05:12:35 +0000 (-0400) Subject: Merge release-5-0 into master X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=899ac8c074216c14a5047987219278b2d038d3d7;p=alexxy%2Fgromacs.git Merge release-5-0 into master 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 --- 899ac8c074216c14a5047987219278b2d038d3d7 diff --cc src/gromacs/fileio/pdbio.h index a8f41a62b3,ab53be3292..241239a8a6 --- a/src/gromacs/fileio/pdbio.h +++ b/src/gromacs/fileio/pdbio.h @@@ -46,16 -47,8 +46,12 @@@ 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 */ diff --cc src/gromacs/gmxana/gmx_mindist.c index c13e907598,8fbb7d3712..6897befaa0 --- a/src/gromacs/gmxana/gmx_mindist.c +++ b/src/gromacs/gmxana/gmx_mindist.c @@@ -45,31 -46,47 +45,48 @@@ #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++) { diff --cc src/gromacs/gmxana/gmx_principal.c index 8e9a2d4629,2e668f05f1..b0ee02ca01 --- a/src/gromacs/gmxana/gmx_principal.c +++ b/src/gromacs/gmxana/gmx_principal.c @@@ -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" diff --cc src/gromacs/gmxlib/checkpoint.cpp index 5cb9a23cdc,825a8968da..05edae3096 --- a/src/gromacs/gmxlib/checkpoint.cpp +++ b/src/gromacs/gmxlib/checkpoint.cpp @@@ -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); + 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 %d.%d", &gmx_major, &gmx_minor); - sscanf(version, "VERSION %d.%d", &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); diff --cc src/gromacs/gmxlib/nonbonded/nb_free_energy.c index 5414c668c6,058b2a87eb..bba7805fb7 --- a/src/gromacs/gmxlib/nonbonded/nb_free_energy.c +++ b/src/gromacs/gmxlib/nonbonded/nb_free_energy.c @@@ -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; diff --cc src/gromacs/gmxpreprocess/grompp.c index 2eef5b7b63,04ee47de40..1aab6bf4ea --- a/src/gromacs/gmxpreprocess/grompp.c +++ b/src/gromacs/gmxpreprocess/grompp.c @@@ -79,14 -86,8 +79,15 @@@ #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[]) { diff --cc src/gromacs/gmxpreprocess/pdb2top.cpp index 9a688ce2db,befb6a6a7f..7b08b863c4 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@@ -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; diff --cc src/gromacs/mdlib/shellfc.c index 8ddbc94859,7c1f8679f4..ffe4469567 --- a/src/gromacs/mdlib/shellfc.c +++ b/src/gromacs/mdlib/shellfc.c @@@ -58,10 -59,6 +58,11 @@@ #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; diff --cc src/programs/mdrun/repl_ex.cpp index 47a3d94e26,46a9bc0113..2fa1ff6d51 --- a/src/programs/mdrun/repl_ex.cpp +++ b/src/programs/mdrun/repl_ex.cpp @@@ -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) {