Merge branch 'release-5-0'
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 15 Dec 2014 23:29:20 +0000 (00:29 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 15 Dec 2014 23:29:20 +0000 (00:29 +0100)
Conflicts:
CMakeLists.txt
Only changes from version numbers and test hashes, not relevant
for master branch

Change-Id: Ia10e2b82a4ffc3ac408813081c15fe6a858a93f3

1  2 
docs/manual/install.tex
src/gromacs/domdec/domdec.cpp
src/gromacs/ewald/long-range-correction.c
src/gromacs/ewald/long-range-correction.h
src/gromacs/gmxana/gmx_tune_pme.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/gmxpreprocess/readpull.c
src/gromacs/mdlib/force.cpp
src/gromacs/mdlib/mdatom.cpp
src/programs/mdrun/runner.cpp

Simple merge
Simple merge
index a71b031dc5970599868571a681c47c3cb267a1e2,a319f0073fbe5f12422d6c1d22fd0f90fd421d27..5a5b96ca3458b54180472d98840e99a837d39aa0
   * 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 <math.h>
 -#include "gromacs/math/utilities.h"
 -#include "typedefs.h"
 -#include "types/commrec.h"
 -#include "vec.h"
 -#include "coulomb.h"
 -#include "gromacs/utility/smalloc.h"
 -#include "physics.h"
 -#include "txtdump.h"
 -#include "gromacs/fileio/futil.h"
 -#include "names.h"
 -#include "macros.h"
 -
 -real calc_ewaldcoeff_q(real rc, real dtol)
 -{
 -    real x = 5, low, high;
 -    int  n, i = 0;
 -
 -
 -    do
 -    {
 -        i++;
 -        x *= 2;
 -    }
 -    while (gmx_erfc(x*rc) > dtol);
 -
 -    n    = i+60; /* search tolerance is 2^-60 */
 -    low  = 0;
 -    high = x;
 -    for (i = 0; i < n; i++)
 -    {
 -        x = (low+high)/2;
 -        if (gmx_erfc(x*rc) > dtol)
 -        {
 -            low = x;
 -        }
 -        else
 -        {
 -            high = x;
 -        }
 -    }
 -    return x;
 -}
 +#include "gmxpre.h"
  
 -static real ewald_function_lj(real x, real rc)
 -{
 -    real xrc, xrc2, xrc4, factor;
 -    xrc  = x*rc;
 -    xrc2 = xrc*xrc;
 -    xrc4 = xrc2*xrc2;
 -#ifdef GMX_DOUBLE
 -    factor = exp(-xrc2)*(1 + xrc2 + xrc4/2.0);
 -#else
 -    factor = expf(-xrc2)*(1 + xrc2 + xrc4/2.0);
 -#endif
 +#include "long-range-correction.h"
  
 -    return factor;
 -}
 -
 -real calc_ewaldcoeff_lj(real rc, real dtol)
 -{
 -    real x = 5, low, high;
 -    int  n, i = 0;
 -
 -    do
 -    {
 -        i++;
 -        x *= 2.0;
 -    }
 -    while (ewald_function_lj(x, rc) > dtol);
 +#include <math.h>
  
 -    n    = i + 60; /* search tolerance is 2^-60 */
 -    low  = 0;
 -    high = x;
 -    for (i = 0; i < n; ++i)
 -    {
 -        x = (low + high) / 2.0;
 -        if (ewald_function_lj(x, rc) > dtol)
 -        {
 -            low = x;
 -        }
 -        else
 -        {
 -            high = x;
 -        }
 -    }
 -    return x;
 -}
 +#include "gromacs/legacyheaders/macros.h"
 +#include "gromacs/legacyheaders/names.h"
 +#include "gromacs/legacyheaders/types/commrec.h"
 +#include "gromacs/legacyheaders/types/forcerec.h"
 +#include "gromacs/math/units.h"
 +#include "gromacs/math/utilities.h"
 +#include "gromacs/math/vec.h"
  
+ /* There's nothing special to do here if just masses are perturbed,
+  * but if either charge or type is perturbed then the implementation
+  * requires that B states are defined for both charge and type, and
+  * does not optimize for the cases where only one changes.
+  *
+  * The parameter vectors for B states are left undefined in atoms2md()
+  * when either FEP is inactive, or when there are no mass/charge/type
+  * perturbations. The parameter vectors for LJ-PME are likewise
+  * undefined when LJ-PME is not active. This works because
+  * bHaveChargeOrTypePerturbed handles the control flow. */
  void ewald_LRcorrection(int start, int end,
                          t_commrec *cr, int thread, t_forcerec *fr,
                          real *chargeA, real *chargeB,
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge