|
ampsci
High-precision calculations for one- and two-valence atomic systems
|
Functions (+classes) for computing Coulomb integrals. More...
Classes | |
| class | CoulombTable |
| Base (pure virtual) class to store Coulomb integrals, and similar. 3 derived classes, which account for symmetry. More... | |
| class | meTable |
| Look-up table for matrix elements. Note: does not assume any symmetry: (a,b) is stored independantly of (b,a). In general, maps a pair of DiracSpinors to a single value (of any type, T). More... | |
| class | YkTable |
| Calculates + stores Hartree Y functions + Angular (w/ look-up), taking advantage of symmetry. More... | |
Typedefs | |
| using | nk2Index = uint32_t |
| index type for set of 2 orbitals {nk,nk} -> nk4Index | |
| using | Real = double |
| Data type used to store integrals. | |
| using | nk4Index = uint64_t |
| index type for set of 4 orbitals {nk,nk,nk,nk} -> nk4Index | |
| using | nkIndex = uint16_t |
| index type for each {nk} (orbital) | |
| using | CoulombFunction = std::function< double(int, const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d)> |
| Function type for calculating Coulomb(-like) integrals. Takes k and 4 DiracSpinors, returns a double. | |
| using | SelectionRules = std::function< bool(int, const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d)> |
| Function type for determining Coulomb(-like) integral selection rules. Takes k and 4 DiracSpinors, returns a true if integral is allowed. | |
| using | QkTable = CoulombTable< Symmetry::Qk > |
| Stores Coulomb(-like) integrals, assuming Q-like symmetry. | |
| using | WkTable = CoulombTable< Symmetry::Wk > |
| Stores Coulomb(-like) integrals, assuming W-like symmetry. | |
| using | LkTable = CoulombTable< Symmetry::Lk > |
| Stores Coulomb(-like) integrals, assuming L-like symmetry. | |
| using | NkTable = CoulombTable< Symmetry::none > |
| Stores Coulomb(-like) integrals, assuming no symmetry. | |
Enumerations | |
| enum class | Symmetry { Qk , Wk , Lk , none } |
| Symmetry (state index order) for tables. More... | |
Functions | |
| std::vector< double > | yk_ab (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const std::size_t maxi=0) |
| Calculates Hartree Screening functions \(y^k_{ab}(r)\). | |
| void | yk_ab (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &ykab, const std::size_t maxi=0) |
| Overload: does not allocate ykab. | |
| void | bk_ab (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &b0, std::vector< double > &binf, const std::size_t maxi=0) |
| Breit b^k function: (0,r) and (r,inf) part stored sepperately (in/out) | |
| void | gk_ab (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &g0, std::vector< double > &ginf, const std::size_t maxi=0) |
| Breit g^k function: (0,r) + (r,inf) part stored together (in/out) | |
| double | Rk_abcd (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Calculates R^k_abcd for given k. From scratch (calculates y) | |
| double | Rk_abcd (const DiracSpinor &Fa, const DiracSpinor &Fc, const std::vector< double > &ykbd) |
| Overload for when y^k_bd already exists [much faster]. | |
| DiracSpinor | Rkv_bcd (const int k, const int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| "Right-hand-side" R^k{v}_bcd [i.e., without Fv integral] | |
| DiracSpinor | Rkv_bcd (const int kappa_v, const DiracSpinor &Fc, const std::vector< double > &ykbd) |
| Overload for when y^k_bd already exists [much faster]. | |
| void | Rkv_bcd (DiracSpinor *const Rkv, const DiracSpinor &Fc, const std::vector< double > &ykbd) |
| Overload for when spinor exists. Rkv is overwritten. | |
| double | Qk_abcd (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Calculates Q^k_abcd for given k. From scratch (calculates y) [see YkTable version if already have YkTable]. | |
| bool | Qk_abcd_SR (int k, int ka, int kb, int kc, int kd) |
| Just selection rule for Qk_abcd. | |
| bool | Qk_abcd_SR (int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Just selection rule for Qk_abcd. | |
| bool | Pk_abcd_SR (int k, int ka, int kb, int kc, int kd) |
| Just selection rule for Pk_abcd. | |
| bool | Pk_abcd_SR (int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Just selection rule for Pk_abcd. | |
| DiracSpinor | Qkv_bcd (const int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Calculates Q^k(v)_bcd for given k,kappa_v. From scratch (calculates y) [see YkTable version if already have YkTable]. | |
| double | Pk_abcd (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Exchange only version of W (W-Q): W = Q + P [see Qk above]. | |
| DiracSpinor | Pkv_bcd (const int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Exchange only version of W (W-Q): W = Q + P [see Qk above]. | |
| DiracSpinor | Wkv_bcd (const int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| double | Wk_abcd (const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) |
| Calculates W^k_abcd for given k. From scratch (calculates y) | |
| double | g_abcd (const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d, int tma, int tmb, int tmc, int tmd) |
| Calculates g from scratch - not used often. | |
| std::pair< int, int > | k_minmax_Ck (const DiracSpinor &a, const DiracSpinor &b) |
| Returns min and max k (multipolarity) allowed for C^k_ab, accounting for parity (used by k_minmax_Q) | |
| std::pair< int, int > | k_minmax_Ck (int kappa_a, int kappa_b) |
| Returns min and max k (multipolarity) allowed for C^k_ab, accounting for parity (used by k_minmax_Q) | |
| std::pair< int, int > | k_minmax_tj (int tja, int tjb) |
| Returns min and max k (multipolarity) allowed for Triangle(k,a,b), NOT accounting for parity (2j only, not kappa/l) (used by k_minmax_P,W) | |
| std::pair< int, int > | k_minmax_Q (const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d) |
| Returns min and max k (multipolarity) allowed for Q^k_abcd. Parity rule is included, so you may safely call k+=2. Guaranteed to be non-zero at min and max, and every 2nd inbetween. | |
| std::pair< int, int > | k_minmax_Q (int kappa_a, int kappa_b, int kappa_c, int kappa_d) |
| Returns min and max k (multipolarity) allowed for Q^k_abcd. Parity rule is included, so you may safely call k+=2. Guaranteed to be non-zero at min and max, and every 2nd inbetween. | |
| std::pair< int, int > | k_minmax_P (const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d) |
| Returns min and max k (multipolarity) allowed for P^k_abcd. DOES NOT contain parity rules (6j only) - so NOT safe to call k+=2. Guaranteed to be non-zero at min and max. | |
| std::pair< int, int > | k_minmax_W (const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d) |
| Returns min and max k (multipolarity) allowed for W^k_abcd. DOES NOT contain parity rules (6j only) - so NOT safe to call k+=2. Cannot guarantee non-zero, since when a=b or c=d, sometimes have P=-Q. But when a!=b and c!=d, guaranteed to be non-zero at min and max. | |
Functions (+classes) for computing Coulomb integrals.
| using Coulomb::nk2Index = typedef uint32_t |
index type for set of 2 orbitals {nk,nk} -> nk4Index
| using Coulomb::Real = typedef double |
Data type used to store integrals.
| using Coulomb::nk4Index = typedef uint64_t |
index type for set of 4 orbitals {nk,nk,nk,nk} -> nk4Index
| using Coulomb::nkIndex = typedef uint16_t |
index type for each {nk} (orbital)
| using Coulomb::CoulombFunction = typedef std::function<double(int, const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d)> |
Function type for calculating Coulomb(-like) integrals. Takes k and 4 DiracSpinors, returns a double.
| using Coulomb::SelectionRules = typedef std::function<bool(int, const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d)> |
Function type for determining Coulomb(-like) integral selection rules. Takes k and 4 DiracSpinors, returns a true if integral is allowed.
| using Coulomb::QkTable = typedef CoulombTable<Symmetry::Qk> |
Stores Coulomb(-like) integrals, assuming Q-like symmetry.
| using Coulomb::WkTable = typedef CoulombTable<Symmetry::Wk> |
Stores Coulomb(-like) integrals, assuming W-like symmetry.
| using Coulomb::LkTable = typedef CoulombTable<Symmetry::Lk> |
Stores Coulomb(-like) integrals, assuming L-like symmetry.
| using Coulomb::NkTable = typedef CoulombTable<Symmetry::none> |
Stores Coulomb(-like) integrals, assuming no symmetry.
|
strong |
Symmetry (state index order) for tables.
| std::vector< double > Coulomb::yk_ab | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| const std::size_t | maxi = 0 |
||
| ) |
Calculates Hartree Screening functions \(y^k_{ab}(r)\).
maxi is max point to calculate; blank or zero means all the way
| void Coulomb::yk_ab | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| std::vector< double > & | vabk, | ||
| const std::size_t | maxi | ||
| ) |
Overload: does not allocate ykab.
| void Coulomb::bk_ab | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| std::vector< double > & | b0, | ||
| std::vector< double > & | binf, | ||
| std::size_t | maxi | ||
| ) |
Breit b^k function: (0,r) and (r,inf) part stored sepperately (in/out)
| void Coulomb::gk_ab | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| std::vector< double > & | g0, | ||
| std::vector< double > & | ginf, | ||
| const std::size_t | maxi | ||
| ) |
Breit g^k function: (0,r) + (r,inf) part stored together (in/out)
| double Coulomb::Rk_abcd | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
Calculates R^k_abcd for given k. From scratch (calculates y)
| double Coulomb::Rk_abcd | ( | const DiracSpinor & | Fa, |
| const DiracSpinor & | Fc, | ||
| const std::vector< double > & | yk_bd | ||
| ) |
Overload for when y^k_bd already exists [much faster].
| DiracSpinor Coulomb::Rkv_bcd | ( | const int | k, |
| const int | kappa_a, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
"Right-hand-side" R^k{v}_bcd [i.e., without Fv integral]
| DiracSpinor Coulomb::Rkv_bcd | ( | const int | kappa_a, |
| const DiracSpinor & | Fc, | ||
| const std::vector< double > & | ykbd | ||
| ) |
Overload for when y^k_bd already exists [much faster].
| void Coulomb::Rkv_bcd | ( | DiracSpinor *const | Rkv, |
| const DiracSpinor & | Fc, | ||
| const std::vector< double > & | ykbd | ||
| ) |
Overload for when spinor exists. Rkv is overwritten.
| double Coulomb::Qk_abcd | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
Calculates Q^k_abcd for given k. From scratch (calculates y) [see YkTable version if already have YkTable].
| bool Coulomb::Qk_abcd_SR | ( | int | k, |
| int | ka, | ||
| int | kb, | ||
| int | kc, | ||
| int | kd | ||
| ) |
Just selection rule for Qk_abcd.
| bool Coulomb::Qk_abcd_SR | ( | int | k, |
| const DiracSpinor & | a, | ||
| const DiracSpinor & | b, | ||
| const DiracSpinor & | c, | ||
| const DiracSpinor & | d | ||
| ) |
Just selection rule for Qk_abcd.
| bool Coulomb::Pk_abcd_SR | ( | int | k, |
| int | ka, | ||
| int | kb, | ||
| int | kc, | ||
| int | kd | ||
| ) |
Just selection rule for Pk_abcd.
| bool Coulomb::Pk_abcd_SR | ( | int | k, |
| const DiracSpinor & | a, | ||
| const DiracSpinor & | b, | ||
| const DiracSpinor & | c, | ||
| const DiracSpinor & | d | ||
| ) |
Just selection rule for Pk_abcd.
| DiracSpinor Coulomb::Qkv_bcd | ( | const int | k, |
| const int | kappa_a, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
Calculates Q^k(v)_bcd for given k,kappa_v. From scratch (calculates y) [see YkTable version if already have YkTable].
| double Coulomb::Pk_abcd | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
Exchange only version of W (W-Q): W = Q + P [see Qk above].
| DiracSpinor Coulomb::Pkv_bcd | ( | const int | k, |
| int | kappa_a, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
Exchange only version of W (W-Q): W = Q + P [see Qk above].
| double Coulomb::Wk_abcd | ( | const int | k, |
| const DiracSpinor & | Fa, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | Fc, | ||
| const DiracSpinor & | Fd | ||
| ) |
Calculates W^k_abcd for given k. From scratch (calculates y)
\[ W^k_{abcd} = Q^k_{abcd} + \sum_l [k] \begin{Bmatrix}a&c&k\\b&d&l\end{Bmatrix} * Q^l_{abdc} \]
\[ W^k_{abcd} = Q^k_{abcd} + P^k_{abcd} \]
| double Coulomb::g_abcd | ( | const DiracSpinor & | a, |
| const DiracSpinor & | b, | ||
| const DiracSpinor & | c, | ||
| const DiracSpinor & | d, | ||
| int | tma, | ||
| int | tmb, | ||
| int | tmc, | ||
| int | tmd | ||
| ) |
Calculates g from scratch - not used often.
| std::pair< int, int > Coulomb::k_minmax_Ck | ( | const DiracSpinor & | a, |
| const DiracSpinor & | b | ||
| ) |
Returns min and max k (multipolarity) allowed for C^k_ab, accounting for parity (used by k_minmax_Q)
| std::pair< int, int > Coulomb::k_minmax_Ck | ( | int | kappa_a, |
| int | kappa_b | ||
| ) |
Returns min and max k (multipolarity) allowed for C^k_ab, accounting for parity (used by k_minmax_Q)
| std::pair< int, int > Coulomb::k_minmax_tj | ( | int | tja, |
| int | tjb | ||
| ) |
Returns min and max k (multipolarity) allowed for Triangle(k,a,b), NOT accounting for parity (2j only, not kappa/l) (used by k_minmax_P,W)
| std::pair< int, int > Coulomb::k_minmax_Q | ( | const DiracSpinor & | a, |
| const DiracSpinor & | b, | ||
| const DiracSpinor & | c, | ||
| const DiracSpinor & | d | ||
| ) |
Returns min and max k (multipolarity) allowed for Q^k_abcd. Parity rule is included, so you may safely call k+=2. Guaranteed to be non-zero at min and max, and every 2nd inbetween.
| std::pair< int, int > Coulomb::k_minmax_Q | ( | int | kap_a, |
| int | kap_b, | ||
| int | kap_c, | ||
| int | kap_d | ||
| ) |
Returns min and max k (multipolarity) allowed for Q^k_abcd. Parity rule is included, so you may safely call k+=2. Guaranteed to be non-zero at min and max, and every 2nd inbetween.
| std::pair< int, int > Coulomb::k_minmax_P | ( | const DiracSpinor & | a, |
| const DiracSpinor & | b, | ||
| const DiracSpinor & | c, | ||
| const DiracSpinor & | d | ||
| ) |
Returns min and max k (multipolarity) allowed for P^k_abcd. DOES NOT contain parity rules (6j only) - so NOT safe to call k+=2. Guaranteed to be non-zero at min and max.
| std::pair< int, int > Coulomb::k_minmax_W | ( | const DiracSpinor & | a, |
| const DiracSpinor & | b, | ||
| const DiracSpinor & | c, | ||
| const DiracSpinor & | d | ||
| ) |
Returns min and max k (multipolarity) allowed for W^k_abcd. DOES NOT contain parity rules (6j only) - so NOT safe to call k+=2. Cannot guarantee non-zero, since when a=b or c=d, sometimes have P=-Q. But when a!=b and c!=d, guaranteed to be non-zero at min and max.