2 #include "Coulomb/YkTable.hpp"
3 #include "HF/Breit.hpp"
4 #include "Physics/Parametric_potentials.hpp"
5 #include "Physics/PhysConst_constants.hpp"
6 #include "Physics/RadPot.hpp"
14 class CorrelationPotential;
27 friend bool operator<(
const EpsIts &l,
const EpsIts &r) {
52 const std::vector<DiracSpinor> &core,
53 int k_cut = 99,
double lambda_cut = 0.003);
73 std::shared_ptr<const Grid> m_rgrid;
74 std::vector<DiracSpinor> m_core;
75 std::vector<double> m_vnuc;
76 std::optional<QED::RadPot> m_vrad;
77 std::optional<HF::Breit> m_VBr;
81 std::vector<double> m_vdir;
83 int m_max_hf_its = 128;
109 HartreeFock(std::shared_ptr<const Grid> rgrid, std::vector<double>
vnuc,
110 std::vector<DiracSpinor>
core,
111 std::optional<QED::RadPot> vrad = std::nullopt,
115 Parametric::Type potential = Parametric::Type::Green,
116 double H_g = 0.0,
double d_t = 0.0);
127 solve_valence(std::vector<DiracSpinor> *valence,
bool print =
true,
128 const MBPT::CorrelationPotential *
const Sigma =
nullptr)
const;
132 const MBPT::CorrelationPotential *
const Sigma =
nullptr,
133 std::optional<double> eta = std::nullopt,
134 std::optional<int> prev_its = std::nullopt)
const;
142 return ::HF::vexFa(Fa, m_core, 99);
154 std::shared_ptr<const Grid>
grid_sptr()
const {
return m_rgrid; };
157 const std::vector<double> &
vdir()
const {
return m_vdir; }
158 std::vector<double> &
vdir() {
return m_vdir; }
161 const std::vector<double> &
vnuc()
const {
return m_vnuc; }
162 std::vector<double> &
vnuc() {
return m_vnuc; }
165 std::vector<double>
Hrad_el(
int l = 0)
const;
168 std::vector<double>
Hmag(
int l = 0)
const;
171 std::vector<double>
vlocal(
int l = 0)
const;
181 return m_core.empty() ||
182 !(m_method == Method::HartreeFock || m_method == Method::ApproxHF);
186 const std::vector<DiracSpinor> &
core()
const {
return m_core; }
189 double alpha()
const {
return m_alpha; }
201 double x_Breit()
const {
return m_VBr ? m_VBr->scale_factor() : 0.0; }
209 EpsIts solve_initial_core(
const double eps);
212 EpsIts selfcon_local_core(
const double eps_target_HF);
214 EpsIts hf_approx_core(
const double eps_target_HF);
216 EpsIts hartree_fock_core();
241 void hf_orbital_green(
242 DiracSpinor &Fa,
double en,
const std::vector<double> &vl,
243 const std::vector<double> &H_mag,
const DiracSpinor &VxF,
244 const std::vector<DiracSpinor> &static_core,
245 const std::vector<double> &dv0 = {},
const HF::Breit *
const VBr =
nullptr,
246 const MBPT::CorrelationPotential *
const Sigma =
nullptr)
const;
252 enum class ReScale { yes =
true, no =
false };
254 void update_vdir(ReScale re_scale = ReScale::no);
256 void add_KohnSham_vdir_addition();
260 set_parametric_potential(
bool print =
true,
261 Parametric::Type potential = Parametric::Type::Green,
262 double H_g = 0.0,
double d_t = 0.0);
265 void form_approx_vex_core(std::vector<std::vector<double>> &vex)
const;
266 std::vector<std::vector<double>> form_approx_vex_core()
const;
269 std::vector<double> &vex_a)
const;
270 std::vector<double> form_approx_vex_core_a(
const DiracSpinor &Fa)
const;
273 double enGuessCore(
int n,
int ka)
const;
275 double enGuessVal(
int n,
int ka)
const;
Calculates + stores Hartree Y functions + Angular (w/ look-up), taking advantage of symmetry.
Definition: YkTable.hpp:26
Stores radial Dirac spinor: F_nk = (f, g)
Definition: DiracSpinor.hpp:41
Holds grid, including type + Jacobian (dr/du)
Definition: Grid.hpp:31
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
double x_Breit() const
Breit scale factor (usualy 0 or 1)
Definition: HartreeFock.hpp:201
std::vector< double > Hrad_el(int l=0) const
Electric part of radiative potential.
Definition: HartreeFock.cpp:1078
double calculateCoreEnergy() const
Calculates the HF core energy (not including Breit?)
Definition: HartreeFock.cpp:653
const std::vector< double > & vdir() const
Returns reference to Vdir (direct HF potential)
Definition: HartreeFock.hpp:157
std::shared_ptr< const Grid > grid_sptr() const
Resturns copy of shared_ptr to grid [shared resource] - used when we want to construct a new object t...
Definition: HartreeFock.hpp:154
const HF::Breit * vBreit() const
pointer to Breit - may be nullptr if no breit
Definition: HartreeFock.hpp:199
double zion() const
Effective charge at large Z : zion = Z - num_core_electrons.
Definition: HartreeFock.cpp:1162
const std::vector< double > & vnuc() const
Returns reference to Vnuc (nuclear potential)
Definition: HartreeFock.hpp:161
void set_Vrad(QED::RadPot in_vrad)
Update the Vrad used inside HF (only used if we want QED into valence but.
Definition: HartreeFock.hpp:193
double alpha() const
Value of fine-structure constant used.
Definition: HartreeFock.hpp:189
std::vector< double > Hmag(int l=0) const
Magnetic (off-diagonal) part of radiative potential. Doesn't currently depend on l.
Definition: HartreeFock.cpp:1081
HartreeFock(std::shared_ptr< const Grid > rgrid, std::vector< double > vnuc, std::vector< DiracSpinor > core, std::optional< QED::RadPot > vrad=std::nullopt, double m_alpha=PhysConst::alpha, Method method=Method::HartreeFock, double x_Breit=0.0, double eps_HF=0.0, Parametric::Type potential=Parametric::Type::Green, double H_g=0.0, double d_t=0.0)
Method is enum class, eps_HF is convergence goal.
Definition: HartreeFock.cpp:56
Method method() const
Which method used to solve HF.
Definition: HartreeFock.hpp:174
const Grid & grid() const
Resturns a const reference to the radial grid.
Definition: HartreeFock.hpp:151
DiracSpinor vexFa(const DiracSpinor &Fa) const
Calculates exchange term Vex*Fa.
Definition: HartreeFock.hpp:140
const QED::RadPot * Vrad() const
Get (const) ptr to Vrad - may be null.
Definition: HartreeFock.hpp:195
EpsIts hf_valence(DiracSpinor &Fv, const MBPT::CorrelationPotential *const Sigma=nullptr, std::optional< double > eta=std::nullopt, std::optional< int > prev_its=std::nullopt) const
Solves HF equation (+ Sigma) for single valence state.
Definition: HartreeFock.cpp:534
bool excludeExchangeQ() const
Returns true if exchange not included.
Definition: HartreeFock.hpp:180
int num_core_electrons() const
Number of electrons in the core.
Definition: HartreeFock.cpp:710
const std::vector< DiracSpinor > & core() const
vector of core orbitals
Definition: HartreeFock.hpp:186
void solve_valence(std::vector< DiracSpinor > *valence, bool print=true, const MBPT::CorrelationPotential *const Sigma=nullptr) const
Solves HF for given valence list. They need not already be solutions.
Definition: HartreeFock.cpp:144
DiracSpinor VBr(const DiracSpinor &Fv) const
Breit interaction V_Br*Fa.
Definition: HartreeFock.cpp:702
EpsIts solve_core(bool print=true)
Solves HF equations self-consitantly for core orbs. Returns epsilon.
Definition: HartreeFock.cpp:77
std::vector< double > vlocal(int l=0) const
vlocal = vnuc + vrad_el + vdir
Definition: HartreeFock.cpp:696
Class holds Flambaum-Ginges QED Radiative Potential.
Definition: RadPot.hpp:15
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Definition: Wavefunction.hpp:36
Functions and classes for Hartree-Fock.
Definition: CI_Integrals.hpp:12
std::vector< double > vex_approx(const DiracSpinor &Fa, const std::vector< DiracSpinor > &core, int k_cut, const double lambda_cut)
Forms approx (localised) exchange potential, from scratch.
Definition: HartreeFock.cpp:947
Method
Methods available for self-consistant field model.
Definition: HartreeFock.hpp:41
DiracSpinor vexFa(const DiracSpinor &Fa, const std::vector< DiracSpinor > &core, int k_cut)
Calculates V_exch * Fa, for any orbital Fa (calculates Coulomb integral from scratch).
Definition: HartreeFock.cpp:1043
Method parseMethod(const std::string &in_method)
Convers string (name) of method (HartreeFock, Hartree etc.) to enum.
Definition: HartreeFock.cpp:25
Many-body perturbation theory.
Definition: CI_Integrals.hpp:9
constexpr double alpha
fine-structure constant
Definition: PhysConst_constants.hpp:13
Small struct to store: {eps, its, symbol}. eps=convergence; its=iterations; symbol=which state....
Definition: HartreeFock.hpp:23