Add Selection::hasOnlyAtoms()
[alexxy/gromacs.git] / src / gromacs / selection / selectioncollection.cpp
index 9ac55bcc0256ccc19f6ab8ee504cf128dcff6004..2ba4fb5fe7fc03d3923afea23e75413c3163ebcd 100644 (file)
@@ -775,7 +775,7 @@ SelectionCollection::compile()
         const internal::SelectionData &sel = **iter;
         if (sel.hasFlag(efSelection_OnlyAtoms))
         {
-            if (sel.type() != INDEX_ATOM)
+            if (!sel.hasOnlyAtoms())
             {
                 std::string message = formatString(
                             "Selection '%s' does not evaluate to individual atoms. "