Merge release-4-6 into release-5-0
authorRoland Schulz <roland@utk.edu>
Mon, 26 May 2014 08:49:25 +0000 (04:49 -0400)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 27 May 2014 07:50:27 +0000 (09:50 +0200)
Conflicts:
CMakeLists.txt - fixed use of GMX_CPU_ACCELERATION
src/gromacs/gmxana/gmx_lie.c
src/gromacs/pulling/pull.c

Change-Id: I45a70eee6f7ec4dd922b6c04c740c40f50159a45

CMakeLists.txt
src/gromacs/gmxana/gmx_covar.c
src/gromacs/gmxana/gmx_lie.c
src/gromacs/gmxpreprocess/addconf.c
src/gromacs/gmxpreprocess/grompp.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/mdlib/forcerec.c
src/gromacs/mdlib/md_support.c
src/gromacs/pulling/pull.c
src/programs/mdrun/md.c

index 03f24b6f0ca6e056031a86d5cb99dc4e9dff8f43..4f1f62b6dd27e5f3becd3a12f3f3bbf730691fc0 100644 (file)
@@ -323,6 +323,18 @@ set(EXTRA_CXX_FLAGS "")
 # Run through a number of tests for buggy compilers and other issues
 include(gmxTestCompilerProblems)
 gmx_test_compiler_problems()
+# GMX_SIMD will not be set automatically until the second
+# pass (which is not strictly guaranteed to occur), so putting this
+# check here among logically-related tests is inefficient, but the
+# potential loss is likely zero.
+if(GMX_SIMD STREQUAL "AVX_256"
+        AND CMAKE_COMPILER_IS_GNUCC
+        AND (C_COMPILER_VERSION VERSION_EQUAL "4.6.1"
+            OR CXX_COMPILER_VERSION VERSION_EQUAL "4.6.1"))
+    message(FATAL_ERROR "gcc 4.6.1 has buggy support for AVX, and GROMACS mdrun will not work. If you want simulation performance, use a more recent compiler. Otherwise, use GMX_SIMD=SSE4.1")
+    # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49002
+endif()
+
 
 
 set(PKG_CFLAGS "")
index 501597e9acb7addff70ca18cbb79a2a8eb22395d..c9faa784de876a09870107c1decc63a88341790f 100644 (file)
@@ -556,7 +556,7 @@ int gmx_covar(int argc, char *argv[])
     out = xvgropen(eigvalfile,
                    "Eigenvalues of the covariance matrix",
                    "Eigenvector index", str, oenv);
-    for (i = 0; (i < ndim); i++)
+    for (i = 0; (i < end); i++)
     {
         fprintf (out, "%10d %g\n", (int)i+1, eigenvalues[ndim-1-i]);
     }
@@ -567,6 +567,9 @@ int gmx_covar(int argc, char *argv[])
         if (nframes-1 < ndim)
         {
             end = nframes-1;
+            fprintf(out, "WARNING: there are fewer frames in your trajectory than there are\n");
+            fprintf(out, "degrees of freedom in your system. Only generating the first\n");
+            fprintf(out, "%d out of %d eigenvectors and eigenvalues.\n", end, (int)ndim);
         }
         else
         {
@@ -641,7 +644,7 @@ int gmx_covar(int argc, char *argv[])
     fprintf(out, "Trace of the covariance matrix after diagonalizing: %g\n\n",
             sum);
 
-    fprintf(out, "Wrote %d eigenvalues to %s\n", (int)ndim, eigvalfile);
+    fprintf(out, "Wrote %d eigenvalues to %s\n", (int)end, eigvalfile);
     if (WriteXref == eWXR_YES)
     {
         fprintf(out, "Wrote reference structure to %s\n", eigvecfile);
index 3e29541e9eeda3cb426f9ed9e196542b02827d22..7a9a689cc833cbdc61704f12eba7ec0906dc57dd 100644 (file)
@@ -141,8 +141,13 @@ int gmx_lie(int argc, char *argv[])
 {
     const char        *desc[] = {
         "[THISMODULE] computes a free energy estimate based on an energy analysis",
-        "from. One needs an energy file with the following components:",
-        "Coul (A-B) LJ-SR (A-B) etc."
+        "from nonbonded energies. One needs an energy file with the following components:",
+        "Coul-(A-B) LJ-SR (A-B) etc.[PAR]",
+        "To utilize [TT]g_lie[tt] correctly, two simulations are required: one with the",
+        "molecule of interest bound to its receptor and one with the molecule in water.",
+        "Both need to utilize [TT]energygrps[tt] such that Coul-SR(A-B), LJ-SR(A-B), etc. terms",
+        "are written to the [TT].edr[tt] file. Values from the molecule-in-water simulation",
+        "are necessary for supplying suitable values for -Elj and -Eqq."
     };
     static real        lie_lj = 0, lie_qq = 0, fac_lj = 0.181, fac_qq = 0.5;
     static const char *ligand = "none";
@@ -188,6 +193,7 @@ int gmx_lie(int argc, char *argv[])
 
     ld = analyze_names(nre, enm, ligand);
     snew(fr, 1);
+
     out = xvgropen(ftp2fn(efXVG, NFILE, fnm), "LIE free energy estimate",
                    "Time (ps)", "DGbind (kJ/mol)", oenv);
     while (do_enx(fp, fr))
index e2d7a17e619ec75431ee630e49a3932dc65eb00a..27a3b5b752d35180f8391b9a4ccccc75450cd397 100644 (file)
@@ -434,6 +434,11 @@ void add_conf(t_atoms *atoms, rvec **x, rvec **v, real **r, gmx_bool bSrenew,
             for (j = j0; (j < j1 && nremove < natoms_solvt); j++)
             {
                 jnr = nlist->jjnr[j];
+                if (jnr < 0)
+                {
+                    /* skip padding */
+                    continue;
+                }
                 copy_rvec(x_all[jnr], xj);
 
                 /* Check solvent-protein and solvent-solvent */
index 872c670990c99807997386445ec424ecab86cc7e..b562b5188fd5bc4dbdcb96297521fd9558395e56 100644 (file)
@@ -1619,6 +1619,11 @@ int gmx_grompp(int argc, char *argv[])
         }
     }
 
+    if (nvsite && ir->eI == eiNM)
+    {
+        gmx_fatal(FARGS, "Normal Mode analysis is not supported with virtual sites.\nIf you'd like to help with adding support, we have an open discussion at http://redmine.gromacs.org/issues/879\n");
+    }
+
     if (ir->cutoff_scheme == ecutsVERLET)
     {
         fprintf(stderr, "Removing all charge groups because cutoff-scheme=%s\n",
index 2d206d01dfa03044cfb03d33e9084c932f186427..68a2a71d73129744caa8b6471698f4515461890a 100644 (file)
@@ -1302,6 +1302,12 @@ nd %s",
         }
     }
 
+    if (EI_VV(ir->eI) && IR_TWINRANGE(*ir) && ir->nstlist > 1)
+    {
+        sprintf(warn_buf, "Twin-range multiple time stepping does not work with integrator %s.", ei_names[ir->eI]);
+        warning_error(wi, warn_buf);
+    }
+
     /* IMPLICIT SOLVENT */
     if (ir->coulombtype == eelGB_NOTUSED)
     {
index 67cd36f34184ba820b4ab4a6196dd56fc135078a..8db62ab92d8cc649abe64b7c8ae31f4cefd44611 100644 (file)
@@ -2861,6 +2861,11 @@ void init_forcerec(FILE              *fp,
         gmx_fatal(FARGS, "Switch/shift interaction not supported with Buckingham");
     }
 
+    if (fr->bBHAM && fr->cutoff_scheme == ecutsVERLET)
+    {
+        gmx_fatal(FARGS, "Verlet cutoff-scheme is not supported with Buckingham");
+    }
+
     if (fp)
     {
         fprintf(fp, "Cut-off's:   NS: %g   Coulomb: %g   %s: %g\n",
index 1558e45fa49755ad9f560a6334fbcb0cc841dff2..748768687bb94b1a5bb9cd5c3ced4ddf6cd88e45 100644 (file)
@@ -49,6 +49,7 @@
 #include "macros.h"
 #include "md_logging.h"
 #include "md_support.h"
+#include "names.h"
 
 #include "gromacs/timing/wallcycle.h"
 
@@ -740,6 +741,11 @@ void check_ir_old_tpx_versions(t_commrec *cr, FILE *fplog,
                             "nstdhdl", &ir->fepvals->nstdhdl);
         }
     }
+
+    if (EI_VV(ir->eI) && IR_TWINRANGE(*ir) && ir->nstlist > 1)
+    {
+        gmx_fatal(FARGS, "Twin-range multiple time stepping does not work with integrator %s.", ei_names[ir->eI]);
+    }
 }
 
 void rerun_parallel_comm(t_commrec *cr, t_trxframe *fr,
index b2200918f8fc8212fee8b46725a698c495e10d00..a4500a4d4e24a749eb2ae0e9a0509245787190b5 100644 (file)
@@ -331,7 +331,7 @@ static void low_get_pull_coord_dr(const t_pull *pull,
     }
     if (max_dist2 >= 0 && dr2 > 0.98*0.98*max_dist2)
     {
-        gmx_fatal(FARGS, "Distance between pull groups %d and %d (%f nm) is larger than 0.49 times the box size (%f)",
+        gmx_fatal(FARGS, "Distance between pull groups %d and %d (%f nm) is larger than 0.49 times the box size (%f).\nYou might want to consider using \"pull-geometry = direction-periodic\" instead.\n",
                   pcrd->group[0], pcrd->group[1], sqrt(dr2), sqrt(max_dist2));
     }
 
index e49e19b2f2cccaba65e69df6226a1b4ab8526749..018daf5d0efda975b0ea601a45306acf48843f08 100644 (file)
@@ -334,6 +334,18 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
                                   (DOMAINDECOMP(cr) && !MASTER(cr))) ?
                                  NULL : state_global->x);
 
+    if (shellfc && ir->eI == eiNM)
+    {
+        /* Currently shells don't work with Normal Modes */
+        gmx_fatal(FARGS, "Normal Mode analysis is not supported with shells.\nIf you'd like to help with adding support, we have an open discussion at http://redmine.gromacs.org/issues/879\n");
+    }
+
+    if (vsite && ir->eI == eiNM)
+    {
+        /* Currently virtual sites don't work with Normal Modes */
+        gmx_fatal(FARGS, "Normal Mode analysis is not supported with virtual sites.\nIf you'd like to help with adding support, we have an open discussion at http://redmine.gromacs.org/issues/879\n");
+    }
+
     if (DEFORM(*ir))
     {
         tMPI_Thread_mutex_lock(&deform_init_box_mutex);
@@ -1096,6 +1108,10 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
              * step to combine the long-range forces on these steps.
              * For nstcalclr=1 this is not done, since the forces would have been added
              * directly to the short-range forces already.
+             *
+             * TODO Remove various aspects of VV+twin-range in master
+             * branch, because VV integrators did not ever support
+             * twin-range multiple time stepping with constraints.
              */
             bUpdateDoLR = (fr->bTwinRange && do_per_step(step, ir->nstcalclr));