Merge branch release-5-1
[alexxy/gromacs.git] / src / gromacs / mdlib / qmmm.cpp
index 9e04f796f57d427b33cc6afe7b857a3e1ead5f03..98b3a3324411081f70daec3b438a4815b2a95234 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -474,6 +474,15 @@ void init_QMMMrec(t_commrec  *cr,
     t_ilist                 *ilist_mol;
     gmx_mtop_atomlookup_t    alook;
 
+    if (ir->cutoff_scheme != ecutsGROUP)
+    {
+        gmx_fatal(FARGS, "QMMM is currently only supported with cutoff-scheme=group");
+    }
+    if (!EI_DYNAMICS(ir->eI))
+    {
+        gmx_fatal(FARGS, "QMMM is only supported with dynamics");
+    }
+
     c6au  = (HARTREE2KJ*AVOGADRO*gmx::power6(BOHR2NM));
     c12au = (HARTREE2KJ*AVOGADRO*gmx::power12(BOHR2NM));
     /* issue a fatal if the user wants to run with more than one node */