ampsci
High-precision calculations for one- and two-valence atomic systems
ExternalField Namespace Reference

Detailed Description

Calculates many-body corrections (RPA) to matrix elements of external field.

External field: Mixed-states + Core Polarisation.

Classes

class  CorePolarisation
 Virtual Core Polarisation class, for <a||dV||b>. See TDHF, DiagramRPA, etc. More...
 
class  DiagramRPA
 RPA correction to matrix elements, using Diagram technique. More...
 
struct  MEdata
 Small struct to store calculated matrix elements. More...
 
class  TDHF
 Uses TDHF to include core-polarisation (RPA) corrections to matrix elements of an external field operator. More...
 
class  TDHFbasis
 Similar to TDHF, but uses a basis expansion to include core-polarisation (RPA) corrections to matrix elements of an external field. More...
 

Enumerations

enum class  Method {
  TDHF , basis , diagram , none ,
  Error
}
 
enum class  dPsiType { X , Y }
 
enum class  StateType { bra , ket }
 

Functions

std::vector< MEdatacalcMatrixElements (const std::vector< DiracSpinor > &b_orbs, const std::vector< DiracSpinor > &a_orbs, DiracOperator::TensorOperator *const h, CorePolarisation *const dV, double omega, bool each_freq, bool diagonal, bool off_diagonal, bool calculate_both)
 
Coulomb::meTable< double > me_table (const std::vector< DiracSpinor > &a_orbs, const std::vector< DiracSpinor > &b_orbs, const DiracOperator::TensorOperator *h, const CorePolarisation *dV=nullptr, const MBPT::StructureRad *srn=nullptr, std::optional< double > omega={})
 Fills me_table with MEs, <a||h||b> and <b||h||a>. Required to set omega for freq. dependent operators initially.
 
std::unique_ptr< CorePolarisationmake_rpa (const std::string &method, const DiracOperator::TensorOperator *h, const HF::HartreeFock *vhf, bool print, const std::vector< DiracSpinor > &basis, const std::string &identity)
 
std::vector< MEdatacalcMatrixElements (const std::vector< DiracSpinor > &orbs, DiracOperator::TensorOperator *const h, CorePolarisation *const dV=nullptr, double omega=0.0, bool each_freq=false, bool diagonal=true, bool off_diagonal=true, bool calculate_both=false)
 
Coulomb::meTable< double > me_table (const std::vector< DiracSpinor > &a_orbs, const DiracOperator::TensorOperator *h, const CorePolarisation *dV=nullptr, const MBPT::StructureRad *srn=nullptr, std::optional< double > omega={})
 Fills me_table with MEs. Required to set omega for freq. dependent operators initially.
 
Method ParseMethod (std::string_view str)
 
DiracSpinor solveMixedState (const DiracSpinor &Fa, double omega, const std::vector< double > &vl, double alpha, const std::vector< DiracSpinor > &core, const DiracSpinor &Fs, double eps_target=1.0e-9, const MBPT::CorrelationPotential *const Sigma=nullptr, const HF::Breit *const VBr=nullptr, const std::vector< double > &H_mag={})
 Solves Mixed States (TDHF) equation, inhomogenous equation, with Hartree-Fock Hamiltonian, including exchange.
 
void solveMixedState (DiracSpinor &dF, const DiracSpinor &Fa, double omega, const std::vector< double > &vl, double alpha, const std::vector< DiracSpinor > &core, const DiracSpinor &Fs, double eps_target=1.0e-9, const MBPT::CorrelationPotential *const Sigma=nullptr, const HF::Breit *const VBr=nullptr, const std::vector< double > &H_mag={})
 Solves Mixed States (TDHF) equation, inhomogenous equation, staring from existing approximate solition, dF.
 
DiracSpinor solveMixedState (const DiracSpinor &Fa, double omega, const DiracSpinor &Fs, const HF::HartreeFock *const hf, double eps_target=1.0e-9, const MBPT::CorrelationPotential *const Sigma=nullptr)
 Solves Mixed States (TDHF) equation. Overload; takes hf object.
 
void solveMixedState (DiracSpinor &dF, const DiracSpinor &Fa, double omega, const DiracSpinor &Fs, const HF::HartreeFock *const hf, double eps_target=1.0e-9, const MBPT::CorrelationPotential *const Sigma=nullptr)
 Solves Mixed States (TDHF) equation. Overload; takes hf object.
 
DiracSpinor solveMixedState_basis (const DiracSpinor &Fa, const DiracSpinor &hFa, double omega, const std::vector< DiracSpinor > &basis)
 Directly defines dF via explicit sum over basis: mainly for tests. \( \delta F = \sum_n |n\rangle\langle n|h|Fa\rangle / (e_a - e_n + \omega) \).
 

Variables

constexpr bool print_final_eps = false
 
constexpr bool print_each_eps = false
 

Function Documentation

◆ me_table() [1/2]

Coulomb::meTable< double > ExternalField::me_table ( const std::vector< DiracSpinor > &  a_orbs,
const std::vector< DiracSpinor > &  b_orbs,
const DiracOperator::TensorOperator h,
const CorePolarisation dV,
const MBPT::StructureRad srn,
std::optional< double >  omega 
)

Fills me_table with MEs, <a||h||b> and <b||h||a>. Required to set omega for freq. dependent operators initially.

◆ me_table() [2/2]

Coulomb::meTable< double > ExternalField::me_table ( const std::vector< DiracSpinor > &  a_orbs,
const DiracOperator::TensorOperator h,
const CorePolarisation dV = nullptr,
const MBPT::StructureRad srn = nullptr,
std::optional< double >  omega = {} 
)
inline

Fills me_table with MEs. Required to set omega for freq. dependent operators initially.

◆ solveMixedState() [1/4]

DiracSpinor ExternalField::solveMixedState ( const DiracSpinor Fa,
double  omega,
const std::vector< double > &  vl,
double  alpha,
const std::vector< DiracSpinor > &  core,
const DiracSpinor Fs,
double  eps_target = 1.0e-9,
const MBPT::CorrelationPotential *const  Sigma = nullptr,
const HF::Breit *const  VBr = nullptr,
const std::vector< double > &  H_mag = {} 
)

Solves Mixed States (TDHF) equation, inhomogenous equation, with Hartree-Fock Hamiltonian, including exchange.

Solves

\[ (H_{\rm HF} - \epsilon - \omega)\delta\phi + F_S = 0 \]

for \(\delta\phi\) (dF). Typically

\[ F_S = (\hat h + \delta V_h - \delta \varepsilon) \phi. \]

Requires unperturbed orbital, Fa, a local potential (vl = vnuc + vdir), set of core electrons (for exchange). kappa (Dirac Q. number) of solution will have that of Fs. Note sign on hFa (this is \(\hat h \phi\), not \(-\hat h \phi\)). eps_target is convergance goal for solving the inhomogenous dif. equation. Can optionally include Sigma (correlations), Breit, and Magnetic part of QED radiative potential (electric part should be included in vl).

◆ solveMixedState() [2/4]

void ExternalField::solveMixedState ( DiracSpinor dF,
const DiracSpinor Fa,
double  omega,
const std::vector< double > &  vl,
double  alpha,
const std::vector< DiracSpinor > &  core,
const DiracSpinor Fs,
double  eps_target = 1.0e-9,
const MBPT::CorrelationPotential *const  Sigma = nullptr,
const HF::Breit *const  VBr = nullptr,
const std::vector< double > &  H_mag = {} 
)

Solves Mixed States (TDHF) equation, inhomogenous equation, staring from existing approximate solition, dF.

As above [solveMixedState], but starts with existing solution dF (may be 'zero'). If the existing solution is already approximate solution, this allows equation to be solved much quicker.

◆ solveMixedState() [3/4]

DiracSpinor ExternalField::solveMixedState ( const DiracSpinor Fa,
double  omega,
const DiracSpinor hFa,
const HF::HartreeFock *const  hf,
double  eps_target,
const MBPT::CorrelationPotential *const  Sigma 
)

Solves Mixed States (TDHF) equation. Overload; takes hf object.

◆ solveMixedState() [4/4]

void ExternalField::solveMixedState ( DiracSpinor dF,
const DiracSpinor Fa,
double  omega,
const DiracSpinor hFa,
const HF::HartreeFock *const  hf,
double  eps_target,
const MBPT::CorrelationPotential *const  Sigma 
)

Solves Mixed States (TDHF) equation. Overload; takes hf object.

◆ solveMixedState_basis()

DiracSpinor ExternalField::solveMixedState_basis ( const DiracSpinor Fa,
const DiracSpinor hFa,
double  omega,
const std::vector< DiracSpinor > &  basis 
)

Directly defines dF via explicit sum over basis: mainly for tests. \( \delta F = \sum_n |n\rangle\langle n|h|Fa\rangle / (e_a - e_n + \omega) \).