ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
TDHF.hpp
1 #pragma once
2 #include "CorePolarisation.hpp"
3 #include <string>
4 #include <vector>
5 class DiracSpinor;
6 namespace DiracOperator {
7 class TensorOperator;
8 }
9 namespace MBPT {
10 class CorrelationPotential;
11 }
12 
13 namespace HF {
14 class HartreeFock;
15 class Breit;
16 } // namespace HF
17 
18 namespace ExternalField {
19 
22 
40 class TDHF : public CorePolarisation {
41 
42 protected:
43  // dPhi = X exp(-iwt) + Y exp(+iwt)
44  // (H - e - w)X = -(h + dV - de)Phi
45  // (H - e + w)Y = -(h* + dV* - de)Phi
46  // X_c = sum_x X_x,
47  // j(x)=j(c)-k,...,j(c)+k. And: pi(x) = pi(c)*pi(h)
48  std::vector<std::vector<DiracSpinor>> m_X{};
49  std::vector<std::vector<DiracSpinor>> m_Y{};
50  std::vector<std::vector<DiracSpinor>> m_hFcore{};
51  // can just write these to disk! Read them in, continue as per normal
52 
53  const HF::HartreeFock *const p_hf;
54  const std::vector<DiracSpinor> m_core;
55  // const std::vector<double> m_Hmag;
56  const double m_alpha;
57  const HF::Breit *const p_VBr;
58 
59 public:
61  TDHF(const DiracOperator::TensorOperator *const h,
62  const HF::HartreeFock *const hf);
63 
66 
70  virtual void solve_core(const double omega, int max_its = 100,
71  const bool print = true) override;
72 
74  virtual Method method() const override { return Method::TDHF; }
75 
77  virtual void clear() override final;
78 
81  double dV(const DiracSpinor &Fa, const DiracSpinor &Fb, bool conj) const;
82 
85  virtual double dV(const DiracSpinor &Fa,
86  const DiracSpinor &Fb) const override final;
87 
90  DiracSpinor dV_rhs(const int kappa_n, const DiracSpinor &Fm,
91  bool conj = false) const;
92 
94  const std::vector<DiracSpinor> &get_dPsis(const DiracSpinor &Fc,
95  dPsiType XorY) const;
97  const DiracSpinor &get_dPsi_x(const DiracSpinor &Fc, dPsiType XorY,
98  const int kappa_x) const;
99 
101 
114  solve_dPsi(const DiracSpinor &Fv, const double omega, dPsiType XorY,
115  const int kappa_beta,
116  const MBPT::CorrelationPotential *const Sigma = nullptr,
117  StateType st = StateType::ket, bool incl_dV = true) const;
119  std::vector<DiracSpinor>
120  solve_dPsis(const DiracSpinor &Fv, const double omega, dPsiType XorY,
121  const MBPT::CorrelationPotential *const Sigma = nullptr,
122  StateType st = StateType::ket, bool incl_dV = true) const;
123 
124  // //! Writes dPsi (f-component) to textfile
125  // void print(const std::string &ofname = "dPsi.txt") const;
126 
127 private:
128  void initialise_dPsi();
129 
130  // Single iteration of TDHF equations
131  std::pair<double, std::string> tdhf_core_it(double omega, double eta_damp);
132  // Forms set of h*Fc for all core orbitals and all projections
133  std::vector<std::vector<DiracSpinor>> form_hFcore() const;
134  // Solves the MS equations for all projections, single core state
135  void solve_ms_core(std::vector<DiracSpinor> &dFb, const DiracSpinor &Fb,
136  const std::vector<DiracSpinor> &hFbs, const double omega,
137  dPsiType XorY, double eps_ms = 1.0e-9) const;
138 
139 public:
140  TDHF &operator=(const TDHF &) = delete;
141  TDHF(const TDHF &) = default;
142  ~TDHF() = default;
143 };
144 
145 } // namespace ExternalField
General operator (virtual base class); operators derive from this.
Definition: TensorOperator.hpp:110
Stores radial Dirac spinor: F_nk = (f, g)
Definition: DiracSpinor.hpp:41
Virtual Core Polarisation class, for <a||dV||b>. See TDHF, DiagramRPA, etc.
Definition: CorePolarisation.hpp:35
Uses time-dependent Hartree-Fock method to include core-polarisation (RPA) corrections to matrix elem...
Definition: TDHF.hpp:40
virtual void clear() override final
Clears the dPsi orbitals (sets to zero)
Definition: TDHF.cpp:70
const DiracSpinor & get_dPsi_x(const DiracSpinor &Fc, dPsiType XorY, const int kappa_x) const
Returns const reference to dPsi orbital of given kappa.
Definition: TDHF.cpp:87
double dV(const DiracSpinor &Fa, const DiracSpinor &Fb, bool conj) const
Calculate reduced matrix element <a||dV||b> or <a||dV*||b>. Will exclude orbital 'Fexcl' from sum ove...
Definition: TDHF.cpp:328
DiracSpinor dV_rhs(const int kappa_n, const DiracSpinor &Fm, bool conj=false) const
Returns "reduced partial matrix element RHS": dV||Fb}. Note: Fa * dV_rhs(..) equiv to dV(....
Definition: TDHF.cpp:340
TDHF(const DiracOperator::TensorOperator *const h, const HF::HartreeFock *const hf)
Contruct TDHF operator: takes pointer to operator and to HF object.
Definition: TDHF.cpp:22
std::vector< DiracSpinor > solve_dPsis(const DiracSpinor &Fv, const double omega, dPsiType XorY, const MBPT::CorrelationPotential *const Sigma=nullptr, StateType st=StateType::ket, bool incl_dV=true) const
Forms \delta Psi_v for valence state Fv for all kappas (see solve_dPsi)
Definition: TDHF.cpp:96
const std::vector< DiracSpinor > & get_dPsis(const DiracSpinor &Fc, dPsiType XorY) const
Returns const ref to dPsi orbitals for given core orbital Fc.
Definition: TDHF.cpp:77
virtual Method method() const override
Returns RPA method.
Definition: TDHF.hpp:74
DiracSpinor solve_dPsi(const DiracSpinor &Fv, const double omega, dPsiType XorY, const int kappa_beta, const MBPT::CorrelationPotential *const Sigma=nullptr, StateType st=StateType::ket, bool incl_dV=true) const
Forms \delta Psi_v for valence state Fv (including core pol.) - 1 kappa.
Definition: TDHF.cpp:109
virtual void solve_core(const double omega, int max_its=100, const bool print=true) override
Solves TDHF equations self-consistantly for core electrons at frequency omega.
Definition: TDHF.cpp:273
Breit (Hartree-Fock Breit) interaction potential.
Definition: Breit.hpp:52
Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED ef...
Definition: HartreeFock.hpp:70
Dirac Operators: General + derived.
Definition: GenerateOperator.cpp:12
Calculates many-body corrections (RPA) to matrix elements of external field.
Definition: calcMatrixElements.cpp:14
Functions and classes for Hartree-Fock.
Definition: CI_Integrals.hpp:12
Many-body perturbation theory.
Definition: CI_Integrals.hpp:9