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

Functions and classes for Configuration Interaction calculations. More...

Classes

class  CSF2
 Very basic two-electron CSF. Only two-electron is implemented. More...
 
struct  ConfigInfo
 Basic configuration info for each CI level solution. More...
 
class  PsiJPi
 Stores the CI Solutions for given J and parity (only two-electron). More...
 

Functions

double CSF2_Coulomb (const Coulomb::QkTable &qk, DiracSpinor::Index v, DiracSpinor::Index w, DiracSpinor::Index x, DiracSpinor::Index y, int twoJ)
 Calculates the anti-symmetrised Coulomb integral for 2-particle states: C1*C2*(g_abcd-g_abdc), where Cs are C.G. coefficients.
 
double CSF2_Sigma2 (const Coulomb::LkTable &Sk, DiracSpinor::Index v, DiracSpinor::Index w, DiracSpinor::Index x, DiracSpinor::Index y, int twoJ)
 Calculates the correlation [Sigma(2)] correction to CSF2_Coulomb(). Sk is the table of two-body single-particle matrix elements of Sigma_2.
 
double CSF2_Breit (const Coulomb::WkTable &Bk, DiracSpinor::Index v, DiracSpinor::Index w, DiracSpinor::Index x, DiracSpinor::Index y, int twoJ)
 Calculates the anti-symmetrised Breit integral for 2-particle states: C1*C2*(b_abcd-b_abdc), where Cs are C.G. coefficients.
 
double Sigma2_AB (const CI::CSF2 &A, const CI::CSF2 &B, int twoJ, const Coulomb::LkTable &Sk)
 Calculates the Sigma(2) correction to Hab()
 
double Breit_AB (const CI::CSF2 &A, const CI::CSF2 &B, int twoJ, const Coulomb::WkTable &Bk)
 Calculates the Breit correction to Hab()
 
double Hab (const CI::CSF2 &A, const CI::CSF2 &B, int twoJ, const Coulomb::meTable< double > &h1, const Coulomb::QkTable &qk)
 Determines CI Hamiltonian matrix element for two 2-particle CSFs, a and b. Does NOT include Sigma(2) matrix, but does include Sigma1 (if it's in h1)
 
Coulomb::meTable< double > calculate_h1_table (const std::vector< DiracSpinor > &ci_basis, const std::vector< DiracSpinor > &s1_basis_core, const std::vector< DiracSpinor > &s1_basis_excited, const Coulomb::QkTable &qk, bool include_Sigma1)
 Calculates table of single-particle matrix elements of one-body Hamiltonian. Note: assumes basis are Hartree-Fock eigenstates!
 
Coulomb::meTable< double > calculate_h1_table (const std::vector< DiracSpinor > &ci_basis, const MBPT::CorrelationPotential &Sigma, bool include_Sigma1)
 
Coulomb::LkTable calculate_Sk (const std::string &filename, const std::vector< DiracSpinor > &cis2_basis, const std::vector< DiracSpinor > &s2_basis_core, const std::vector< DiracSpinor > &s2_basis_excited, const Coulomb::QkTable &qk, int max_k, bool exclude_wrong_parity_box, bool no_new_integrals=false)
 Calculates table of single-particle matrix elements of two-body Sigma_2 operator.
 
Coulomb::WkTable calculate_Bk (const std::string &bk_filename, const HF::Breit *const pBr, const std::vector< DiracSpinor > &ci_basis, int max_k)
 Calculates table of single-particle matrix elements of two-body Breit operator.
 
std::vector< DiracSpinorbasis_subset (const std::vector< DiracSpinor > &basis, const std::string &subset_string, const std::string &frozen_core_string="")
 Takes a subset of input basis according to subset_string. Only states not included in frozen_core_string are included.
 
double ReducedME (const LinAlg::View< const double > &cA, const std::vector< CI::CSF2 > &CSFAs, int twoJA, const LinAlg::View< const double > &cB, const std::vector< CI::CSF2 > &CSFBs, int twoJB, const Coulomb::meTable< double > &h, int K_rank, int Parity)
 Calculate reduced matrix elements between two CI states. More...
 
double RME_CSF2 (const CI::CSF2 &X, int twoJX, const CI::CSF2 &V, int twoJV, const Coulomb::meTable< double > &h, int K_rank)
 Calculate reduce ME between two 2-particle CSFs - XXX not quite right??
 
std::pair< int, int > Term_S_L (int l1, int l2, int twoJ, double gJ_target)
 Determines best-fit for S and L for two-electron state by matching g-factor.
 
std::string Term_Symbol (int two_J, int L, int two_S, int parity)
 Returns Term_Symbol as string.
 
std::string Term_Symbol (int L, int two_S, int parity)
 Returns Term_Symbol as string, without J part.
 
LinAlg::Matrix< double > construct_Hci (const PsiJPi &psi, const Coulomb::meTable< double > &h1, const Coulomb::QkTable &qk, const Coulomb::WkTable *Bk=nullptr, const Coulomb::LkTable *Sk=nullptr)
 Constructs the CI matrix, optionally including Sigma corrections. More...
 
double ReducedME (const PsiJPi &As, std::size_t iA, const PsiJPi &Bs, std::size_t iB, const Coulomb::meTable< double > &h, int K_rank, int Parity)
 Calculate reduced matrix elements between two CI states. More...
 
std::vector< PsiJPiconfiguration_interaction (const IO::InputBlock &input, const Wavefunction &wf)
 Runs configuration interaction with options specified by input. Returns a list of PsiJPi (set of CI solutions for list of J/Pi)
 
PsiJPi run_CI (const std::vector< DiracSpinor > &ci_sp_basis, int twoJ, int parity, int num_solutions, const Coulomb::meTable< double > &h1, const Coulomb::QkTable &qk, const Coulomb::WkTable &Bk, const Coulomb::LkTable &Sk, bool include_Sigma2, std::ostream &outstream=std::cout)
 Performs CI for specified J and Pi.
 
bool operator== (const CSF2 &A, const CSF2 &B)
 
bool operator!= (const CSF2 &A, const CSF2 &B)
 
std::vector< CSF2form_CSFs (int twoJ, int parity, const std::vector< DiracSpinor > &cisp_basis)
 Forms list of all possible (2-particle) CSFs with given J and parity.
 

Detailed Description

Functions and classes for Configuration Interaction calculations.

Function Documentation

◆ construct_Hci()

LinAlg::Matrix< double > CI::construct_Hci ( const PsiJPi psi,
const Coulomb::meTable< double > &  h1,
const Coulomb::QkTable qk,
const Coulomb::WkTable Bk = nullptr,
const Coulomb::LkTable Sk = nullptr 
)

Constructs the CI matrix, optionally including Sigma corrections.

h1 is table of one-body <a|h1|b> matrix elements, and may include Sigma_1. qk contains two-body Coulomb integrals <vw|q^k|xy>. Sk is optional; if given, constains two-body <vw|Sigma_2|xy> corrections.

◆ ReducedME() [1/2]

double CI::ReducedME ( const LinAlg::View< const double > &  cA,
const std::vector< CI::CSF2 > &  CSFAs,
int  twoJA,
const LinAlg::View< const double > &  cB,
const std::vector< CI::CSF2 > &  CSFBs,
int  twoJB,
const Coulomb::meTable< double > &  h,
int  K_rank,
int  Parity 
)

Calculate reduced matrix elements between two CI states.

cA is CI expansion coefficients (row if CI eigenvector matrix). h is lookup table of single-particle matrix elements of operator.

◆ ReducedME() [2/2]

double CI::ReducedME ( const PsiJPi As,
std::size_t  iA,
const PsiJPi Bs,
std::size_t  iB,
const Coulomb::meTable< double > &  h,
int  K_rank,
int  Parity 
)
inline

Calculate reduced matrix elements between two CI states.

As is a PsiJPi (set of CI solutions for given J and pi), iA is which solution to calculate for. h is lookup table of single-particle matrix elements of operator.