Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / selection / selection.h
index 2f36c1ecf216453bbe9b575356eab376569c6fb3..30f060c5577ce72d813cd822faa0207d314d6885 100644 (file)
 #include <string>
 #include <vector>
 
-#include "../legacyheaders/typedefs.h"
-
 #include "../utility/arrayref.h"
 #include "../utility/common.h"
 #include "../utility/gmxassert.h"
 
 #include "position.h"
-#include "indexutil.h"
 #include "selectionenums.h"
 
+struct t_topology;
+
 namespace gmx
 {
 
@@ -105,6 +104,8 @@ class SelectionData
         bool isDynamic() const { return bDynamic_; }
         //! Returns the type of positions in the selection.
         e_index_t type() const { return rawPositions_.m.type; }
+        //! Returns true if the selection only contains positions with a single atom each.
+        bool hasOnlyAtoms() const { return type() == INDEX_ATOM; }
 
         //! Number of positions in the selection.
         int posCount() const { return rawPositions_.count(); }
@@ -324,6 +325,8 @@ class Selection
         bool isDynamic() const { return data().isDynamic(); }
         //! Returns the type of positions in the selection.
         e_index_t type() const { return data().type(); }
+        //! Returns true if the selection only contains positions with a single atom each.
+        bool hasOnlyAtoms() const { return data().hasOnlyAtoms(); }
 
         //! Total number of atoms in the selection.
         int atomCount() const