Class Scine::Core::ObjectWithStructure

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

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&.