Scine::Swoose  1.0.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
MolecularMechanicsCalculator.h
Go to the documentation of this file.
1 
8 #ifndef MOLECULARMECHANICS_MOLECULARMECHANICSCALCULATOR_H
9 #define MOLECULARMECHANICS_MOLECULARMECHANICSCALCULATOR_H
10 
15 #include <Utils/Settings.h>
17 #include <list>
18 
19 namespace Scine {
20 namespace MolecularMechanics {
21 
28  : public Utils::CloneInterface<Utils::Abstract<MolecularMechanicsCalculator>, Core::Calculator> {
29  public:
31  MolecularMechanicsCalculator() = default;
33  virtual ~MolecularMechanicsCalculator() override = default;
38  std::unique_ptr<Utils::AtomCollection> getStructure() const override;
43  void modifyPositions(Utils::PositionCollection newPositions) override;
47  const Utils::PositionCollection& getPositions() const override;
53  void setRequiredProperties(const Utils::PropertyList& requiredProperties) override;
61  Utils::PropertyList possibleProperties() const override;
66  Utils::Settings& settings() override;
71  const Utils::Settings& settings() const override;
76  Utils::Results& results() override;
81  const Utils::Results& results() const override;
87  bool supportsMethodFamily(const std::string& methodFamily) const override;
92  std::shared_ptr<Core::State> getState() const final;
97  void loadState(std::shared_ptr<Core::State> /*state*/) final;
101  const std::vector<double>& atomicCharges() const;
105  const std::vector<std::list<int>>& listsOfNeighbors() const;
106 
107  protected:
108  std::unique_ptr<Utils::Settings> settings_;
109  Utils::AtomCollection structure_;
110  Utils::PropertyList requiredProperties_;
111  Utils::Results results_;
112  std::vector<std::list<int>> listsOfNeighbors_;
113  std::vector<double> atomicCharges_;
114 };
115 
116 } // namespace MolecularMechanics
117 } // namespace Scine
118 
119 #endif // MOLECULARMECHANICS_MOLECULARMECHANICSCALCULATOR_H
const std::vector< std::list< int > > & listsOfNeighbors() const
Const accessor for the lists of neighbors (the connectivity of the molecular system).
Definition: MolecularMechanicsCalculator.cpp:61
bool supportsMethodFamily(const std::string &methodFamily) const override
Whether the calculator supports a method family.
Definition: MolecularMechanicsCalculator.cpp:13
MolecularMechanicsCalculator()=default
Default Constructor.
virtual ~MolecularMechanicsCalculator() override=default
Default Destructor.
void modifyPositions(Utils::PositionCollection newPositions) override
Allows to modify the positions of the underlying Utils::AtomCollection.
Definition: MolecularMechanicsCalculator.cpp:21
Utils::PropertyList getRequiredProperties() const override
Getter for the properties to calculate.
Definition: MolecularMechanicsCalculator.cpp:37
Utils::Results & results() override
Accessor for the saved instance of Utils::Results.
Definition: MolecularMechanicsCalculator.cpp:53
std::unique_ptr< Utils::AtomCollection > getStructure() const override
Gets the molecular structure as a const Utils::AtomCollection&amp;.
Definition: MolecularMechanicsCalculator.cpp:17
Utils::PropertyList possibleProperties() const override
Returns the list of the possible properties to calculate.
Definition: MolecularMechanicsCalculator.cpp:33
const Utils::PositionCollection & getPositions() const override
Getter for the coordinates of the underlying Utils::AtomCollection.
Definition: MolecularMechanicsCalculator.cpp:25
Base class for the MM methods (currently: SFAM and GAFF).
Definition: MolecularMechanicsCalculator.h:27
void setRequiredProperties(const Utils::PropertyList &requiredProperties) override
Sets the properties to calculate.
Definition: MolecularMechanicsCalculator.cpp:29
void loadState(std::shared_ptr< Core::State >) final
Implements Core::StateHandableObject::loadState().
Definition: MolecularMechanicsCalculator.cpp:65
std::shared_ptr< Core::State > getState() const final
Implements Core::StateHandableObject::getState().
Definition: MolecularMechanicsCalculator.cpp:69
const std::vector< double > & atomicCharges() const
Const accessor for the atomic charges.
Definition: MolecularMechanicsCalculator.cpp:57
Utils::Settings & settings() override
Accessor for the settings.
Definition: MolecularMechanicsCalculator.cpp:45