From: Roland Schulz Date: Wed, 14 May 2014 22:08:16 +0000 (-0400) Subject: Fix ref error in constraint pull code X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=4e2fe829bf8f988eeebc11a7dedd464de2e88acf;p=alexxy%2Fgromacs.git Fix ref error in constraint pull code With multiple pull constraints, the convergence check would use the reference distance of the last constraint for all constraints. Change-Id: Ic15d5dd618acc6d3aa5ca0f1e009c6f8096ed0d1 --- diff --git a/src/mdlib/pull.c b/src/mdlib/pull.c index a06f7440aa..ce5961e865 100644 --- a/src/mdlib/pull.c +++ b/src/mdlib/pull.c @@ -688,6 +688,21 @@ static void do_constraint(t_pull *pull, t_mdatoms *md, t_pbc *pbc, { pgrp = &pull->grp[g]; + if (pull->eGeom == epullgPOS) + { + for (m = 0; m < DIM; m++) + { + ref[m] = pgrp->init[m] + pgrp->rate*t*pgrp->vec[m]; + } + } + else + { + ref[0] = pgrp->init[0] + pgrp->rate*t; + /* Keep the compiler happy */ + ref[1] = 0; + ref[2] = 0; + } + get_pullgrps_dr(pull, pbc, g, t, rinew[g], rjnew[PULL_CYL(pull) ? g : 0], -1, unc_ij);