Scine::Core  3.0.0
Module management and core interface definitions
 All Classes Files Functions Variables Typedefs Pages
ObjectWithStructure.h
Go to the documentation of this file.
1 
7 #ifndef CORE_OBJECTWITHSTRUCTURE_H
8 #define CORE_OBJECTWITHSTRUCTURE_H
9 
10 #include <Eigen/Core>
11 #include <memory>
12 
13 namespace Scine {
14 namespace Utils {
15 using PositionCollection = Eigen::Matrix<double, Eigen::Dynamic, 3, Eigen::RowMajor>;
16 class AtomCollection;
17 } // namespace Utils
18 namespace Core {
19 
28  public:
29  ObjectWithStructure() = default;
30  virtual ~ObjectWithStructure() = default;
31 
37  virtual void setStructure(const Utils::AtomCollection& structure) = 0;
43  virtual std::unique_ptr<Utils::AtomCollection> getStructure() const = 0;
49  virtual void modifyPositions(Utils::PositionCollection newPositions) = 0;
55  virtual const Utils::PositionCollection& getPositions() const = 0;
56 };
57 
58 } // namespace Core
59 } // namespace Scine
60 
61 #endif // CORE_OBJECTWITHSTRUCTURE_H
virtual std::unique_ptr< Utils::AtomCollection > getStructure() const =0
Returns the molecular structure.
Interface class defining an entity having a molecular structure. This solves the diamond inheritance ...
Definition: ObjectWithStructure.h:27
virtual void modifyPositions(Utils::PositionCollection newPositions)=0
Modifies the atomic coordinates of the molecular structure.
virtual void setStructure(const Utils::AtomCollection &structure)=0
Sets (or changes) the molecular structure.
virtual const Utils::PositionCollection & getPositions() const =0
Getter for the atomic coordinates of the molecular structure.