ampsci
High-precision calculations for one- and two-valence atomic systems
CI::PsiJPi

ok

Container for CI solutions in a single (J, parity) sector.

Holds the complete set of configuration state functions and the results of the CI diagonalisation for a fixed total angular momentum J and parity.

Construction builds the CSF basis via form_CSFs() but does not solve the eigenvalue problem; call solve() separately after constructing the CI Hamiltonian matrix. Configuration labels are not set automatically – call update_config_info() for each solution after solving.

Note
Only two-electron (two-particle) systems are supported.

#include <CSF.hpp>

Public Member Functions

 PsiJPi (int twoJ, int pi, const std::vector< DiracSpinor > &cisp_basis)
 Constructs the CSF basis for the given J and parity; does not solve.
 
void solve (const LinAlg::Matrix< double > &Hci, int num_solutions=0, std::optional< double > all_below={})
 Solves the CI eigenvalue problem for the given Hamiltonian matrix.
 
void update_config_info (std::size_t i, const ConfigInfo &info)
 Set configuration info for the ith solution (must be called manually after solve())
 
const std::vector< CSF2 > & CSFs () const
 Full list of CSFs spanning this (J, parity) sector.
 
const CSF2CSF (std::size_t i) const
 Returns reference to the ith CSF.
 
double energy (std::size_t i) const
 Energy of the ith CI solution (atomic units)
 
LinAlg::View< const double > coefs (std::size_t i) const
 CI expansion coefficients for the ith solution (one per CSF)
 
double coef (std::size_t i, std::size_t j) const
 CI coefficient for the ith solution corresponding to the jth CSF.
 
int parity () const
 Parity of the sector (+/-1)
 
int twoJ () const
 Twice the total angular momentum 2J for this sector.
 
std::size_t num_solutions () const
 Number of CI solutions currently stored.
 
const ConfigInfoinfo (std::size_t i) const
 Configuration info for the ith solution (must have been set via update_config_info())
 

Constructor & Destructor Documentation

◆ PsiJPi()

CI::PsiJPi::PsiJPi ( int  twoJ,
int  pi,
const std::vector< DiracSpinor > &  cisp_basis 
)
inline

Constructs the CSF basis for the given J and parity; does not solve.

Calls form_CSFs() to build the list of two-electron CSFs. The eigenvalue problem is not solved until solve() is called with the CI Hamiltonian.

Parameters
twoJTwice the total angular momentum 2J.
piTotal parity: +1 or -1.
cisp_basisSingle-particle basis used to construct the CSFs.

Member Function Documentation

◆ solve()

void CI::PsiJPi::solve ( const LinAlg::Matrix< double > &  Hci,
int  num_solutions = 0,
std::optional< double >  all_below = {} 
)

Solves the CI eigenvalue problem for the given Hamiltonian matrix.

Diagonalises Hci and stores the resulting eigenvalues and eigenvectors. Does not populate ConfigInfo; call update_config_info() separately.

  • If num_solutions > 0, finds only the lowest num_solutions eigenpairs.
  • If all_below is set, finds all eigenpairs with energy below that value (in cm^-1); num_solutions is then ignored.
  • If both are unset (or num_solutions <= 0), all eigenpairs are computed.
Parameters
HciCI Hamiltonian matrix in the CSF basis.
num_solutionsNumber of lowest solutions to find [0 = all].
all_belowIf set, find all solutions below this energy (cm^-1).

◆ update_config_info()

void CI::PsiJPi::update_config_info ( std::size_t  i,
const ConfigInfo info 
)

Set configuration info for the ith solution (must be called manually after solve())

◆ CSFs()

const std::vector< CSF2 > & CI::PsiJPi::CSFs ( ) const

Full list of CSFs spanning this (J, parity) sector.

◆ CSF()

const CSF2 & CI::PsiJPi::CSF ( std::size_t  i) const

Returns reference to the ith CSF.

◆ energy()

double CI::PsiJPi::energy ( std::size_t  i) const

Energy of the ith CI solution (atomic units)

◆ coefs()

LinAlg::View< const double > CI::PsiJPi::coefs ( std::size_t  i) const

CI expansion coefficients for the ith solution (one per CSF)

◆ coef()

double CI::PsiJPi::coef ( std::size_t  i,
std::size_t  j 
) const

CI coefficient for the ith solution corresponding to the jth CSF.

◆ parity()

int CI::PsiJPi::parity ( ) const

Parity of the sector (+/-1)

◆ twoJ()

int CI::PsiJPi::twoJ ( ) const

Twice the total angular momentum 2J for this sector.

◆ num_solutions()

std::size_t CI::PsiJPi::num_solutions ( ) const

Number of CI solutions currently stored.

◆ info()

const ConfigInfo & CI::PsiJPi::info ( std::size_t  i) const

Configuration info for the ith solution (must have been set via update_config_info())


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