ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
Enumerations | Functions
SplineBasis Namespace Reference

Constucts of spinor/orbital basis using B-splines (DKB/Reno/Derevianko-Beloy method) More...

Enumerations

enum class  SplineType { Derevianko , Johnson }
 

Functions

std::vector< DiracSpinorform_basis (const Parameters &params, const Wavefunction &wf, const bool correlationsQ=false)
 Forms + returns the basis orbitals (expanded in terms of splines) More...
 
double check (const std::vector< DiracSpinor > &basis, const std::vector< DiracSpinor > &orbs, bool print_warning)
 
std::pair< std::vector< DiracSpinor >, std::vector< DiracSpinor > > form_spline_basis (const int kappa, const std::size_t n_states, const std::size_t k_spl, const double r0_spl, const double rmax_spl, std::shared_ptr< const Grid > rgrid, const double alpha, SplineType itype=SplineType::Derevianko)
 Forms the underlying spline basis (which is not kept)
 
std::pair< LinAlg::Matrix< double >, LinAlg::Matrix< double > > fill_Hamiltonian_matrix (const std::vector< DiracSpinor > &spl_basis, const std::vector< DiracSpinor > &d_basis, const Wavefunction &wf, const bool correlationsQ=false, SplineType itype=SplineType::Derevianko)
 Calculates + reyurns the Hamiltonian \(H_{ij}\) (and \(S_{ij}\)) matrices.
 
void add_NotreDameBoundary (LinAlg::Matrix< double > *pAij, const int kappa, const double alpha)
 
void expand_basis_orbitals (std::vector< DiracSpinor > *basis, std::vector< DiracSpinor > *basis_positron, const std::vector< DiracSpinor > &spl_basis, const int kappa, const int max_n, const LinAlg::Vector< double > &e_values, const LinAlg::Matrix< double > &e_vectors, const Wavefunction &wf)
 Expands basis orbitals in terms of spline orbitals, by diagonalising Hamiltonian.
 
std::vector< double > sumrule_TKR (const std::vector< DiracSpinor > &basis, const std::vector< double > &r, bool print=false)
 TKR sum rule (basis test); should =0 (must include -ve energy states)
 
std::vector< double > sumrule_DG (int nDG, const std::vector< DiracSpinor > &basis, const Grid &gr, double alpha, bool print)
 Drake-Gordon sum rule (basis test); should =0 (must incl -ve energy states)
 
std::pair< double, double > r_completeness (const DiracSpinor &Fa, const std::vector< DiracSpinor > &basis, const Grid &gr, bool print)
 
auto parseSplineType (std::string_view type)
 

Detailed Description

Constucts of spinor/orbital basis using B-splines (DKB/Reno/Derevianko-Beloy method)

Uses Maths/Bsplines to forma set of B-spline orbitals (using method from [1] "Derevianko", or [2] "Johnson"). Diagonalises B-splines over Hamiltonian to produce a set of basis orbitals. [1] K. Beloy, A. Derevianko, Comput. Phys. Commun. 179, 310 (2008). [2] W. Johnson, S. Blundell, J. Sapirstein, Phys. Rev. A 37, 307 (1988). See also: Bachau et al., Reports Prog. Phys. 64, 1815 (2001).

If \(\{|i\rangle\}\) are the set of \(2N\) DKB spline orbitals (of a given angular symmetry), and

\[ H_{ij} = \langle{S_i}|\hat H_{\rm HF}|{S_j}\rangle \, , \qquad S_{ij} = \langle{S_i|S_j}\rangle. \]

The eigenvalue problem:

\[ H_{ij}p_i = \epsilon S_{ij}p_i, \]

is solved, yielding \(2N\) eigenvalues \(\epsilon\) with corresponding eigenvectors \(p\) (half of these are positive energy solutions, half are negative energy solutions).

Note: form_basis() does not store the eigenvectors, instead, it expands the basis orbitals and stores them on the regular grid (coordinate space). i.e., for each eigenvalue, n, the corresponding basis orbital is:

\[ |{n}\rangle = \sum_i^{2N} p_i |i\rangle\, \]

Function Documentation

◆ form_basis()

std::vector< DiracSpinor > SplineBasis::form_basis ( const Parameters &  params,
const Wavefunction wf,
const bool  correlationsQ = false 
)

Forms + returns the basis orbitals (expanded in terms of splines)

  • states_str = which states to keep e.g., "25spd10f" (up to n=25 for s,p,d-states, and up to n=10 for f states)
  • n_spl: Number of splines (nb: underlying spline set is larger, see [1])
  • k_spl: k order of the B-splines. NB: must have \(k\geq l_{\rm max}+3\) [1]
  • r0_spl: first internal knot
  • r0_eps: sets r0_spl as r where relative core density larger than r0_eps (updates r0 for each l). Typically ~1.0e-8. Set to zero to use r0_spl.
  • rmax_spl: last internal knot (basis orbitals only non-zero before this point)
  • wf: Wavefunction object: needed to form Hartree-Fock Hamiltonian
  • positronQ: =true will keep negative energy states (have -ve principal quantum number, are appended to end of the basis std::vector). If false, discards them.

Note: This function calls the below functions, they rarely need to be called explicitely, unless you are trying to do something different to usual.