From 0b396d5fccc6f838f95db4ceba5d54dea8e97374 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Fri, 20 Jun 2014 07:33:57 +0200 Subject: [PATCH] Fixed shells with particle decomposition In the spirit of version 5.0, the recent Verlet scheme fix for shells, commit debd482d, removed the support for PD. Now it's back. Refs #1429. Change-Id: I686d4287ec8946e418aa98e739a1a81a0b7f7055 --- src/mdlib/shellfc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mdlib/shellfc.c b/src/mdlib/shellfc.c index 0acd975302..c5cb07e290 100644 --- a/src/mdlib/shellfc.c +++ b/src/mdlib/shellfc.c @@ -1013,8 +1013,15 @@ int relax_shell_flexcon(FILE *fplog, t_commrec *cr, gmx_bool bVerbose, } else { - cg0 = 0; - cg1 = top->cgs.nr; + if (PARTDECOMP(cr)) + { + pd_cg_range(cr, &cg0, &cg1); + } + else + { + cg0 = 0; + cg1 = top->cgs.nr; + } put_charge_groups_in_box(fplog, cg0, cg1, fr->ePBC, state->box, &(top->cgs), state->x, fr->cg_cm); } -- 2.22.0