Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
LennardJonesEvaluator.h
Go to the documentation of this file.
1 
8 #ifndef MOLECULARMECHANICS_LENNARDJONESEVALUATOR_H
9 #define MOLECULARMECHANICS_LENNARDJONESEVALUATOR_H
10 
13 #include <Utils/Typenames.h>
14 #include <memory>
15 #include <vector>
16 
17 namespace Scine {
18 
19 namespace Qmmm {
20 class InteractionTermEliminator;
21 } // namespace Qmmm
22 
23 namespace Utils {
24 class DerivativeCollection;
25 } // namespace Utils
26 
27 namespace MolecularMechanics {
28 class GaffParameters;
29 class AtomTypesHolder;
35  public:
39  explicit LennardJonesEvaluator(const Utils::PositionCollection& positions);
43  double evaluate(Utils::DerivativeCollection& derivatives);
48  void setCutOffRadius(std::shared_ptr<double> cutOffRadius);
53  void setParameters(std::shared_ptr<GaffParameters> parameters);
58  void setAtomTypesHolder(std::shared_ptr<AtomTypesHolder> atomTypesHolder);
59 
60  private:
61  // friend class declaration
63  const Utils::PositionCollection& positions_;
64 
66  std::shared_ptr<GaffParameters> parameters_ = nullptr;
68  std::shared_ptr<AtomTypesHolder> atomTypesHolder_ = nullptr;
70  std::shared_ptr<double> cutOffRadius_ = std::make_shared<double>(std::numeric_limits<double>::infinity());
79  double evaluateTermsForAtom(unsigned int atomIndex, Utils::DerivativeCollection& derivatives,
80  const Eigen::SparseVector<bool>& otherAtoms, double scaling);
81 };
82 
83 } // namespace MolecularMechanics
84 } // namespace Scine
85 
86 #endif // MOLECULARMECHANICS_LENNARDJONESEVALUATOR_H
This class keeps track which pair-wise interaction between atoms is scaled. The scaling information i...
Definition: ScaledInteractions.h:22
LennardJonesEvaluator LennardJonesEvaluator.h.
Definition: LennardJonesEvaluator.h:34
void setCutOffRadius(std::shared_ptr< double > cutOffRadius)
Set the cut off radius for the electrostatic interactions.
Definition: LennardJonesEvaluator.cpp:85
double evaluate(Utils::DerivativeCollection &derivatives)
This function evaluates and returns the energy for all LJ interactions and updates the derivatives...
Definition: LennardJonesEvaluator.cpp:21
LennardJonesEvaluator(const Utils::PositionCollection &positions)
Constructor from positions.
Definition: LennardJonesEvaluator.cpp:17
This class handles the elimination of MM interaction terms, which are already covered by the QM calcu...
Definition: InteractionTermEliminator.h:39
void setAtomTypesHolder(std::shared_ptr< AtomTypesHolder > atomTypesHolder)
Setter for the atom types.
Definition: LennardJonesEvaluator.cpp:91
void setParameters(std::shared_ptr< GaffParameters > parameters)
Setter for the parameter object.
Definition: LennardJonesEvaluator.cpp:88
This class provides a framework to store exclusions of interactions between atoms. Such exclusions are required for the non-covalent interactions between bonded atoms or to eliminate contributions to the energy for the interaction between QM atoms in QM/MM.
Definition: InteractionExclusion.h:26