Disable cos acceleration for non leap-frog code paths
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / readir.cpp
index 603fae0cdb70794af898c92431a6f6d437502fa8..6595bff142eefec8798a74cefad4c2d81c450c9b 100644 (file)
@@ -1477,6 +1477,12 @@ void check_ir(const char*                   mdparin,
     {
         gmx_fatal(FARGS, "AdResS simulations are no longer supported");
     }
+
+    // cosine acceleration is only supported in leap-frog
+    if (ir->cos_accel != 0.0 && ir->eI != eiMD)
+    {
+        warning_error(wi, "cos-acceleration is only supported by integrator = md");
+    }
 }
 
 /* interpret a number of doubles from a string and put them in an array,