8 #ifndef SWOOSE_QMMM_QMMMCALCULATOR_H
9 #define SWOOSE_QMMM_QMMMCALCULATOR_H
17 namespace MolecularMechanics {
18 class MolecularMechanicsCalculator;
38 static constexpr
const char* model =
"QM-SFAM";
48 void setUnderlyingCalculators(std::shared_ptr<Core::Calculator> qmCalculator, std::shared_ptr<Core::Calculator> mmCalculator);
58 std::unique_ptr<Utils::AtomCollection>
getStructure()
const override;
95 std::string
name()
const override;
126 std::shared_ptr<Core::State>
getState()
const final;
131 void loadState(std::shared_ptr<Core::State> )
final;
141 const Utils::Results& ignoreQmCalculateImpl(std::string description);
145 void applySettings();
149 void applySettingsToUnderlyingCalculators();
156 void prepareTermsForMmCalculator(
bool reducedEnergyCalculation =
false);
160 void setLogForUnderlyingCalculators();
164 std::unique_ptr<Utils::Settings> settings_;
172 std::vector<int> mmBoundaryAtoms_;
174 std::vector<int> listOfQmAtoms_;
176 std::shared_ptr<Core::Calculator> qmCalculator_;
181 bool calculateReducedQmMmEnergy_;
183 std::shared_ptr<MolecularMechanics::MolecularMechanicsCalculator> mmCalculator_;
185 bool electrostaticEmbedding_;
189 std::string qmRegionFile_;
191 std::string chargeRedistributionScheme_;
193 static constexpr
const char* pointChargesFilename_ =
"environment_pointcharges.pc";
203 bool scfConvCriterionIsSet_ =
false;
209 #endif // SWOOSE_QMMM_QMMMCALCULATOR_H
bool supportsMethodFamily(const std::string &methodFamily) const override
Whether the calculator supports a method family.
Definition: QmmmCalculator.cpp:26
Calculator implementing the QM/MM method.
Definition: QmmmCalculator.h:36
const Utils::PositionCollection & getPositions() const override
Getter for the coordinates of the underlying Utils::AtomCollection.
Definition: QmmmCalculator.cpp:215
void setStructure(const Utils::AtomCollection &structure) override
Changes the molecular structure to calculate.
Definition: QmmmCalculator.cpp:102
void loadState(std::shared_ptr< Core::State >) final
Implements Core::StateHandableObject::loadState().
Definition: QmmmCalculator.cpp:262
QmmmCalculator()
Constructor.
Definition: QmmmCalculator.cpp:30
Utils::Settings & settings() override
Accessor for the settings.
Definition: QmmmCalculator.cpp:250
Utils::PropertyList possibleProperties() const override
Returns the list of the possible properties to calculate.
Definition: QmmmCalculator.cpp:242
Utils::PropertyList getRequiredProperties() const override
Getter for the properties to calculate.
Definition: QmmmCalculator.cpp:238
~QmmmCalculator() override
Destructor.
Definition: QmmmCalculator.cpp:320
std::unique_ptr< Utils::AtomCollection > getStructure() const override
Gets the molecular structure as a const Utils::AtomCollection&.
Definition: QmmmCalculator.cpp:191
std::string name() const override
Getter for the name of the Calculator.
Definition: QmmmCalculator.cpp:22
void setUnderlyingCalculators(std::shared_ptr< Core::Calculator > qmCalculator, std::shared_ptr< Core::Calculator > mmCalculator)
Sets the underlying QM and MM calculators.
Definition: QmmmCalculator.cpp:52
std::shared_ptr< Core::State > getState() const final
Implements Core::StateHandableObject::getState().
Definition: QmmmCalculator.cpp:266
const Utils::Results & calculate(std::string description) override
The main function running calculations.
Definition: QmmmCalculator.cpp:92
void setRequiredProperties(const Utils::PropertyList &requiredProperties) override
Sets the properties to calculate.
Definition: QmmmCalculator.cpp:219
Utils::Results & results() override
Accessor for the saved instance of Utils::Results.
Definition: QmmmCalculator.cpp:258
void modifyPositions(Utils::PositionCollection newPositions) override
Allows to modify the positions of the underlying Utils::AtomCollection.
Definition: QmmmCalculator.cpp:195