8 #ifndef SWOOSE_QMMM_INTERACTIONTERMELIMINATOR_H
9 #define SWOOSE_QMMM_INTERACTIONTERMELIMINATOR_H
11 #include <Eigen/Sparse>
13 #include <unordered_set>
18 namespace MolecularMechanics {
19 class MolecularMechanicsCalculator;
23 class ImproperDihedralTerm;
26 class HydrogenBondTerm;
27 class InteractionTermBase;
28 class LennardJonesEvaluator;
29 class ElectrostaticEvaluator;
43 std::shared_ptr<MolecularMechanics::MolecularMechanicsCalculator> calculator);
61 void eliminateBondedTerms(std::vector<MolecularMechanics::BondedTerm>& bondedTerms);
64 void eliminateAngleTerms(std::vector<MolecularMechanics::AngleTerm>& angleTerms);
72 void eliminateDihedralTerms(std::vector<MolecularMechanics::DihedralTerm>& dihedralTerms,
bool gaffImproper =
false);
75 void eliminateImproperDihedralTerms(std::vector<MolecularMechanics::ImproperDihedralTerm>& improperDihedralTerms);
78 void eliminateDispersionTerms(std::vector<MolecularMechanics::DispersionTerm>& dispersionTerms);
81 void eliminateRepulsionTerms(std::vector<MolecularMechanics::RepulsionTerm>& repulsionTerms);
87 void eliminateHydrogenBondTerms(std::vector<MolecularMechanics::HydrogenBondTerm>& hydrogenBondTerms);
95 bool electrostaticEmbedding);
102 bool termToEliminate(
const std::vector<int>& atomsInTerm,
int allowedInQmRegion);
106 bool isQmAtom(
int index);
110 void enableTerms(std::vector<T>& terms);
113 template<
typename CalculatorType>
114 void eliminateSharedInteractionTerms(
bool electrostaticEmbedding, CalculatorType& calculator);
117 template<
typename CalculatorType>
118 void enableSharedInteractionTerms(CalculatorType& calculator);
121 std::unordered_set<int> qmAtoms_;
124 std::shared_ptr<MolecularMechanics::MolecularMechanicsCalculator> calculator_;
127 bool eliminateEnvironmentOnlyTerms_ =
false;
129 Eigen::SparseMatrix<bool> originalLJExclusions_;
130 Eigen::SparseMatrix<bool> originalElectrostaticExclusions_;
136 #endif // SWOOSE_QMMM_INTERACTIONTERMELIMINATOR_H
LennardJonesEvaluator LennardJonesEvaluator.h.
Definition: LennardJonesEvaluator.h:34
InteractionTermEliminator(const std::vector< int > &listOfQmAtoms, std::shared_ptr< MolecularMechanics::MolecularMechanicsCalculator > calculator)
Constructor.
Definition: InteractionTermEliminator.cpp:15
This class handles the elimination of MM interaction terms, which are already covered by the QM calcu...
Definition: InteractionTermEliminator.h:39
Base class for all interaction terms.
Definition: InteractionTermBase.h:18
void eliminateInteractionTerms(bool electrostaticEmbedding, bool eliminateEnvironmentOnlyTerms=false)
Eliminates the interactions terms in an MM calculator for QM/MM, which are already covered by the QM ...
Definition: InteractionTermEliminator.cpp:20
void reset()
Enables all of the interactions terms (reverting elimination and therefore resetting the state of the...
Definition: InteractionTermEliminator.cpp:186
Class evaluating the total energy and derivatives from the electrostatic interactions.
Definition: ElectrostaticEvaluator.h:34