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
ZeroOrderFock.h
Go to the documentation of this file.
1 
8 #ifndef SPARROW_DFTB_ZEROORDERFOCK_H
9 #define SPARROW_DFTB_ZEROORDERFOCK_H
10 
12 #include <Eigen/Core>
13 
14 namespace Scine {
15 
16 namespace Utils {
17 class SingleParticleEnergies;
18 class AdditiveElectronicContribution;
19 } // namespace Utils
20 
21 namespace Sparrow {
22 
23 namespace dftb {
24 class ZeroOrderMatricesCalculator;
25 
30  public:
31  explicit ZeroOrderFock(ZeroOrderMatricesCalculator& matricesCalculator,
32  const Utils::SingleParticleEnergies& singleParticleEnergies,
33  const Eigen::MatrixXd& energyWeightedDensityMatrix, const int& nElectrons);
34 
35  void initialize() override;
36  void calculateDensityIndependentPart(Utils::DerivativeOrder order) override;
37  void calculateDensityDependentPart(Utils::DerivativeOrder order) override;
38  void finalize(Utils::DerivativeOrder /*order*/) override {
39  }
40  Utils::SpinAdaptedMatrix getMatrix() const override;
41  double calculateElectronicEnergy() const override;
42  void addDerivatives(Utils::AutomaticDifferentiation::DerivativeContainerType<Utils::Derivative::First>& derivatives) const override;
43  void addDerivatives(Utils::AutomaticDifferentiation::DerivativeContainerType<Utils::Derivative::SecondAtomic>& derivatives) const override;
44  void addDerivatives(Utils::AutomaticDifferentiation::DerivativeContainerType<Utils::Derivative::SecondFull>& derivatives) const override;
50  void addDensityDependentElectronicContribution(std::shared_ptr<Utils::AdditiveElectronicContribution> contribution) final;
55  void addDensityIndependentElectronicContribution(std::shared_ptr<Utils::AdditiveElectronicContribution> contribution) final;
56 
57  private:
58  ZeroOrderMatricesCalculator& matricesCalculator_;
59  const Utils::SingleParticleEnergies& singleParticleEnergies_;
60  const Eigen::MatrixXd& energyWeightedDensityMatrix_;
61  const int& nElectrons_;
62  std::vector<std::shared_ptr<Utils::AdditiveElectronicContribution>> densityIndependentContributions_;
63 };
64 
65 } // namespace dftb
66 
67 } // namespace Sparrow
68 } // namespace Scine
69 #endif // SPARROW_DFTB_ZEROORDERFOCK_H
void addDensityDependentElectronicContribution(std::shared_ptr< Utils::AdditiveElectronicContribution > contribution) final
Definition: ZeroOrderFock.cpp:104
Definition: ZeroOrderFock.h:29
This class calculates the matrices resulting from the zeroth order expansion of the DFT energy for th...
Definition: ZeroOrderMatricesCalculator.h:32
void addDensityIndependentElectronicContribution(std::shared_ptr< Utils::AdditiveElectronicContribution > contribution) final
Definition: ZeroOrderFock.cpp:108