Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
QmmmGradientsEvaluator.h
Go to the documentation of this file.
1 
8 #ifndef SWOOSE_QMMM_QMMMGRADIENTSEVALUATOR_H
9 #define SWOOSE_QMMM_QMMMGRADIENTSEVALUATOR_H
10 
11 #include <Utils/Typenames.h>
12 #include <list>
13 
14 namespace Scine {
15 
16 namespace Utils {
17 class AtomCollection;
18 } // namespace Utils
19 
20 namespace Qmmm {
21 
23  public:
36  QmmmGradientsEvaluator(const Utils::GradientCollection& qmGradients, const Utils::GradientCollection& mmGradients,
37  const Utils::GradientCollection& pcGradients, const std::vector<int>& listOfQmAtoms,
38  const std::vector<int>& mmBoundaryAtoms, const std::vector<std::list<int>>& listsOfNeighbors,
39  const Utils::AtomCollection& fullStructure, const Utils::AtomCollection& qmRegion);
40 
46 
47  private:
48  /*
49  * @brief Adds the gradients contributions arising from the QM-MM boundary to the given QM/MM gradients.
50  */
51  void addBoundaryGradientsContributions(Utils::GradientCollection& qmmmGradients);
52  /*
53  * @brief Calculates the gradient contribution arising from one specific QM-MM boundary.
54  */
55  std::pair<double, double>
56  calculateGradientContributionForOneBoundary(const Eigen::Ref<Eigen::RowVector3d> qmAtomPosition,
57  const Eigen::Ref<Eigen::RowVector3d> mmAtomPosition,
58  const Eigen::Ref<Eigen::RowVector3d> linkAtomPosition,
59  const Eigen::Ref<Eigen::RowVector3d> linkAtomGradient, int dimension);
60 
61  // Several const ref members initiated in the constructor:
62  const Utils::GradientCollection& qmGradients_;
63  const Utils::GradientCollection& mmGradients_;
64  const Utils::GradientCollection& pcGradients_;
65  const std::vector<int>& listOfQmAtoms_;
66  const std::vector<int>& mmBoundaryAtoms_;
67  const std::vector<std::list<int>>& listsOfNeighbors_;
68  const Utils::AtomCollection& fullStructure_;
69  const Utils::AtomCollection& qmRegion_;
70 };
71 
72 } // namespace Qmmm
73 } // namespace Scine
74 
75 #endif // SWOOSE_QMMM_QMMMGRADIENTSEVALUATOR_H
QmmmGradientsEvaluator(const Utils::GradientCollection &qmGradients, const Utils::GradientCollection &mmGradients, const Utils::GradientCollection &pcGradients, const std::vector< int > &listOfQmAtoms, const std::vector< int > &mmBoundaryAtoms, const std::vector< std::list< int >> &listsOfNeighbors, const Utils::AtomCollection &fullStructure, const Utils::AtomCollection &qmRegion)
Constructor.
Definition: QmmmGradientsEvaluator.cpp:14
Definition: QmmmGradientsEvaluator.h:22
Utils::GradientCollection calculateQmmmGradients()
Calculates the QM/MM gradient from all the components given in the constructor.
Definition: QmmmGradientsEvaluator.cpp:30