Reinstantiate unsorted index group check
[alexxy/gromacs.git] / src / gromacs / selection / selectioncollection.cpp
index 400e7d8d3b8f9444f5387e85347da19168202fe9..6237fe0a05a5abb01c1d6c3b5783dfc7b69cd65c 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())