From b13af0d92ac1dc0acb1d41e1f2172f16786f3bc0 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Tue, 20 Aug 2013 15:53:12 +0200 Subject: [PATCH] corrected grompp constraint/DOF warning with vsites grompp now counts constraints after removing the ones with vsites. Fixes #1322 Change-Id: I1f2b129fa5f4c5f56fea384f2749af833c92eabc --- src/kernel/grompp.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/kernel/grompp.c b/src/kernel/grompp.c index 8f9ad9bdfe..70c2041b7b 100644 --- a/src/kernel/grompp.c +++ b/src/kernel/grompp.c @@ -1530,6 +1530,23 @@ int cmain (int argc, char *argv[]) pr_symtab(debug, 0, "After new_status", &sys->symtab); } + nvsite = 0; + /* set parameters for virtual site construction (not for vsiten) */ + for (mt = 0; mt < sys->nmoltype; mt++) + { + nvsite += + set_vsites(bVerbose, &sys->moltype[mt].atoms, atype, mi[mt].plist); + } + /* now throw away all obsolete bonds, angles and dihedrals: */ + /* note: constraints are ALWAYS removed */ + if (nvsite) + { + for (mt = 0; mt < sys->nmoltype; mt++) + { + clean_vsite_bondeds(mi[mt].plist, sys->moltype[mt].atoms.nr, bRmVSBds); + } + } + if (ir->cutoff_scheme == ecutsVERLET) { fprintf(stderr, "Removing all charge groups because cutoff-scheme=%s\n", @@ -1629,23 +1646,6 @@ int cmain (int argc, char *argv[]) wi); } - nvsite = 0; - /* set parameters for virtual site construction (not for vsiten) */ - for (mt = 0; mt < sys->nmoltype; mt++) - { - nvsite += - set_vsites(bVerbose, &sys->moltype[mt].atoms, atype, mi[mt].plist); - } - /* now throw away all obsolete bonds, angles and dihedrals: */ - /* note: constraints are ALWAYS removed */ - if (nvsite) - { - for (mt = 0; mt < sys->nmoltype; mt++) - { - clean_vsite_bondeds(mi[mt].plist, sys->moltype[mt].atoms.nr, bRmVSBds); - } - } - /* If we are using CMAP, setup the pre-interpolation grid */ if (plist->ncmap > 0) { -- 2.22.0