![]() |
|
High-precision calculations for one- and two-valence atomic systems
|
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Also holds the Hartree-Fock potential (and core), basis, spectrum, correlation potential (Sigma), and CI solutions.
#include <Wavefunction.hpp>
Public Member Functions | |
| Wavefunction (std::shared_ptr< const Grid > grid, const Nuclear::Nucleus &nucleus, double var_alpha=1.0, const std::string &run_label="") | |
| Construct with a Grid [shared resource] and a nucleus. | |
| Wavefunction (const GridParameters &gridparams, const Nuclear::Nucleus &nucleus, double var_alpha=1.0, const std::string &run_label="") | |
| As above, but Grid is constructed here using given parameters. | |
| Wavefunction () | |
| Default grid and nucleus (see GridParameters, Nuclear::Nucleus) | |
| const Grid & | grid () const |
| Returns a const reference to the radial grid. | |
| std::shared_ptr< const Grid > | grid_sptr () const |
| Copy of shared_ptr to grid [shared resource]. | |
| double | alpha () const |
| Local value of fine-structure constant. | |
| double | dalpha2 () const |
| Variation in alpha^2 : x = (alpha/alpha_0)^2 - 1. | |
| const Nuclear::Nucleus & | nucleus () const |
| Returns Nuclear::nucleus object (contains nuc. parameters) | |
| int | Znuc () const |
| Nuclear charge, Z. | |
| int | Anuc () const |
| Nuclear mass number, A. | |
| double | get_rrms () const |
| Nuclear rms charge radius, in fm (femtometres) | |
| const std::vector< DiracSpinor > & | core () const |
| Core orbitals (frozen HF core); empty if HF not set. | |
| const std::vector< DiracSpinor > & | valence () const |
| Valence orbitals (HF or Brueckner orbitals) | |
| std::vector< DiracSpinor > & | valence () |
| const std::vector< DiracSpinor > & | hf_valence () const |
| HF valence orbitals: copy of valence, as last solved by solve_valence. | |
| const std::vector< DiracSpinor > & | basis () const |
| Basis, eigenstates of HF potential. Used for MBPT. | |
| std::vector< DiracSpinor > & | basis () |
| const std::vector< DiracSpinor > & | spectrum () const |
| Spectrum: like basis, but includes correlations. | |
| std::vector< DiracSpinor > & | spectrum () |
| const std::vector< CI::PsiJPi > & | CIwfs () const |
| CI solutions, one for each {J, parity}; empty unless CI was run. | |
| const CI::PsiJPi * | CIwf (int J, int parity) const |
| CI solutions for given J and parity; nullptr if not found. | |
| const CI::Integrals & | CI_integrals () const |
| Integral tables used to construct the CI Hamiltonians. | |
| const std::vector< double > & | vnuc () const |
| Nuclear potential. | |
| const HF::HartreeFock * | vHF () const |
| Returns ptr to Hartree Fock (class); nullptr if not set. | |
| HF::HartreeFock * | vHF () |
| std::vector< double > | vlocal (int l=0) const |
| Local part of potential, e.g., Vl = Vnuc + Vdir + Vrad_el(l). | |
| std::vector< double > | Hmag (int l=0) const |
| QED Magnetic form factor. | |
| const QED::RadPot * | vrad () const |
| Pointer to QED radiative potential. May be nullptr. | |
| QED::RadPot * | vrad () |
| const MBPT::CorrelationPotential * | Sigma () const |
| Returns ptr to (const) Correlation Potential, Sigma; nullptr if none. | |
| MBPT::CorrelationPotential * | Sigma () |
| int | Ncore () const |
| Number of electrons in the core. | |
| const DiracSpinor * | getState (int n, int k) const |
| Finds requested state (n, kappa); returns nullptr if not found. | |
| const DiracSpinor * | getState (std::string_view state) const |
| As above, but takes 'short symbol' (e.g., 6s+, 6p-) | |
| double | FermiLevel () const |
| Returns energy location of the "Fermi Level". | |
| double | energy_gap () const |
| Energy gap between lowest valence + highest core state. | |
| std::string | coreConfiguration () const |
| Returns full core configuration. | |
| std::string | coreConfiguration_nice () const |
| Returns core configuration, in nice output notation. | |
| std::string | atom () const |
| String of atom info (e.g., "Cs, Z=55 A=133") | |
| std::string | atomicSymbol () const |
| e.g., "Cs" | |
| std::string | identity () const |
| Atomic symbol, including core ionisation degree and run_label. | |
| const std::string & | run_label () const |
| Optional label for output identity (see identity) | |
| int | ion_degree (int num_val) const |
| 0 for neutral, 1 for singly-ionised etc. (num_val: valence electrons) | |
| std::string | ion_symbol (int num_val) const |
| I for neutral, II for singly-ionised etc. (num_val: valence electrons) | |
| int | Zion () const |
| Effective charge (for core) = Z-N_core. | |
| void | printCore () const |
| Prints table of core orbitals + energies etc. | |
| void | printValence (const std::vector< DiracSpinor > &tmp_orbitals={}) const |
| Prints table of valence orbitals + energies etc. | |
| void | printBasis (const std::vector< DiracSpinor > &the_basis) const |
| Prints table of Basis/Spectrum orbitals, compares to HF orbitals. | |
| bool | isInCore (int n, int k) const |
| Check if a state (n, kappa) is in the core list. | |
| bool | isInValence (int n, int k) const |
| Check if a state (n, kappa) is in the valence list. | |
| std::vector< double > | coreDensity () const |
| Calculates rho(r) = sum_c psi^2(r) for core states, c={n,k,m}. | |
| double | coreEnergyHF () const |
| Calculates HF core energy. | |
| void | set_HF (HF::Method method=HF::Method::HartreeFock, const std::string &in_core="", std::optional< HF::Breit::Params > breit_params=std::nullopt, double eps_HF=1.0e-14, bool print=true) |
| Initialises HF object and populates core orbitals. | |
| void | solve_core (bool print=true) |
| Performs Hartree-Fock procedure for core (nothing if HF not set) | |
| void | solve_core (HF::Method method, const std::string &in_core="", std::optional< HF::Breit::Params > breit_params=std::nullopt, double eps_HF=1.0e-14, bool print=true) |
| This version will first set_HF(), then solve_core() | |
| void | solve_core (const std::string &method, const std::string &in_core="", std::optional< HF::Breit::Params > breit_params=std::nullopt, double eps_HF=1.0e-14, bool print=true) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | solve_valence (const std::string &in_valence_str="", const bool print=true) |
| Performs Hartree-Fock procedure for valence; populates valence. | |
| void | solve_exotic (const std::string &in_exotic_str, double mass=PhysConst::m_muon, bool screening=true, bool print=true) |
| Solves for exotic atoms (e.g., muonic), including screening. | |
| void | hartreeFockBrueckner (const bool print=true) |
| Forms Brueckner valence orbitals; replaces existing valence states. | |
| void | fitSigma_hfBrueckner (const std::string &valence_list, const std::vector< double > &fit_energies, bool separate_lambda=false) |
| First, fits Sigma to energies, then forms fitted Brueckner orbitals. | |
| void | radiativePotential (QED::RadPot::Scale s, double rcut, double scale_rN, const std::vector< double > &x_spd, bool do_readwrite=true, bool print=true) |
| OLD: deprecated. | |
| void | radiativePotential (const IO::InputBlock &qed_input, bool do_readwrite, bool print) |
| Calculates radiative potential, adds to HF potential. | |
| void | formBasis (const SplineBasis::Parameters ¶ms) |
| Calculates + populates basis [see BSplineBasis]. | |
| void | formSpectrum (const SplineBasis::Parameters ¶ms) |
| Calculates + populates Spectrum [see BSplineBasis]. | |
| void | formSigma (int nmin_core=1, double r0=1.0e-4, double rmax=30.0, int stride=4, bool each_valence=false, bool include_G=false, bool include_Breit=false, int n_max_breit=0, const std::vector< double > &lambdas={}, const std::vector< double > &fk={}, const std::vector< double > &etak={}, bool read_write=true, const std::string &fname="", bool FeynmanQ=false, bool ScreeningQ=false, bool hole_particleQ=false, int lmax=6, double omre=-0.2, double w0=0.01, double wratio=1.5, bool complex_green=false, const std::optional< IO::InputBlock > &ek=std::nullopt, const std::string &ladder_file="", bool derivative=false, bool print_de=false, bool fk_both_lines=false, bool tail_extrapolation=false) |
| Forms + stores correlation potential Sigma. | |
| void | copySigma (const MBPT::CorrelationPotential *const Sigma) |
Copies correlation potential Sigma (nothing if Sigma is null). | |
| void | update_Vnuc (const std::vector< double > &v_new) |
| Replaces nuclear potential, in both Wavefunction and HartreeFock. | |
| std::tuple< double, double > | lminmax_core_range (int l, double eps=0.0) const |
| Returns [min,max] r values for which the core density is > cutoff. | |
| double | H0ab (const DiracSpinor &Fa, const DiracSpinor &Fb) const |
| Returns <a|H|b> for Hamiltonian H (NOT Sigma, Breit, or exchange). | |
| double | H0ab (const DiracSpinor &Fa, const DiracSpinor &dFa, const DiracSpinor &Fb, const DiracSpinor &dFb) const |
| As above, but with the radial derivatives given. | |
| double | Hab (const DiracSpinor &Fa, const DiracSpinor &Fb) const |
| Returns <a|H|b>, including exchange, Sigma, and Breit. | |
| void | ConfigurationInteraction (const IO::InputBlock &input) |
| Runs the CI+MBPT routines; stores wavefunctions. | |
| nlohmann::json | output_to_json (const std::string &out_name="ampsci_output.json") |
| Writes wavefunction information to json file. | |
| Wavefunction::Wavefunction | ( | std::shared_ptr< const Grid > | grid, |
| const Nuclear::Nucleus & | nucleus, | ||
| double | var_alpha = 1.0, |
||
| const std::string & | run_label = "" |
||
| ) |
Construct with a Grid [shared resource] and a nucleus.
Nucleus: isotope data etc. Optional fractional variation in alpha: alpha = var_alpha * alpha_0, alpha_0 =~ 1/137. Forms the nuclear potential; orbitals are formed later (see set_HF, solve_core).
| grid | Radial grid (shared resource) |
| nucleus | Nuclear parameters (isotope, charge distribution) |
| var_alpha | Ratio alpha/alpha_0 |
| run_label | Optional label for output identity (see identity) |
| Wavefunction::Wavefunction | ( | const GridParameters & | gridparams, |
| const Nuclear::Nucleus & | nucleus, | ||
| double | var_alpha = 1.0, |
||
| const std::string & | run_label = "" |
||
| ) |
As above, but Grid is constructed here using given parameters.
|
inline |
Default grid and nucleus (see GridParameters, Nuclear::Nucleus)
|
inline |
Returns a const reference to the radial grid.
|
inline |
Copy of shared_ptr to grid [shared resource].
Used when we want to construct a new object that shares this grid.
|
inline |
Local value of fine-structure constant.
|
inline |
Variation in alpha^2 : x = (alpha/alpha_0)^2 - 1.
|
inline |
Returns Nuclear::nucleus object (contains nuc. parameters)
|
inline |
Nuclear charge, Z.
|
inline |
Nuclear mass number, A.
|
inline |
Nuclear rms charge radius, in fm (femtometres)
|
inline |
Core orbitals (frozen HF core); empty if HF not set.
|
inline |
Valence orbitals (HF or Brueckner orbitals)
|
inline |
HF valence orbitals: copy of valence, as last solved by solve_valence.
|
inline |
Basis, eigenstates of HF potential. Used for MBPT.
Includes Breit and QED (if they are included), but not correlations.
|
inline |
Spectrum: like basis, but includes correlations.
|
inline |
CI solutions, one for each {J, parity}; empty unless CI was run.
|
inline |
CI solutions for given J and parity; nullptr if not found.
J is integer (CI is for two-electron systems); parity is +1 or -1.
|
inline |
Integral tables used to construct the CI Hamiltonians.
Empty unless CI was run; see CI::Integrals.
|
inline |
Nuclear potential.
Only provide const version, since HF and WF version of vnuc must be kept in sync (see update_Vnuc).
|
inline |
Returns ptr to Hartree Fock (class); nullptr if not set.
| std::vector< double > Wavefunction::vlocal | ( | int | l = 0 | ) | const |
Local part of potential, e.g., Vl = Vnuc + Vdir + Vrad_el(l).
Can be l-dependent. Returns a copy. Just Vnuc if HF is not set.
| std::vector< double > Wavefunction::Hmag | ( | int | l = 0 | ) | const |
QED Magnetic form factor.
May return empty vector (no QED, or HF not set). Not typically l-dependent, but may be in future. Returns a copy.
|
inline |
Pointer to QED radiative potential. May be nullptr.
|
inline |
Returns ptr to (const) Correlation Potential, Sigma; nullptr if none.
| int Wavefunction::Ncore | ( | ) | const |
Number of electrons in the core.
| const DiracSpinor * Wavefunction::getState | ( | int | n, |
| int | k | ||
| ) | const |
Finds requested state (n, kappa); returns nullptr if not found.
Searches valence first, then core.
| const DiracSpinor * Wavefunction::getState | ( | std::string_view | state | ) | const |
As above, but takes 'short symbol' (e.g., 6s+, 6p-)
| double Wavefunction::FermiLevel | ( | ) | const |
Returns energy location of the "Fermi Level".
Energy half way between core/valence. Defined: 0.5*( max(e_core) + min(e_valence)), plus a small offset (1e-5; or 1e-3 if there are no valence states, in which case min(e_valence) is taken as zero). If there is no core: 1.1*min(e_valence). Should be -ve.
| double Wavefunction::energy_gap | ( | ) | const |
Energy gap between lowest valence + highest core state.
e(v) - e(c) [should be positive]. Zero if there are no core or no valence states.
|
inline |
Returns full core configuration.
|
inline |
Returns core configuration, in nice output notation.
|
inline |
String of atom info (e.g., "Cs, Z=55 A=133")
|
inline |
e.g., "Cs"
| std::string Wavefunction::identity | ( | ) | const |
Atomic symbol, including core ionisation degree and run_label.
Used as the base name for output and cache files (Sigma, Qk, CI, etc.). Form: symbol + Zion + Breit/QED flag ("b", "q", or "bq") + alpha variation ("_x", with x = (alpha/alpha_0)^2 to 6 significant figures, if |dalpha2()| > 1e-5) + "_run_label" (if not empty). E.g., "Cs1", "Cs1bq_label", "Cs1_1.01".
|
inline |
Optional label for output identity (see identity)
|
inline |
0 for neutral, 1 for singly-ionised etc. (num_val: valence electrons)
|
inline |
I for neutral, II for singly-ionised etc. (num_val: valence electrons)
|
inline |
Effective charge (for core) = Z-N_core.
| void Wavefunction::printCore | ( | ) | const |
Prints table of core orbitals + energies etc.
| void Wavefunction::printValence | ( | const std::vector< DiracSpinor > & | tmp_orbitals = {} | ) | const |
Prints table of valence orbitals + energies etc.
Can optionally give it any list of orbitals to print (default: valence).
| void Wavefunction::printBasis | ( | const std::vector< DiracSpinor > & | the_basis | ) | const |
Prints table of Basis/Spectrum orbitals, compares to HF orbitals.
| bool Wavefunction::isInCore | ( | int | n, |
| int | k | ||
| ) | const |
Check if a state (n, kappa) is in the core list.
| bool Wavefunction::isInValence | ( | int | n, |
| int | k | ||
| ) | const |
Check if a state (n, kappa) is in the valence list.
| std::vector< double > Wavefunction::coreDensity | ( | ) | const |
Calculates rho(r) = sum_c psi^2(r) for core states, c={n,k,m}.
| double Wavefunction::coreEnergyHF | ( | ) | const |
Calculates HF core energy.
Sum of core orbital energies (weighted by occupation), minus the double-counted Coulomb (direct + exchange) and Breit (if included) interactions. QED (if included in the core) enters through the orbital energies. Zero if HF is not set.
| void Wavefunction::set_HF | ( | HF::Method | method = HF::Method::HartreeFock, |
| const std::string & | in_core = "", |
||
| std::optional< HF::Breit::Params > | breit_params = std::nullopt, |
||
| double | eps_HF = 1.0e-14, |
||
| bool | print = true |
||
| ) |
Initialises HF object and populates core orbitals.
Does not solve HF equations (see solve_core). Replaces any existing HF object, including any radiative potential (QED is added later; see radiativePotential).
| method | Mean-field method (HartreeFock, Hartree, KohnSham..) |
| in_core | Core configuration, "[X],nLm,nLm,...", e.g., "[Xe]" or "[Xe],6s1". A ':' may replace one of the commas: shells after it are in the core, but may also be valence states (see solve_valence) |
| breit_params | Breit parameters (nullopt: no Breit). HartreeFock method only: ignored (with a warning) otherwise |
| eps_HF | HF convergence goal (if >= 1, taken as the exponent: 10^-eps_HF) |
| Print method details |
| void Wavefunction::solve_core | ( | bool | print = true | ) |
Performs Hartree-Fock procedure for core (nothing if HF not set)
| void Wavefunction::solve_core | ( | HF::Method | method, |
| const std::string & | in_core = "", |
||
| std::optional< HF::Breit::Params > | breit_params = std::nullopt, |
||
| double | eps_HF = 1.0e-14, |
||
| bool | print = true |
||
| ) |
This version will first set_HF(), then solve_core()
| void Wavefunction::solve_core | ( | const std::string & | method, |
| const std::string & | in_core = "", |
||
| std::optional< HF::Breit::Params > | breit_params = std::nullopt, |
||
| double | eps_HF = 1.0e-14, |
||
| bool | print = true |
||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void Wavefunction::solve_valence | ( | const std::string & | in_valence_str = "", |
| const bool | print = true |
||
| ) |
Performs Hartree-Fock procedure for valence; populates valence.
Adds the states in in_valence_str (basis-string format, e.g., "7sp5d": up to n=7 for s and p, n=5 for d) that are not already in valence, and not in the core (except those after the ':' in the core string; see set_HF). Then solves for all valence states (existing ones are re-solved) in the HF potential, without Sigma, and copies them to hf_valence. If HF is not set, solves in the nuclear potential (H-like).
| void Wavefunction::solve_exotic | ( | const std::string & | in_exotic_str, |
| double | mass = PhysConst::m_muon, |
||
| bool | screening = true, |
||
| bool | print = true |
||
| ) |
Solves for exotic atoms (e.g., muonic), including screening.
Resulting states are included in valence (flagged as exotic); the screening also updates core.
Each state is first solved in the nuclear (+QED) potential. With screening (and a non-empty core), the core HF equations are iterated including the direct potential of the first exotic state; the HF object (core) is then replaced by the screened one (Vnuc itself unchanged), and the exotic states are re-solved in the screened potential.
Note: The exotic states are just added to the valence list, so they can be used more simply with all the modules. However, be careful; for example, RPA will now be meaningless for these states!
| in_exotic_str | States, in basis-string format (e.g., "1s2p") |
| mass | Mass of the exotic particle, in units of m_e |
| screening | Include screening (core and exotic states) |
| Print energies and screening iterations |
screening, any (electron) valence states already present are not re-solved, so are no longer consistent with the screened core. | void Wavefunction::hartreeFockBrueckner | ( | const bool | print = true | ) |
Forms Brueckner valence orbitals; replaces existing valence states.
\( (H_{\rm HF} + \Sigma)\ket{nk} = \varepsilon\ket{nk} \). Does nothing if Sigma has not been formed; prints a warning and does nothing if HF is not set.
| void Wavefunction::fitSigma_hfBrueckner | ( | const std::string & | valence_list, |
| const std::vector< double > & | fit_energies, | ||
| bool | separate_lambda = false |
||
| ) |
First, fits Sigma to energies, then forms fitted Brueckner orbitals.
For each of the first fit_energies.size() valence states (in order), finds the scaling factor lambda such that the Brueckner energy, with lambda*Sigma, matches the given energy (damped iteration; lambda kept within [0.25, 2.5]). By default, fitted lambdas are averaged over each fine-structure pair (same n and l); separate_lambda = true keeps them separate. Then calls hartreeFockBrueckner.
| valence_list | Unused |
| fit_energies | Energies to fit to (au), in the same order as valence; sign ignored (binding energies) |
| separate_lambda | Keep lambdas of fine-structure pairs separate |
| void Wavefunction::radiativePotential | ( | QED::RadPot::Scale | s, |
| double | rcut, | ||
| double | scale_rN, | ||
| const std::vector< double > & | x_spd, | ||
| bool | do_readwrite = true, |
||
| bool | print = true |
||
| ) |
OLD: deprecated.
| void Wavefunction::radiativePotential | ( | const IO::InputBlock & | qed_input, |
| bool | do_readwrite, | ||
| bool | |||
| ) |
Calculates radiative potential, adds to HF potential.
Replaces any existing radiative potential in HF. Included in subsequent HF solutions: call before solve_core to include QED in the core, after it for valence only. Prints a warning and does nothing if HF is not set.
| qed_input | QED options (see QED::ConstructRadPot) |
| do_readwrite | Read/write the potential from/to file |
| Print details |
| void Wavefunction::formBasis | ( | const SplineBasis::Parameters & | params | ) |
Calculates + populates basis [see BSplineBasis].
| void Wavefunction::formSpectrum | ( | const SplineBasis::Parameters & | params | ) |
Calculates + populates Spectrum [see BSplineBasis].
| void Wavefunction::formSigma | ( | int | nmin_core = 1, |
| double | r0 = 1.0e-4, |
||
| double | rmax = 30.0, |
||
| int | stride = 4, |
||
| bool | each_valence = false, |
||
| bool | include_G = false, |
||
| bool | include_Breit = false, |
||
| int | n_max_breit = 0, |
||
| const std::vector< double > & | lambdas = {}, |
||
| const std::vector< double > & | fk = {}, |
||
| const std::vector< double > & | etak = {}, |
||
| bool | read_write = true, |
||
| const std::string & | fname = "", |
||
| bool | FeynmanQ = false, |
||
| bool | ScreeningQ = false, |
||
| bool | hole_particleQ = false, |
||
| int | lmax = 6, |
||
| double | omre = -0.2, |
||
| double | w0 = 0.01, |
||
| double | wratio = 1.5, |
||
| bool | complex_green = false, |
||
| const std::optional< IO::InputBlock > & | ek = std::nullopt, |
||
| const std::string & | ladder_file = "", |
||
| bool | derivative = false, |
||
| bool | print_de = false, |
||
| bool | fk_both_lines = false, |
||
| bool | tail_extrapolation = false |
||
| ) |
Forms + stores correlation potential Sigma.
Constructs Sigma (see MBPT::CorrelationPotential), reading it from file if it exists, and forms it for the valence states (see each_valence, ek). Then applies lambdas, optionally prints the energy shifts, and writes Sigma to file. Requires the basis (formBasis) for the Goldstone sums. Does nothing if the core is empty or HF is not set. Requires the HartreeFock method: prints a warning and does nothing otherwise.
| nmin_core | Minimum n of core states included in polarisation |
| r0 | Sub-grid first point (aB) |
| rmax | Sub-grid last point (aB) |
| stride | Sub-grid stride: every stride-th point of the full grid |
| each_valence | Form Sigma for each valence state; else for the first valence state of each kappa. Ignored if ek is given |
| include_G | Include small-component (g) parts of Sigma |
| include_Breit | Include two-body Breit correction, B2 (only if HF includes Breit) |
| n_max_breit | Maximum n of excited states in B2 (0: all) |
| lambdas | Scaling factors, lambda, for each Sigma, in the order formed |
| fk | Effective screening factors for exchange, for each k (empty: calculated for Feynman with screening) |
| etak | Effective hole-particle factors, for each k (Goldstone only) |
| read_write | Read Sigma from file (if it exists) and write it; false: no file |
| fname | Sigma file name (empty: identity() plus an extension encoding the method) |
| FeynmanQ | Feynman method for direct diagrams; else Goldstone |
| ScreeningQ | Include all-order screening (Feynman only) |
| hole_particleQ | Include hole-particle interaction (Feynman only) |
| lmax | Maximum l of internal lines (Feynman) |
| omre | Real part of frequency for the Im(w) integration (Feynman) |
| w0 | First non-zero point of the Im(w) grid (Feynman) |
| wratio | Ratio of the logarithmic Im(w) grid (Feynman) |
| complex_green | Solve Green's function directly at complex energy (see MBPT::FeynmanOptions) |
| ek | State/energy pairs (energies in au): form Sigma for each at the given energy, instead of the valence energies |
| ladder_file | File with ladder correction, Sigma_L (empty: none) |
| derivative | Also form dSigma/dE |
| print_de | Print MBPT(2) energy corrections for valence |
| fk_both_lines | Apply fk to both Coulomb lines of the exchange diagrams (else outer only) |
| tail_extrapolation | Extrapolate Sigma beyond the sub-grid as a_eff/r^4 (experimental) |
include_G are taken from the file (see MBPT::CorrelationPotential).
|
inline |
Copies correlation potential Sigma (nothing if Sigma is null).
E.g., to re-use Sigma from another Wavefunction (different isotope).
|
inline |
Replaces nuclear potential, in both Wavefunction and HartreeFock.
Allows extra potential to be added to Vnuc: pass vnuc() + extra. Updates both in Wavefunction and HartreeFock, which must be kept in sync. Orbitals are not re-solved, and nucleus() is not updated.
nb: two versions of Vnuc...
| std::tuple< double, double > Wavefunction::lminmax_core_range | ( | int | l, |
| double | eps = 0.0 |
||
| ) | const |
Returns [min,max] r values for which the core density is > cutoff.
Core density for given l; cutoff = eps*max_value. Returns the r values (au) for which the value of \( \rho(r) = \sum|\psi|^2 \) drops below cutoff. Sum goes over all m for given l. Cut-off defined as eps*max, where max is maximum value for rho(r). Set l<0 to get for all l (entire core). Returns the full grid range if there are no core states with given l (or if eps = 0).
| double Wavefunction::H0ab | ( | const DiracSpinor & | Fa, |
| const DiracSpinor & | Fb | ||
| ) | const |
Returns <a|H|b> for Hamiltonian H (NOT Sigma, Breit, or exchange).
Includes the local potential, vlocal (incl. Rad.pot), and the QED magnetic form factor, Hmag. Uses the symmetric form of the derivative term (integrated by parts). Zero if Fa and Fb have different kappa.
| double Wavefunction::H0ab | ( | const DiracSpinor & | Fa, |
| const DiracSpinor & | dFa, | ||
| const DiracSpinor & | Fb, | ||
| const DiracSpinor & | dFb | ||
| ) | const |
As above, but with the radial derivatives given.
dFa and dFb are the derivatives (d/dr) of Fa and Fb; only their g components are used.
| double Wavefunction::Hab | ( | const DiracSpinor & | Fa, |
| const DiracSpinor & | Fb | ||
| ) | const |
Returns <a|H|b>, including exchange, Sigma, and Breit.
H0ab, plus HF exchange (if HF is non-local), Sigma (if formed, including lambda), and Breit (if included in HF). Zero if kappa differs.
| void Wavefunction::ConfigurationInteraction | ( | const IO::InputBlock & | input | ) |
Runs the CI+MBPT routines; stores wavefunctions.
| nlohmann::json Wavefunction::output_to_json | ( | const std::string & | out_name = "ampsci_output.json" | ) |
Writes wavefunction information to json file.
Grid, nuclear parameters, and core, valence, and exotic (muon) orbitals, with a description of each field ("metadata").
| out_name | If given (not empty), will print to that file |