Scine::Swoose  2.1.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;
34  MolecularMechanicsCalculator(const MolecularMechanicsCalculator& rhs) : CloneInterface(rhs){};
39  std::unique_ptr<Utils::AtomCollection> getStructure() const override;
44  void modifyPositions(Utils::PositionCollection newPositions) override;
48  const Utils::PositionCollection& getPositions() const override;
54  void setRequiredProperties(const Utils::PropertyList& requiredProperties) override;
62  Utils::PropertyList possibleProperties() const override;
67  Utils::Settings& settings() override;
72  const Utils::Settings& settings() const override;
77  Utils::Results& results() override;
82  const Utils::Results& results() const override;
88  bool supportsMethodFamily(const std::string& methodFamily) const override;
93  std::shared_ptr<Core::State> getState() const final;
98  void loadState(std::shared_ptr<Core::State> /*state*/) final;
102  const std::vector<double>& atomicCharges() const;
106  const std::vector<std::list<int>>& listsOfNeighbors() const;
111  bool allowsPythonGILRelease() const override {
112  return true;
113  };
114 
115  protected:
116  std::unique_ptr<Utils::Settings> settings_;
117  Utils::AtomCollection structure_;
118  Utils::PropertyList requiredProperties_;
119  Utils::Results results_;
120  std::vector<std::list<int>> listsOfNeighbors_;
121  std::vector<double> atomicCharges_;
122 };
123 
124 } // namespace MolecularMechanics
125 } // namespace Scine
126 
127 #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:62
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:38
Utils::Results & results() override
Accessor for the saved instance of Utils::Results.
Definition: MolecularMechanicsCalculator.cpp:54
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:66
bool allowsPythonGILRelease() const override
Whether the calculator has no underlying Python code and can therefore release the global interpreter...
Definition: MolecularMechanicsCalculator.h:111
std::shared_ptr< Core::State > getState() const final
Implements Core::StateHandableObject::getState().
Definition: MolecularMechanicsCalculator.cpp:70
const std::vector< double > & atomicCharges() const
Const accessor for the atomic charges.
Definition: MolecularMechanicsCalculator.cpp:58
Utils::Settings & settings() override
Accessor for the settings.
Definition: MolecularMechanicsCalculator.cpp:46