From b4886ea98352c1eb88358a4864213098b40871eb Mon Sep 17 00:00:00 2001 From: Carlo Camilloni <carlo.camilloni@gmail.com> Date: Mon, 29 Dec 2014 15:15:35 +0100 Subject: [PATCH] GMX5 patch: fix to work with bias-exchange --- CHANGES/v2.1.txt | 1 + .../src/programs/mdrun/repl_ex.c | 25 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGES/v2.1.txt b/CHANGES/v2.1.txt index ee58e6c42..fffe60973 100644 --- a/CHANGES/v2.1.txt +++ b/CHANGES/v2.1.txt @@ -166,6 +166,7 @@ For users: Notice that this bug was introduced in 2.1.0, so that it should not affect the 2.0.x series. - Patching system now checks for the availabity of shared/static/runtime version of plumed before patching +- GMX5 patch was not working for bias-exchange like cases */ diff --git a/patches/gromacs-5.0.diff/src/programs/mdrun/repl_ex.c b/patches/gromacs-5.0.diff/src/programs/mdrun/repl_ex.c index 29d83832c..cfb0b7f35 100644 --- a/patches/gromacs-5.0.diff/src/programs/mdrun/repl_ex.c +++ b/patches/gromacs-5.0.diff/src/programs/mdrun/repl_ex.c @@ -118,14 +118,16 @@ static gmx_bool repl_quantity(const gmx_multisim_t *ms, qall[re->repl] = q; gmx_sum_sim(ms->nsim, qall, ms); - bDiff = FALSE; - for (s = 1; s < ms->nsim; s++) - { - if (qall[s] != qall[0]) - { + /* PLUMED */ + //bDiff = FALSE; + //for (s = 1; s < ms->nsim; s++) + //{ + // if (qall[s] != qall[0]) + // { bDiff = TRUE; - } - } + // } + //} + /* END PLUMED */ if (bDiff) { @@ -275,6 +277,10 @@ gmx_repl_ex_t init_replica_exchange(FILE *fplog, re->ind[i] = i; } + /* PLUMED */ + // plumed2: check if we want alternative patterns (i.e. for bias-exchange metaD) + // in those cases replicas can share the same temperature. + /* if (re->type < ereENDSINGLE) { @@ -283,11 +289,12 @@ gmx_repl_ex_t init_replica_exchange(FILE *fplog, for (j = i+1; j < re->nrepl; j++) { if (re->q[re->type][re->ind[j]] < re->q[re->type][re->ind[i]]) - { + {*/ /* Unordered replicas are supposed to work, but there * is still an issues somewhere. * Note that at this point still re->ind[i]=i. */ + /* gmx_fatal(FARGS, "Replicas with indices %d < %d have %ss %g > %g, please order your replicas on increasing %s", i, j, erename[re->type], @@ -305,6 +312,8 @@ gmx_repl_ex_t init_replica_exchange(FILE *fplog, } } } + */ + /* END PLUMED */ /* keep track of all the swaps, starting with the initial placement. */ snew(re->allswaps, re->nrepl); -- GitLab