only issue openmm constrints warning if constrainsta are actually used
authorSzilard Pall <pszilard@cbr.su.se>
Mon, 10 May 2010 13:22:07 +0000 (15:22 +0200)
committerSzilard Pall <pszilard@cbr.su.se>
Mon, 10 May 2010 13:22:07 +0000 (15:22 +0200)
src/kernel/openmm_wrapper.cpp

index 4de2ce74734752ac887b5b0dbead880cf0fcdb00..19c4613bb5cb4cfc97f4534ec241688d0406e9c1 100644 (file)
@@ -499,8 +499,8 @@ static void checkGmxOptions(t_inputrec *ir, gmx_localtop_t *top, t_state *state)
 
     if (ir->opts.annealing[0])
         gmx_fatal(FARGS,"OpenMM does not support simulated annealing.");
-
-    if (ir->eConstrAlg != econtSHAKE)
+    
+    if (top->idef.il[F_CONSTR].nr > 0 && ir->eConstrAlg != econtSHAKE)
         gmx_warning("OpenMM provides contraints as a combination "
                     "of SHAKE, SETTLE and CCMA. Accuracy is based on the SHAKE tolerance set "
                     "by the \"shake_tol\" option.");