Scine::Swoose  2.0.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
ElectrostaticEvaluator.h
Go to the documentation of this file.
1 
8 #ifndef MOLECULARMECHANICS_ELECTROSTATICEVALUATOR_H
9 #define MOLECULARMECHANICS_ELECTROSTATICEVALUATOR_H
10 
11 #include "ElectrostaticTerm.h"
12 #include <vector>
13 
14 namespace Scine {
15 
16 namespace Qmmm {
17 class InteractionTermEliminator;
18 } // namespace Qmmm
19 
20 namespace MolecularMechanics {
21 
22 namespace Defaults {
23 static constexpr double defaultAtomicChargesScalingFactor = 1.0;
24 } // namespace Defaults
25 
31  public:
35  ElectrostaticEvaluator(const Utils::PositionCollection& positions, const std::vector<double>& atomicCharges);
43  void setElectrostaticTerms(std::vector<ElectrostaticTerm>&& electrostaticTerms);
47  const std::vector<double>& getAtomicCharges();
48 
52  void setScalingFactor(const double& scalingFactor);
53 
54  private:
55  // friend class declaration
57  const Utils::PositionCollection& positions_;
58  const std::vector<double>& atomicCharges_;
59  std::vector<ElectrostaticTerm> electrostaticTerms_;
60  // Scaling factor applied to each atomic charge.
61  double scalingFactor_ = Defaults::defaultAtomicChargesScalingFactor;
62 };
63 
64 } // namespace MolecularMechanics
65 } // namespace Scine
66 
67 #endif // MOLECULARMECHANICS_ELECTROSTATICEVALUATOR_H
void setScalingFactor(const double &scalingFactor)
Setter for the scaling factor for each atomic charge.
Definition: ElectrostaticEvaluator.cpp:34
This class handles the elimination of MM interaction terms, which are already covered by the QM calcu...
Definition: InteractionTermEliminator.h:38
ElectrostaticEvaluator(const Utils::PositionCollection &positions, const std::vector< double > &atomicCharges)
Constructor from positions and partial atomic charges.
Definition: ElectrostaticEvaluator.cpp:12
void setElectrostaticTerms(std::vector< ElectrostaticTerm > &&electrostaticTerms)
Sets a vector of instances of the ElectrostaticTerm class.
Definition: ElectrostaticEvaluator.cpp:26
const std::vector< double > & getAtomicCharges()
Constant accessor for the partial atomic charges.
Definition: ElectrostaticEvaluator.cpp:30
double evaluate(Utils::FullSecondDerivativeCollection &derivatives)
Function to evaluate and return the total electrostatic energy and update the derivatives.
Definition: ElectrostaticEvaluator.cpp:16
Class evaluating the total energy and derivatives from the electrostatic interactions.
Definition: ElectrostaticEvaluator.h:30