Merge branch release-2016
[alexxy/gromacs.git] / src / gromacs / taskassignment / resourcedivision.cpp
index 541cd79d03dc74957afe032fe08020326f3477e9..fecba7db1f3a23f016287c401e1c8113f9a1367e 100644 (file)
@@ -60,6 +60,7 @@
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/taskassignment/hardwareassign.h"
+#include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/baseversion.h"
 #include "gromacs/utility/fatalerror.h"
@@ -382,6 +383,8 @@ int get_nthreads_mpi(const gmx_hw_info_t    *hwinfo,
         checker.applyConstraint(inputrec->eI == eiLBFGS, "L-BFGS minimization");
         checker.applyConstraint(inputrec->coulombtype == eelEWALD, "Plain Ewald electrostatics");
         checker.applyConstraint(doMembed, "Membrane embedding");
+        bool useOrientationRestraints = (gmx_mtop_ftype_count(mtop, F_ORIRES) > 0);
+        checker.applyConstraint(useOrientationRestraints, "Orientation restraints");
         if (checker.mustUseOneRank())
         {
             std::string message = checker.getMessage();