Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / selection / selectioncollection.cpp
index 577707488d31182b04bc65cbb2c7fb9a2651825b..5b522a1ef45fac14430517a509bd80a7944cfacc 100644 (file)
@@ -568,11 +568,12 @@ SelectionCollection::setIndexGroups(gmx_ana_indexgrps_t *grps)
     impl_->grps_               = grps;
     impl_->bExternalGroupsSet_ = true;
 
-    ExceptionInitializer        errors("Unknown index group references encountered");
+    ExceptionInitializer        errors("Invalid index group reference(s)");
     SelectionTreeElementPointer root = impl_->sc_.root;
     while (root)
     {
         impl_->resolveExternalGroups(root, &errors);
+        root->checkUnsortedAtoms(true, &errors);
         root = root->next;
     }
     if (errors.hasNestedExceptions())