High-precision calculations for one- and two-valence atomic systems
DiracSpinor

ok

Stores radial Dirac spinor: F_nk = (f, g)

\[ \psi_{n\kappa m} = \frac{1}{r} \begin{pmatrix} f_{n\kappa}(r)\,\Omega_{\kappa m}\\ g_{n\kappa}(r)\,\Omega_{-\kappa m} \end{pmatrix}, \quad F_{n\kappa} = \begin{pmatrix} f_{n\kappa}(r)\\ g_{n\kappa}(r) \end{pmatrix} \]

Construction.
Takes in constant n and k=kappa values + grid
  • A shared pointer to the Grid is stored (to avoid many copies of Grid)
Operator Overloads
  • Intuative operator overloads are provided (Fa, Fb are DiracSpinors):
  • v * Fa, where v is a double or vector works the obvious way
  • Fa * Fb = <Fa|Fb>
  • Fa == Fb returns true if {na,ka}=={nb,kb}
  • Fa > Fb : first compares n, and then kappa (via kappa_index)
  • Fa +/- Fb : Adds/subtracts the two spinors (and updates p0/pinf)
  • You can make copies: auto Fnew = Fa
  • And you can re-asign: Fb = Fa (provided Fa and Fb have same n and kappa!)
  • n and kappa are constant, cannot be changed. Avoids angular errors.
  • all 'set_' functions return mutable references to variables

#include <DiracSpinor.hpp>

Public Types

using Index = uint16_t
 Integer type for the compressed (n,kappa) index.
 

Public Member Functions

 DiracSpinor (int in_n, int in_kappa, std::shared_ptr< const Grid > in_rgrid)
 Constructor: Requires n (PQN), kappa (Dirac QN), and grid (shared pointer, as it's a shared resource)
 
int n () const
 Principal quantum number, n.
 
int kappa () const
 Dirac quantum number, kappa.
 
int l () const
 Orbital angular momentum Q number.
 
double jjp1 () const
 j(j+1)
 
int twoj () const
 2j (twice the total angular momentum)
 
int twojp1 () const
 2j+1
 
int parity () const
 (-1)^l, returns +/- 1
 
std::size_t k_index () const
 kappa index (see AtomData)
 
Index nk_index () const
 (n,kappa) index (see AtomData)
 
std::string symbol (bool gnuplot=false) const
 Single-electron term symbol (e.g., 6s_1/2). Gnuplot=true => 6s_{1/2}.
 
std::string shortSymbol () const
 e.g., 6p_1/2 => 6p-, 6p_3/2 => 6p+
 
bool & exotic ()
 Checks if spinor is for "exotic" lepton, or regular electron.
 
bool exotic () const
 Checks if spinor is for "exotic" lepton, or regular electron.
 
bool negativeEnergyStateQ () const
 Returns true if this is a negative-energy state.
 
void set_new_kappa (int new_kappa)
 Changes 'kappa' angular quantum number. Use with caution!
 
const Grid & grid () const
 Resturns a const reference to the radial grid.
 
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 DiracSpinor that shares this grid.
 
double en () const
 Single-particle energy, not including rest energy.
 
double & en ()
 
const std::vector< double > & f () const
 Upper (large) radial component function, f.
 
std::vector< double > & f ()
 
double f (std::size_t i) const
 Upper (large) radial component, f(r_i)
 
double & f (std::size_t i)
 
const std::vector< double > & g () const
 Lower (small) radial component function, g.
 
std::vector< double > & g ()
 
double g (std::size_t i) const
 Lower (small) radial component, g(r_i)
 
double & g (std::size_t i)
 
auto min_pt () const
 First non-zero point (index for f[i])
 
auto & min_pt ()
 
auto max_pt () const
 Effective size(); index after last non-zero point (index for f[i])
 
auto & max_pt ()
 
double r0 () const
 r0 = r[min_pt] (in atomic units)
 
double rinf () const
 rinf = r[max_pt]
 
auto its () const
 Number of iterations until energy convergence (for latest routine only)
 
auto & its ()
 
auto occ_frac () const
 Occupation fraction. =1 for closed shells. =1/(2j+1) for valence.
 
auto & occ_frac ()
 
auto eps () const
 Fractional energy convergence: eps = |(en'-en)/en|.
 
auto & eps ()
 
const DiracSpinor & scale (const double factor)
 Scales DiracSpinor (f and g) by constant.
 
const DiracSpinor & scale (const std::vector< double > &v)
 Scales DiracSpinor (f and g) by function of r.
 
void normalise (double norm_to=1.0)
 By default normalises to 1, but can normalise to other number.
 
void zero_boundaries ()
 Forces f(r) and g(r) to be zero outside of [p0,pinf)
 
double norm () const
 Returns the norm, defined: Norm = Sqrt[<a|a>].
 
double norm2 () const
 Returns the norm^2, defined: Norm2 = <a|a>
 
std::pair< double, double > r0pinfratio () const
 Returns [f[p0]/f_max , f[pinf]/f_max] - for tests.
 
std::vector< double > rho () const
 rho(r) = sum_m |Psi^2|(r) = (2j+1) * x_occ * |F^2|(r)
 
int num_electrons () const
 Number of occupied electrons: (2j+1)*occ_frac.
 
DiracSpinor & operator+= (const DiracSpinor &rhs)
 Adds rhs to this, in place; must have same kappa.
 
DiracSpinor & operator-= (const DiracSpinor &rhs)
 Subtracts rhs from this, in place; must have same kappa.
 
DiracSpinor & operator*= (const double x)
 Scales this by scalar x, in place.
 
DiracSpinor & operator*= (const std::vector< double > &v)
 Multiplies this by function v(r), pointwise, in place.
 
void orthog (const DiracSpinor &rhs)
 A more correct way to force orthogonality than normal.
 

Static Public Member Functions

static bool comp_l (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Comparator (for sorting): by l.
 
static bool comp_j (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Comparator (for sorting): by 2j.
 
static bool comp_ki (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Comparator (for sorting): by kappa_index.
 
static bool comp_n (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Comparator (for sorting): by n.
 
static bool comp_en (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Comparator (for sorting): by energy.
 
static std::pair< double, std::string > check_ortho (const std::vector< DiracSpinor > &a, const std::vector< DiracSpinor > &b)
 Returns worst |<a|b>| (or |<a|b>-1| for a=b) {val, state_names}.
 
static void orthonormaliseOrbitals (std::vector< DiracSpinor > &orbs, int num_its=1)
 (approximately) OrthoNormalises a set of any orbitals
 
static DiracSpinor orthogonaliseWrt (const DiracSpinor &Fin, const std::vector< DiracSpinor > &orbs)
 Forces Fin to be orthogonal to orbs. If Fn (i.e., {n,k}) in in orbs, replaces Fin with that from orbs.
 
static DiracSpinor orthonormaliseWrt (const DiracSpinor &Fin, const std::vector< DiracSpinor > &orbs)
 As orthogonaliseWrt(), but normalises Fin afterwards.
 
static std::string shortSymbol (int n, int kappa)
 e.g., 6p_1/2 => 6p-, 6p_3/2 => 6p+
 
static std::string state_config (const std::vector< DiracSpinor > &orbs)
 Returns formatted states string (e.g., '7sp5d') given list of orbs.
 
static DiracSpinor exactHlike (int n, int k, std::shared_ptr< const Grid > rgrid, double zeff, double alpha=PhysConst::alpha, double mass=1.0)
 Constructs an exact H-like (pointlike Coulomb) DiracSpinor.
 
static DiracSpinor exactHlike_cntm (double en, int k, std::shared_ptr< const Grid > rgrid, double zeff, double alpha=PhysConst::alpha, double mass=1.0)
 Constructs an exact (Dirac-Coulomb) continuum DiracSpinor.
 
static std::vector< DiracSpinor > HlikeBasis (int max_l, int num_ns, std::shared_ptr< const Grid > rgrid, double zeff, double alpha=PhysConst::alpha, double mass=1.0)
 Constructs a basis of H-like (pointlike) DiracSpinors.
 
static std::vector< DiracSpinor > HlikeBasis (const std::string &basis_string, std::shared_ptr< const Grid > rgrid, double zeff, double alpha=PhysConst::alpha, double mass=1.0)
 Constructs a basis of H-like (pointlike) DiracSpinors.
 
static const DiracSpinor * find (int n, int k, const std::vector< DiracSpinor > &orbs)
 Searches for {n,k} in list of orbitals, returns pointer (may be null)
 
static int max_tj (const std::vector< DiracSpinor > &orbs)
 Returns maximum (2j) found in {orbs}.
 
static int max_l (const std::vector< DiracSpinor > &orbs)
 Returns maximum l found in {orbs}.
 
static int max_n (const std::vector< DiracSpinor > &orbs)
 Returns maximum n found in {orbs}.
 
static int max_n (const std::vector< DiracSpinor > &orbs, int kappa)
 Returns maximum n found in {orbs}, for given kappa.
 
static std::size_t max_kindex (const std::vector< DiracSpinor > &orbs)
 Returns maximum kappa_index found in {orbs}.
 
static double max_En (const std::vector< DiracSpinor > &orbs)
 Returns maximum Energy found in {orbs}.
 
static double min_En (const std::vector< DiracSpinor > &orbs)
 Returns maximum Energy found in {orbs}.
 
static std::pair< std::vector< DiracSpinor >, std::vector< DiracSpinor > > split_by_energy (const std::vector< DiracSpinor > &orbitals, double Fermi_energy, int n_min_core=1, int n_max_excited=9999, bool positrons_are_excited=true)
 Splits orbitals into two groups (i.e., core, excited) by energy.
 
static std::pair< std::vector< DiracSpinor >, std::vector< DiracSpinor > > split_by_core (const std::vector< DiracSpinor > &orbitals, const std::vector< DiracSpinor > &core, int n_min_core=1)
 Splits orbitals into two groups (i.e., core, excited)
 
static std::vector< DiracSpinor > subset (const std::vector< DiracSpinor > &basis, const std::string &subset_string, bool exclude_negative_energy=true)
 Takes a subset of an input basis (by copy), according to subset_string.
 

Friends

double operator* (const DiracSpinor &Fa, const DiracSpinor &Fb)
 Returns radial integral (Fa,Fb) = Int(fa*fb + ga*gb)
 
DiracSpinor operator+ (DiracSpinor lhs, const DiracSpinor &rhs)
 Returns lhs + rhs; must have same kappa.
 
DiracSpinor operator- (DiracSpinor lhs, const DiracSpinor &rhs)
 Returns lhs - rhs; must have same kappa.
 
DiracSpinor operator* (DiracSpinor Fa, const double x)
 Returns Fa scaled by scalar x.
 
DiracSpinor operator* (const double x, DiracSpinor Fa)
 Returns Fa scaled by scalar x.
 
DiracSpinor operator* (const std::vector< double > &v, DiracSpinor Fa)
 Returns Fa multiplied by function v(r), pointwise.
 
bool operator== (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Equality: true if {n,kappa} match.
 
bool operator!= (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Inequality: true if {n,kappa} differ.
 
bool operator< (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Ordering: compares n, then kappa (via kappa_index)
 
bool operator> (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Ordering: compares n, then kappa (via kappa_index)
 
bool operator<= (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Ordering: compares n, then kappa (via kappa_index)
 
bool operator>= (const DiracSpinor &lhs, const DiracSpinor &rhs)
 Ordering: compares n, then kappa (via kappa_index)
 
std::ostream & operator<< (std::ostream &ostr, const DiracSpinor &Fa)
 Writes short symbol to ostream.
 

Member Typedef Documentation

◆ Index

using DiracSpinor::Index = uint16_t

Integer type for the compressed (n,kappa) index.

Constructor & Destructor Documentation

◆ DiracSpinor()

DiracSpinor::DiracSpinor ( int  in_n,
int  in_kappa,
std::shared_ptr< const Grid >  in_rgrid 
)

Constructor: Requires n (PQN), kappa (Dirac QN), and grid (shared pointer, as it's a shared resource)

Member Function Documentation

◆ n()

int DiracSpinor::n ( ) const
inline

Principal quantum number, n.

◆ kappa()

int DiracSpinor::kappa ( ) const
inline

Dirac quantum number, kappa.

◆ l()

int DiracSpinor::l ( ) const
inline

Orbital angular momentum Q number.

◆ jjp1()

double DiracSpinor::jjp1 ( ) const
inline

j(j+1)

◆ twoj()

int DiracSpinor::twoj ( ) const
inline

2j (twice the total angular momentum)

◆ twojp1()

int DiracSpinor::twojp1 ( ) const
inline

2j+1

◆ parity()

int DiracSpinor::parity ( ) const
inline

(-1)^l, returns +/- 1

◆ k_index()

std::size_t DiracSpinor::k_index ( ) const
inline

kappa index (see AtomData)

◆ nk_index()

Index DiracSpinor::nk_index ( ) const
inline

(n,kappa) index (see AtomData)

◆ symbol()

std::string DiracSpinor::symbol ( bool  gnuplot = false) const

Single-electron term symbol (e.g., 6s_1/2). Gnuplot=true => 6s_{1/2}.

◆ shortSymbol() [1/2]

std::string DiracSpinor::shortSymbol ( ) const

e.g., 6p_1/2 => 6p-, 6p_3/2 => 6p+

◆ exotic() [1/2]

bool & DiracSpinor::exotic ( )
inline

Checks if spinor is for "exotic" lepton, or regular electron.

◆ exotic() [2/2]

bool DiracSpinor::exotic ( ) const
inline

Checks if spinor is for "exotic" lepton, or regular electron.

◆ negativeEnergyStateQ()

bool DiracSpinor::negativeEnergyStateQ ( ) const

Returns true if this is a negative-energy state.

Warning
Only works for regular alpha and mass = 1 (should fix)

◆ set_new_kappa()

void DiracSpinor::set_new_kappa ( int  new_kappa)

Changes 'kappa' angular quantum number. Use with caution!

◆ grid()

const Grid & DiracSpinor::grid ( ) const
inline

Resturns a const reference to the radial grid.

◆ grid_sptr()

std::shared_ptr< const Grid > DiracSpinor::grid_sptr ( ) const
inline

Resturns copy of shared_ptr to grid [shared resource] - used when we want to construct a new DiracSpinor that shares this grid.

◆ en()

double DiracSpinor::en ( ) const
inline

Single-particle energy, not including rest energy.

◆ f() [1/2]

const std::vector< double > & DiracSpinor::f ( ) const
inline

Upper (large) radial component function, f.

◆ f() [2/2]

double DiracSpinor::f ( std::size_t  i) const
inline

Upper (large) radial component, f(r_i)

◆ g() [1/2]

const std::vector< double > & DiracSpinor::g ( ) const
inline

Lower (small) radial component function, g.

◆ g() [2/2]

double DiracSpinor::g ( std::size_t  i) const
inline

Lower (small) radial component, g(r_i)

◆ min_pt()

auto DiracSpinor::min_pt ( ) const
inline

First non-zero point (index for f[i])

◆ max_pt()

auto DiracSpinor::max_pt ( ) const
inline

Effective size(); index after last non-zero point (index for f[i])

◆ r0()

double DiracSpinor::r0 ( ) const

r0 = r[min_pt] (in atomic units)

◆ rinf()

double DiracSpinor::rinf ( ) const

rinf = r[max_pt]

◆ its()

auto DiracSpinor::its ( ) const
inline

Number of iterations until energy convergence (for latest routine only)

◆ occ_frac()

auto DiracSpinor::occ_frac ( ) const
inline

Occupation fraction. =1 for closed shells. =1/(2j+1) for valence.

◆ eps()

auto DiracSpinor::eps ( ) const
inline

Fractional energy convergence: eps = |(en'-en)/en|.

◆ scale() [1/2]

const DiracSpinor & DiracSpinor::scale ( const double  factor)

Scales DiracSpinor (f and g) by constant.

◆ scale() [2/2]

const DiracSpinor & DiracSpinor::scale ( const std::vector< double > &  v)

Scales DiracSpinor (f and g) by function of r.

◆ normalise()

void DiracSpinor::normalise ( double  norm_to = 1.0)

By default normalises to 1, but can normalise to other number.

◆ zero_boundaries()

void DiracSpinor::zero_boundaries ( )

Forces f(r) and g(r) to be zero outside of [p0,pinf)

◆ norm()

double DiracSpinor::norm ( ) const

Returns the norm, defined: Norm = Sqrt[<a|a>].

◆ norm2()

double DiracSpinor::norm2 ( ) const

Returns the norm^2, defined: Norm2 = <a|a>

◆ r0pinfratio()

std::pair< double, double > DiracSpinor::r0pinfratio ( ) const

Returns [f[p0]/f_max , f[pinf]/f_max] - for tests.

◆ rho()

std::vector< double > DiracSpinor::rho ( ) const

rho(r) = sum_m |Psi^2|(r) = (2j+1) * x_occ * |F^2|(r)

◆ num_electrons()

int DiracSpinor::num_electrons ( ) const

Number of occupied electrons: (2j+1)*occ_frac.

◆ operator+=()

DiracSpinor & DiracSpinor::operator+= ( const DiracSpinor &  rhs)

Adds rhs to this, in place; must have same kappa.

◆ operator-=()

DiracSpinor & DiracSpinor::operator-= ( const DiracSpinor &  rhs)

Subtracts rhs from this, in place; must have same kappa.

◆ operator*=() [1/2]

DiracSpinor & DiracSpinor::operator*= ( const double  x)

Scales this by scalar x, in place.

◆ operator*=() [2/2]

DiracSpinor & DiracSpinor::operator*= ( const std::vector< double > &  v)

Multiplies this by function v(r), pointwise, in place.

◆ comp_l()

static bool DiracSpinor::comp_l ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
inlinestatic

Comparator (for sorting): by l.

◆ comp_j()

static bool DiracSpinor::comp_j ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
inlinestatic

Comparator (for sorting): by 2j.

◆ comp_ki()

static bool DiracSpinor::comp_ki ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
inlinestatic

Comparator (for sorting): by kappa_index.

◆ comp_n()

static bool DiracSpinor::comp_n ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
inlinestatic

Comparator (for sorting): by n.

◆ comp_en()

static bool DiracSpinor::comp_en ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
inlinestatic

Comparator (for sorting): by energy.

◆ check_ortho()

std::pair< double, std::string > DiracSpinor::check_ortho ( const std::vector< DiracSpinor > &  a,
const std::vector< DiracSpinor > &  b 
)
static

Returns worst |<a|b>| (or |<a|b>-1| for a=b) {val, state_names}.

◆ orthonormaliseOrbitals()

void DiracSpinor::orthonormaliseOrbitals ( std::vector< DiracSpinor > &  orbs,
int  num_its = 1 
)
static

(approximately) OrthoNormalises a set of any orbitals

Note: only updates orbs, not energies

◆ orthogonaliseWrt()

DiracSpinor DiracSpinor::orthogonaliseWrt ( const DiracSpinor &  Fin,
const std::vector< DiracSpinor > &  orbs 
)
static

Forces Fin to be orthogonal to orbs. If Fn (i.e., {n,k}) in in orbs, replaces Fin with that from orbs.

◆ orthonormaliseWrt()

DiracSpinor DiracSpinor::orthonormaliseWrt ( const DiracSpinor &  Fin,
const std::vector< DiracSpinor > &  orbs 
)
static

As orthogonaliseWrt(), but normalises Fin afterwards.

◆ orthog()

void DiracSpinor::orthog ( const DiracSpinor &  rhs)

A more correct way to force orthogonality than normal.

◆ shortSymbol() [2/2]

std::string DiracSpinor::shortSymbol ( int  n,
int  kappa 
)
static

e.g., 6p_1/2 => 6p-, 6p_3/2 => 6p+

◆ state_config()

std::string DiracSpinor::state_config ( const std::vector< DiracSpinor > &  orbs)
static

Returns formatted states string (e.g., '7sp5d') given list of orbs.

◆ exactHlike()

DiracSpinor DiracSpinor::exactHlike ( int  n,
int  k,
std::shared_ptr< const Grid >  rgrid,
double  zeff,
double  alpha = PhysConst::alpha,
double  mass = 1.0 
)
static

Constructs an exact H-like (pointlike Coulomb) DiracSpinor.

Relativistic Dirac-Coulomb bound orbital for nuclear charge zeff (see DiracHydrogen).

Note
alpha <= 0 gives the non-relativistic (Schrodinger) solution instead: f = P_nl, g = 0.

◆ exactHlike_cntm()

DiracSpinor DiracSpinor::exactHlike_cntm ( double  en,
int  k,
std::shared_ptr< const Grid >  rgrid,
double  zeff,
double  alpha = PhysConst::alpha,
double  mass = 1.0 
)
static

Constructs an exact (Dirac-Coulomb) continuum DiracSpinor.

Energy-normalised relativistic continuum orbital (en > 0; n set to 0). Requires FLINT for the relativistic case (see DiracContinuum::available).

Note
alpha <= 0 gives the non-relativistic solution instead (f = P_el, g = 0), which does not require FLINT.

◆ HlikeBasis() [1/2]

std::vector< DiracSpinor > DiracSpinor::HlikeBasis ( int  max_l,
int  num_ns,
std::shared_ptr< const Grid >  rgrid,
double  zeff,
double  alpha = PhysConst::alpha,
double  mass = 1.0 
)
static

Constructs a basis of H-like (pointlike) DiracSpinors.

Parameters
max_lmaximum l (both kappas calculated)
num_nsnumber of principal quantum numbers per l (not max n)
masslepton mass in units of m_e (default 1 = electron)
Note
alpha <= 0 gives the non-relativistic solutions (f = P_nl, g = 0)

◆ HlikeBasis() [2/2]

std::vector< DiracSpinor > DiracSpinor::HlikeBasis ( const std::string &  basis_string,
std::shared_ptr< const Grid >  rgrid,
double  zeff,
double  alpha = PhysConst::alpha,
double  mass = 1.0 
)
static

Constructs a basis of H-like (pointlike) DiracSpinors.

Parameters
basis_stringe.g., "6sp5d": max n for each kappa; all n down to n_min = l+1 are included
masslepton mass in units of m_e (default 1 = electron)
Note
alpha <= 0 gives the non-relativistic solutions (f = P_nl, g = 0)

◆ find()

const DiracSpinor * DiracSpinor::find ( int  n,
int  k,
const std::vector< DiracSpinor > &  orbs 
)
static

Searches for {n,k} in list of orbitals, returns pointer (may be null)

◆ max_tj()

int DiracSpinor::max_tj ( const std::vector< DiracSpinor > &  orbs)
static

Returns maximum (2j) found in {orbs}.

◆ max_l()

int DiracSpinor::max_l ( const std::vector< DiracSpinor > &  orbs)
static

Returns maximum l found in {orbs}.

◆ max_n() [1/2]

int DiracSpinor::max_n ( const std::vector< DiracSpinor > &  orbs)
static

Returns maximum n found in {orbs}.

◆ max_n() [2/2]

int DiracSpinor::max_n ( const std::vector< DiracSpinor > &  orbs,
int  kappa 
)
static

Returns maximum n found in {orbs}, for given kappa.

◆ max_kindex()

std::size_t DiracSpinor::max_kindex ( const std::vector< DiracSpinor > &  orbs)
static

Returns maximum kappa_index found in {orbs}.

◆ max_En()

double DiracSpinor::max_En ( const std::vector< DiracSpinor > &  orbs)
static

Returns maximum Energy found in {orbs}.

◆ min_En()

double DiracSpinor::min_En ( const std::vector< DiracSpinor > &  orbs)
static

Returns maximum Energy found in {orbs}.

◆ split_by_energy()

std::pair< std::vector< DiracSpinor >, std::vector< DiracSpinor > > DiracSpinor::split_by_energy ( const std::vector< DiracSpinor > &  orbitals,
double  Fermi_energy,
int  n_min_core = 1,
int  n_max_excited = 9999,
bool  positrons_are_excited = true 
)
static

Splits orbitals into two groups (i.e., core, excited) by energy.

  • The first group contains orbitals with energy < energy
  • The second group contains orbitals with energy > energy
  • The first group is also limited to have n >= n_min_core (i.e., exclude deep core states)

◆ split_by_core()

std::pair< std::vector< DiracSpinor >, std::vector< DiracSpinor > > DiracSpinor::split_by_core ( const std::vector< DiracSpinor > &  orbitals,
const std::vector< DiracSpinor > &  core,
int  n_min_core = 1 
)
static

Splits orbitals into two groups (i.e., core, excited)

  • The first group contains orbitals with {n,kappa} in the given "core"
  • The second group contains all of the rest
  • The first group is also limited to have n >= n_min_core (i.e., exclude deep core states)

◆ subset()

std::vector< DiracSpinor > DiracSpinor::subset ( const std::vector< DiracSpinor > &  basis,
const std::string &  subset_string,
bool  exclude_negative_energy = true 
)
static

Takes a subset of an input basis (by copy), according to subset_string.

  • Includes only states matching the subset_string

Friends And Related Symbol Documentation

◆ operator* [1/4]

double operator* ( const DiracSpinor &  Fa,
const DiracSpinor &  Fb 
)
friend

Returns radial integral (Fa,Fb) = Int(fa*fb + ga*gb)

◆ operator+

DiracSpinor operator+ ( DiracSpinor  lhs,
const DiracSpinor &  rhs 
)
friend

Returns lhs + rhs; must have same kappa.

◆ operator-

DiracSpinor operator- ( DiracSpinor  lhs,
const DiracSpinor &  rhs 
)
friend

Returns lhs - rhs; must have same kappa.

◆ operator* [2/4]

DiracSpinor operator* ( DiracSpinor  Fa,
const double  x 
)
friend

Returns Fa scaled by scalar x.

◆ operator* [3/4]

DiracSpinor operator* ( const double  x,
DiracSpinor  Fa 
)
friend

Returns Fa scaled by scalar x.

◆ operator* [4/4]

DiracSpinor operator* ( const std::vector< double > &  v,
DiracSpinor  Fa 
)
friend

Returns Fa multiplied by function v(r), pointwise.

◆ operator==

bool operator== ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
friend

Equality: true if {n,kappa} match.

◆ operator!=

bool operator!= ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
friend

Inequality: true if {n,kappa} differ.

◆ operator<

bool operator< ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
friend

Ordering: compares n, then kappa (via kappa_index)

◆ operator>

bool operator> ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
friend

Ordering: compares n, then kappa (via kappa_index)

◆ operator<=

bool operator<= ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
friend

Ordering: compares n, then kappa (via kappa_index)

◆ operator>=

bool operator>= ( const DiracSpinor &  lhs,
const DiracSpinor &  rhs 
)
friend

Ordering: compares n, then kappa (via kappa_index)

◆ operator<<

std::ostream & operator<< ( std::ostream &  ostr,
const DiracSpinor &  Fa 
)
friend

Writes short symbol to ostream.


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