Fixed shells with particle decomposition
authorBerk Hess <hess@kth.se>
Fri, 20 Jun 2014 05:33:57 +0000 (07:33 +0200)
committerBerk Hess <hess@kth.se>
Fri, 20 Jun 2014 07:17:03 +0000 (09:17 +0200)
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

index 0acd97530215a7272ad0a650b4fdbf98fef04497..c5cb07e29092e62b7d7b1d6044bf172d0b34e962 100644 (file)
@@ -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);
         }