File ObjectWithStructure.h¶
- Copyright
This code is licensed under the 3-clause BSD license.
Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.
See LICENSE.txt for details.
-
namespace
Scine
-
namespace
Core
-
class
ObjectWithStructure
Interface class defining an entity having a molecular structure.
This solves the diamond inheritance problem where multiple different classes have a setStructure() method. A derived class cannot know which method to choose from. This way, there is only one setStructure() method.
Subclassed by Scine::Core::Calculator, Scine::Core::WavefunctionOutputGenerator
Public Functions
-
ObjectWithStructure
()¶
-
virtual
~ObjectWithStructure
()¶
-
virtual void
setStructure
(const Utils::AtomCollection &structure) = 0 Sets (or changes) the molecular structure.
- Parameters
structure
: A new Utils::AtomCollection to set.
-
virtual std::unique_ptr<Utils::AtomCollection>
getStructure
() const = 0 Returns the molecular structure.
- Return
The molecular structure as const Utils::AtomCollection&.
-
virtual void
modifyPositions
(Utils::PositionCollection newPositions) = 0 Modifies the atomic coordinates of the molecular structure.
- Parameters
newPositions
: The new atomic coordinates to be assigned to the underlying Utils::AtomCollection.
-
virtual const Utils::PositionCollection &
getPositions
() const = 0 Getter for the atomic coordinates of the molecular structure.
- Return
The atomic coordinates as const Utils::PositionCollection&.
-
-
class
-
namespace