corrected grompp rvdw charge-group radii check
authorBerk Hess <hess@kth.se>
Thu, 14 Mar 2013 11:13:09 +0000 (12:13 +0100)
committerBerk Hess <hess@kth.se>
Thu, 14 Mar 2013 11:13:09 +0000 (12:13 +0100)
The grompp note for charge-group radii larger than the buffer size
for VdW interactions only checked for rlist, not rlistlong.
Fixes #1164

Change-Id: I85a615e6c004503440bcae52c220540a843107d0

src/kernel/readir.c

index e984b2e58ad683b7e4af6a815bdb8fa581d05e5d..4b322fda19126b5ac28aeedd66a83250488663dd 100644 (file)
@@ -3806,11 +3806,12 @@ void check_chargegroup_radii(const gmx_mtop_t *mtop, const t_inputrec *ir,
              * not be zero at the cut-off.
              */
             if (EVDW_IS_ZERO_AT_CUTOFF(ir->vdwtype) &&
-                rvdw1 + rvdw2 > ir->rlist - ir->rvdw)
+                rvdw1 + rvdw2 > ir->rlistlong - ir->rvdw)
             {
-                sprintf(warn_buf, "The sum of the two largest charge group radii (%f) is larger than rlist (%f) - rvdw (%f)\n",
+                sprintf(warn_buf, "The sum of the two largest charge group radii (%f) is larger than %s (%f) - rvdw (%f)\n",
                         rvdw1+rvdw2,
-                        ir->rlist, ir->rvdw);
+                        ir->rlistlong > ir->rlist ? "rlistlong" : "rlist",
+                        ir->rlistlong, ir->rvdw);
                 if (ir_NVE(ir))
                 {
                     warning(wi, warn_buf);