|
ampsci
High-precision calculations for one- and two-valence atomic systems
|
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.
#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 CSF2 & | CSF (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 ConfigInfo & | info (std::size_t i) const |
| Configuration info for the ith solution (must have been set via update_config_info()) | |
|
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.
| twoJ | Twice the total angular momentum 2J. |
| pi | Total parity: +1 or -1. |
| cisp_basis | Single-particle basis used to construct the CSFs. |
| 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.
num_solutions > 0, finds only the lowest num_solutions eigenpairs.all_below is set, finds all eigenpairs with energy below that value (in cm^-1); num_solutions is then ignored.num_solutions <= 0), all eigenpairs are computed.| Hci | CI Hamiltonian matrix in the CSF basis. |
| num_solutions | Number of lowest solutions to find [0 = all]. |
| all_below | If set, find all solutions below this energy (cm^-1). |
| 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())
| const std::vector< CSF2 > & CI::PsiJPi::CSFs | ( | ) | const |
Full list of CSFs spanning this (J, parity) sector.
| const CSF2 & CI::PsiJPi::CSF | ( | std::size_t | i | ) | const |
Returns reference to the ith CSF.
| double CI::PsiJPi::energy | ( | std::size_t | i | ) | const |
Energy of the ith CI solution (atomic units)
| LinAlg::View< const double > CI::PsiJPi::coefs | ( | std::size_t | i | ) | const |
CI expansion coefficients for the ith solution (one per CSF)
| double CI::PsiJPi::coef | ( | std::size_t | i, |
| std::size_t | j | ||
| ) | const |
CI coefficient for the ith solution corresponding to the jth CSF.
| int CI::PsiJPi::parity | ( | ) | const |
Parity of the sector (+/-1)
| int CI::PsiJPi::twoJ | ( | ) | const |
Twice the total angular momentum 2J for this sector.
| std::size_t CI::PsiJPi::num_solutions | ( | ) | const |
Number of CI solutions currently stored.
| const ConfigInfo & CI::PsiJPi::info | ( | std::size_t | i | ) | const |
Configuration info for the ith solution (must have been set via update_config_info())