Scine::Sparrow  5.0.0
Library for fast and agile quantum chemical calculations with semiempirical methods.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
NDDODipoleMomentCalculator.h
Go to the documentation of this file.
1 
7 #ifndef SPARROW_NDDODIPOLEMOMENTCALCULATOR_H
8 #define SPARROW_NDDODIPOLEMOMENTCALCULATOR_H
9 
12 #include <Utils/Typenames.h>
13 #include <memory>
14 #include <vector>
15 
16 namespace Scine {
17 namespace Sparrow {
18 class DipoleMatrixCalculator;
25 template<class NDDOMethod>
27  public:
34  static std::unique_ptr<NDDODipoleMomentCalculator<NDDOMethod>> create(NDDOMethod& method,
35  DipoleMatrixCalculator& dipoleMatrixCalculator);
37 
42  Eigen::RowVector3d calculate() const final;
43 
48  void useNDDOApproximation(bool useNDDOApprox);
49 
50  private:
51  // Implementation of the calculate method.
52  Eigen::RowVector3d calculateWithNDDOApproximation(std::vector<double> atomicCharges, Utils::PositionCollection positions,
53  Eigen::MatrixXd densityMatrix, Utils::ElementTypeCollection elements,
54  std::vector<int> nrAOs, std::vector<double> chargeSeparationSP,
55  std::vector<double> chargeSeparationPD) const;
56  Eigen::RowVector3d calculateWithDipoleMatrix(std::vector<double> coreCharges, Utils::PositionCollection positions,
57  Eigen::MatrixXd densityMatrix, Utils::DipoleMatrix dipoleMatrix,
58  Eigen::MatrixXd overlapMatrix,
59  Eigen::RowVector3d dipoleEvaluationCoordinate) const;
60  // Private constructor.
61  NDDODipoleMomentCalculator(NDDOMethod& method, DipoleMatrixCalculator& dipoleMatrixCalculator);
62 
63  NDDOMethod& method_;
64  DipoleMatrixCalculator& dipoleMatrixCalculator_;
65 
66  bool useNDDOApproximation_{true};
67 };
68 
69 } // namespace Sparrow
70 } // namespace Scine
71 
72 #endif // SPARROW_NDDODIPOLEMOMENTCALCULATOR_H
static std::unique_ptr< NDDODipoleMomentCalculator< NDDOMethod > > create(NDDOMethod &method, DipoleMatrixCalculator &dipoleMatrixCalculator)
Factory method for the NDDODipoleMomentCalculator class.
Definition: NDDODipoleMomentCalculator.cpp:32
void useNDDOApproximation(bool useNDDOApprox)
Sets wether to use the NDDO dipole approximation or calculate the dipole from the dipole matrix...
Definition: NDDODipoleMomentCalculator.cpp:140
Interface for the calculation of the electrical dipole moment in a semiempirical method.
Definition: DipoleMomentCalculator.h:20
Interface for the calculation of the dipole matrix in semiempirical methods.
Definition: DipoleMatrixCalculator.h:34
Eigen::RowVector3d calculate() const final
Calculates the molecular electrical dipole moment.
Definition: NDDODipoleMomentCalculator.cpp:38
Class resposible for the calculation of the dipole in the NDDO methods. It must be able to calculate ...
Definition: NDDODipoleMomentCalculator.h:26