2 #include "Angular/Wigner369j.hpp"
3 #include "Physics/AtomData_PeriodicTable.hpp"
4 #include "qip/Template.hpp"
20 constexpr
NonRelConfig(
int in_n = 0,
int in_l = -1,
int in_num = 0)
21 : n(in_n), l(in_l), num(in_num) {}
24 std::string
symbol()
const;
47 DiracConfig(
int in_n = 0,
int in_k = 0,
double in_en = 0)
48 : n(in_n), k(in_k), en(in_en){};
80 std::pair<int, int>
parse_symbol(std::string_view symbol);
83 double diracen(
double z,
double n,
int k,
double alpha = 0.00729735256635);
89 std::string
coreConfig(
const std::string &in_ng);
98 std::vector<NonRelConfig>
core_parser(
const std::string &str_core_in);
108 std::vector<NonRelConfig>
state_parser(
const std::string &str_states);
111 const std::string &str_states);
117 std::vector<NonRelConfig>
core_guess(
const int total_core_electrons);
127 std::vector<std::pair<int, int>>
n_kappa_list(
const std::string &basis_string);
Helper template for Arithmetic operations. Derive from this to provide +,-,*,/, given +=,...
Definition: Template.hpp:41
Helper template for comparisons. Derive from this to provide !=,>,<=,>=, given == and <.
Definition: Template.hpp:32
Useful atomic data/functions.
Definition: AtomData.cpp:14
std::vector< NonRelConfig > core_guess(const int total_core_electrons)
Given a number of electrons, guesses the configuration, returns list of NonRelConfigs.
Definition: AtomData.cpp:453
std::string l_symbol(int l)
l (int) to symbol (e.g., 0->'s', 1->'p')
Definition: AtomData.cpp:110
std::string configs_to_string(const std::vector< NonRelConfig > &configs)
Given a list of NonRelConfigs, returns full string.
Definition: AtomData.cpp:238
std::vector< std::pair< int, int > > n_kappa_list(const std::string &basis_string)
Given a "basis string", returns list of {n, kappa}. e.g., 6sp5d ->{{6,-1}, {6,1}, {6,...
Definition: AtomData.cpp:529
std::pair< int, int > parse_symbol(std::string_view symbol)
Parses electron 'symbol' or 'shortSymbol' to {n,kappa}, e.g., "6s+" -> {6,-1}; "6p-" -> {6,...
Definition: AtomData.cpp:148
std::string atomicName(int Z)
e.g., 55 -> "Cesium"
Definition: AtomData.cpp:73
std::string kappa_symbol(int kappa)
kappa (int) to symbol, e.g., -1 -> s_1/2
Definition: AtomData.cpp:123
std::string niceCoreOutput(const std::string &full_core)
Given a full electron config., returns nicer format by recognising nobel gas.
Definition: AtomData.cpp:198
std::string coreConfig(const std::string &in_ng)
Given a nobel-gas conifg (e.g., '[Xe]') returns full electron config.
Definition: AtomData.cpp:185
std::vector< DiracConfig > listOfStates_singlen(const std::string &in_list)
Generates a list of DiracConfig from string: just max n for each kappa.
Definition: AtomData.cpp:500
NonRelConfig term_parser(std::string_view term)
Given a term symbol 'nLm', returns corresponding NonRelConfig.
Definition: AtomData.cpp:326
std::string L_symbol(int l)
L (int) to symbol (e.g., 0->'S', 1->'P')
Definition: AtomData.cpp:116
int atomic_Z(const std::string &at)
Converts atomic symbol to integer Z (e.g., 'Cs' to 55 )
Definition: AtomData.cpp:84
std::string atomicSymbol(int Z)
e.g., 55 -> "Cs"
Definition: AtomData.cpp:64
std::vector< NonRelConfig > state_parser(const std::string &str_states)
Takes a string of states in form "nLm,nLm,..." converts to vector of NonRelConfig....
Definition: AtomData.cpp:367
int defaultA(int Z)
Looks up default A (most common) for given Z.
Definition: AtomData.cpp:53
std::vector< NonRelConfig > core_parser(const std::string &str_core_in)
Takes a "core string" in form "[X],nLm,nLm,..." converts to vector of NonRelConfig,...
Definition: AtomData.cpp:265
std::vector< DiracConfig > listOfStates_nk(const std::string &in_list)
Generates a list of DiracConfig from string: full list.
Definition: AtomData.cpp:469
void printTable()
Prints a periodic table to screen.
Definition: AtomData.cpp:572
int symbol_to_l(std::string_view l_str)
e.g., 'p' -> 1
Definition: AtomData.cpp:133
std::string guessCoreConfigStr(const int total_core_electrons)
Given a number of electrons, guesses the configuration, returns as string.
Definition: AtomData.cpp:408
std::string shortSymbol(int n, int kappa)
Returns shortSymbol, given n and kappa: (6,-1)->"6s+".
Definition: AtomData.cpp:128
double diracen(double z, double n, int k, double alpha)
Exact H-like energy.
Definition: AtomData.cpp:249
Stores relativistic single-electron state {n, kappa, energy}.
Definition: AtomData.hpp:43
Stores non-relativistic single-electron config: {n, l, number}.
Definition: AtomData.hpp:15
bool ok() const
Checks if consistent (l>n etc.)
Definition: AtomData.cpp:21
friend bool operator==(const NonRelConfig &lhs, const NonRelConfig &rhs)
Provides comparitor overloads. Compares n first, then l.
Definition: AtomData.cpp:33
std::string symbol() const
Returns symbol (e.g., 1s2 or 5p3)
Definition: AtomData.cpp:17
double frac() const
Filling fraction (accounting for spin) = num/[2*(2l+1)].
Definition: AtomData.cpp:27
NonRelConfig & operator+=(const NonRelConfig &rhs)
Provides addition and subtraction: adds 'num' iff n and l same.
Definition: AtomData.cpp:40