ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
Public Member Functions | List of all members
HF::HartreeFock

Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED effects. Can include Sigma (correlations) for valence states. Class stores nuc. and direct potentials, a set of yk integrals, and QED potential. Stores the core orbitals. More...

#include <HartreeFock.hpp>

Public Member Functions

 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. More...
 
EpsIts solve_core (bool print=true)
 Solves HF equations self-consitantly for core orbs. Returns epsilon.
 
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. More...
 
EpsIts hf_valence (DiracSpinor &Fv, const MBPT::CorrelationPotential *const Sigma=nullptr, std::optional< double > eta={}, std::optional< int > prev_its={}) const
 Solves HF equation (+ Sigma) for single valence state.
 
double calculateCoreEnergy () const
 Calculates the HF core energy (not including Breit?)
 
DiracSpinor vexFa (const DiracSpinor &Fa) const
 Calculates exchange term Vex*Fa.
 
DiracSpinor VBr (const DiracSpinor &Fv) const
 Breit interaction V_Br*Fa.
 
const Gridgrid () const
 Resturns a const reference to the radial grid.
 
std::shared_ptr< const Gridgrid_sptr () const
 Resturns copy of shared_ptr to grid [shared resource] - used when we want to construct a new object that shares this grid.
 
const std::vector< double > & vdir () const
 Returns reference to Vdir (direct HF potential)
 
std::vector< double > & vdir ()
 
const std::vector< double > & vnuc () const
 Returns reference to Vnuc (nuclear potential)
 
std::vector< double > & vnuc ()
 
std::vector< double > Hrad_el (int l=0) const
 Electric part of radiative potential.
 
std::vector< double > Hmag (int l=0) const
 Magnetic (off-diagonal) part of radiative potential. Doesn't currently depend on l.
 
std::vector< double > vlocal (int l=0) const
 vlocal = vnuc + vrad_el + vdir
 
Method method () const
 Which method used to solve HF.
 
double zion () const
 Effective charge at large Z : zion = Z - num_core_electrons.
 
bool excludeExchangeQ () const
 Returns true if exchange not included.
 
const std::vector< DiracSpinor > & core () const
 vector of core orbitals
 
double alpha () const
 Value of fine-structure constant used.
 
void set_Vrad (QED::RadPot in_vrad)
 Update the Vrad used inside HF (only used if we want QED into valence but.
 
const QED::RadPotVrad () const
 Get (const) ptr to Vrad - may be null.
 
QED::RadPotVrad ()
 
const HF::BreitvBreit () const
 pointer to Breit - may be nullptr if no breit
 
double x_Breit () const
 Breit scale factor (usualy 0 or 1)
 
int num_core_electrons () const
 Number of electrons in the core.
 

Detailed Description

Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED effects. Can include Sigma (correlations) for valence states. Class stores nuc. and direct potentials, a set of yk integrals, and QED potential. Stores the core orbitals.

Constructor & Destructor Documentation

◆ HartreeFock()

HF::HartreeFock::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.

Required:

  • rgrid: Radial grid (shared pointer)
    • (This is required to allow no core orbitals)
    • Assumed to be same grid as for core orbitals
  • vnuc - nuclear potential
    • Assumed to be same length as radial grid
    • A copy is stored. May be updated Optional:
  • alpha (fine structure constant). default = true value
  • method default = HartreeFock
  • x_Breit - Breit scaling factor. 0=no Breit (default), 1=Breit. may set small number to check for non-linear contributions
  • eps_HF: convergence goal
  • potential: which parametric potential used for initial Potential
  • h and d (or g and t) are parameters for above (if left zero, default will be chosen)
  • Note: Parametric::Type potential (and parameters H,d) are for initial approx. Usually doesn't matter at all, and defaults should be used. If using local potential [method=Local], these are the final parameters. If any are set to zero - will be looked up.

Member Function Documentation

◆ solve_valence()

void HF::HartreeFock::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.

Note: If given energy is set to zero, states assumed to not be existing solutions; initial energy is guessed and solved from scratch. If initial energy is non-zero, that energy is used and states are assumed to already be (approximate) solutions.


The documentation for this class was generated from the following files: