Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / selection / selection.h
index 2f36c1ecf216453bbe9b575356eab376569c6fb3..55772ffbf50733b756cbed170a330ae7728146a2 100644 (file)
 #include <string>
 #include <vector>
 
-#include "../legacyheaders/typedefs.h"
+#include "gromacs/selection/position.h"
+#include "gromacs/selection/selectionenums.h"
+#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/common.h"
+#include "gromacs/utility/gmxassert.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 +103,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 +324,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