2 #include "DiracOperator/GenerateOperator.hpp"
3 #include "DiracOperator/Operators/hfs.hpp"
4 #include "DiracOperator/TensorOperator.hpp"
5 #include "IO/InputBlock.hpp"
6 #include "Physics/FGRadPot.hpp"
7 #include "Physics/PhysConst_constants.hpp"
8 #include "Wavefunction/Wavefunction.hpp"
9 #include "qip/Vector.hpp"
20 std::string
name() const override final {
return "Vrad"; }
21 std::string
units() const override final {
return "au"; }
25 auto dF = m_Vrad.
Vel(Fb.l()) * Fb;
27 const auto &Hmag = m_Vrad.Hmag(Fb.l());
28 dF.f() -= Hmag * Fb.g();
29 dF.g() -= Hmag * Fb.f();
30 if (kappa_a != Fb.kappa())
41 const QED::RadPot &RadPot()
const {
return m_Vrad; }
48 inline std::unique_ptr<DiracOperator::TensorOperator>
52 {{{
"Ueh",
" Uehling (vacuum pol). [1.0]"},
53 {
"SE_h",
" self-energy high-freq electric. [1.0]"},
54 {
"SE_l",
" self-energy low-freq electric. [1.0]"},
55 {
"SE_m",
" self-energy magnetic. [1.0]"},
56 {
"WK",
" Wickman-Kroll. [0.0]"},
57 {
"rcut",
"Maximum radius (au) to calculate Rad Pot for [5.0]"},
58 {
"scale_rN",
"Scale factor for Nuclear size. 0 for pointlike, 1 for "
60 {
"scale_l",
"List of doubles. Extra scaling factor for each l e.g., "
61 "1,0,1 => include for s and d, but not for p [1.0]"},
62 {
"readwrite",
"Read/write potential? [true]"}}});
67 const auto x_Ueh = input.
get(
"Ueh", 1.0);
68 const auto x_SEe_h = input.
get(
"SE_h", 1.0);
69 const auto x_SEe_l = input.
get(
"SE_l", 1.0);
70 const auto x_SEm = input.
get(
"SE_m", 1.0);
71 const auto x_wk = input.
get(
"WK", 0.0);
72 const auto rcut = input.
get(
"rcut", 5.0);
73 const auto scale_rN = input.
get(
"scale_rN", 1.0);
74 const auto x_spd = input.
get(
"scale_l", std::vector{1.0});
75 const auto readwrite = input.
get(
"readwrite",
true);
78 std::sqrt(5.0 / 3.0) * scale_rN * wf.
nucleus().r_rms() / PhysConst::aB_fm;
81 {x_Ueh, x_SEe_h, x_SEe_l, x_SEm, x_wk}, x_spd,
true,
84 return std::make_unique<Vrad>(std::move(qed));
109 h0->rank(), h0->
parity() == 1 ? Parity::even : Parity::odd,
110 h0->
getc(), vertex_func(rgrid, a, b, h0->
getv()), h0->get_d_order(),
111 h0->
imaginaryQ() ? Realness::imaginary : Realness::real,
112 h0->freqDependantQ()),
115 std::string
name() const override final {
116 return m_h0->name() +
"_vertexQED";
118 std::string
units() const override final {
return m_h0->units(); }
120 double angularF(
const int ka,
const int kb)
const override final {
121 return m_h0->angularF(ka, kb);
124 double angularCff(
int ka,
int kb)
const override final {
125 return m_h0->angularCff(ka, kb);
127 double angularCgg(
int ka,
int kb)
const override final {
128 return m_h0->angularCgg(ka, kb);
130 double angularCfg(
int ka,
int kb)
const override final {
131 return m_h0->angularCfg(ka, kb);
133 double angularCgf(
int ka,
int kb)
const override final {
134 return m_h0->angularCgf(ka, kb);
146 static double a(
double z) {
return 1.0 + 28.5 / z; }
156 std::vector<double> v = {}) {
164 for (
auto i = 0ul; i < rgrid.
num_points(); ++i) {
165 auto exp = a * a0 * std::exp(-b * rgrid.
r(i) / a0);
180 h0->rank(), h0->
parity() == 1 ? Parity::even : Parity::odd,
181 h0->
getc(), MLVP_func(rgrid, rN, h0->
getv()), h0->get_d_order(),
182 h0->
imaginaryQ() ? Realness::imaginary : Realness::real,
183 h0->freqDependantQ()),
186 std::string
name() const override final {
return "MLVP"; }
187 std::string
units() const override final {
return m_h0.
units(); }
189 double angularF(
const int ka,
const int kb)
const override final {
192 double angularCff(
int ka,
int kb)
const override final {
193 return m_h0.angularCff(ka, kb);
195 double angularCgg(
int ka,
int kb)
const override final {
196 return m_h0.angularCgg(ka, kb);
198 double angularCfg(
int ka,
int kb)
const override final {
199 return m_h0.angularCfg(ka, kb);
201 double angularCgf(
int ka,
int kb)
const override final {
202 return m_h0.angularCgf(ka, kb);
212 static std::vector<double> MLVP_func(
const Grid &rgrid,
double rN,
213 std::vector<double> v = {}) {
222 for (
auto i = 0ul; i < rgrid.
num_points(); ++i) {
233 inline std::unique_ptr<DiracOperator::TensorOperator>
238 "Nuclear radius (in fm), for finite-nuclear size "
239 "correction to Uehling loop. If not given, taken from wavefunction."},
241 "Options for hyperfine operator that sits inside the MLVP operator. "
242 "Note: should use pointlike F(r)! [see `ampsci -o hfs`]."}});
248 const auto t_options = input.
getBlock(
"hfs_options");
251 if (!oper_options.get(
"nuc_mag")) {
258 input.
get(
"rN", std::sqrt(5.0 / 3.0) * wf.
nucleus().r_rms());
260 if (oper_options.get(
"print",
true)) {
261 std::cout <<
"\nGenerate MLVP operator for hfs, with parameters:\n";
263 std::cout <<
"Using finite nuclear charge in Uehling loop, with rN="
264 << rN_fm <<
" fm.\n";
266 std::cout <<
"Using pointlike Uehling loop.\n";
269 const auto h = generate_hfs(oper_options, wf);
271 const auto r_N_au = rN_fm / PhysConst::aB_fm;
Magnetic loop vacuum polarisation (Uehling vertex)
Definition: QED.hpp:174
std::string units() const override final
Returns units of operator (usually au, may be MHz, etc.)
Definition: QED.hpp:187
std::string name() const override final
Returns "name" of operator (e.g., 'E1')
Definition: QED.hpp:186
MLVP(const DiracOperator::hfs *const h0, const Grid &rgrid, double rN)
rN is nuclear (charge) radius, in atomic units
Definition: QED.hpp:178
double angularF(const int ka, const int kb) const override final
angularF: links radiation integral to RME. RME = <a||h||b> = angularF(a,b) * radial_int(a,...
Definition: QED.hpp:189
Speacial case for scalar operator.
Definition: TensorOperator.hpp:233
General operator (virtual base class); operators derive from this.
Definition: TensorOperator.hpp:110
bool imaginaryQ() const
returns true if operator is imaginary (has imag MEs)
Definition: TensorOperator.hpp:171
virtual std::string units() const
Returns units of operator (usually au, may be MHz, etc.)
Definition: TensorOperator.hpp:186
int parity() const
returns parity, as integer (+1 or -1)
Definition: TensorOperator.hpp:174
virtual double angularF(const int, const int) const =0
angularF: links radiation integral to RME. RME = <a||h||b> = angularF(a,b) * radial_int(a,...
const std::vector< double > & getv() const
Returns a const ref to vector v.
Definition: TensorOperator.hpp:165
double getc() const
Returns a const ref to constant c.
Definition: TensorOperator.hpp:167
Effective VertexQED operator.
Definition: QED.hpp:103
static std::vector< double > vertex_func(const Grid &rgrid, double a, double b, std::vector< double > v={})
Takes existing radial vector, multiplies by:
Definition: QED.hpp:155
std::string units() const override final
Returns units of operator (usually au, may be MHz, etc.)
Definition: QED.hpp:118
std::string name() const override final
Returns "name" of operator (e.g., 'E1')
Definition: QED.hpp:115
static double a(double z)
Fitting factor for hyperfine. Default a(Z)
Definition: QED.hpp:146
double angularF(const int ka, const int kb) const override final
angularF: links radiation integral to RME. RME = <a||h||b> = angularF(a,b) * radial_int(a,...
Definition: QED.hpp:120
Flambaum-ginges radiative potential operator.
Definition: QED.hpp:16
virtual double radialIntegral(const DiracSpinor &Fa, const DiracSpinor &Fb) const override final
Defined via <a||h||b> = angularF(a,b) * radialIntegral(a,b) (Note: if radial_rhs is overridden,...
Definition: QED.hpp:35
std::string units() const override final
Returns units of operator (usually au, may be MHz, etc.)
Definition: QED.hpp:21
std::string name() const override final
Returns "name" of operator (e.g., 'E1')
Definition: QED.hpp:20
virtual DiracSpinor radial_rhs(const int kappa_a, const DiracSpinor &Fb) const override final
radial_int = Fa * radial_rhs(a, Fb) (a needed for angular factor)
Definition: QED.hpp:23
Units: Assumes g in nuc. magneton units (magnetic), and Q in barns (electric), and rN is atomic units...
Definition: hfs.hpp:208
Stores radial Dirac spinor: F_nk = (f, g)
Definition: DiracSpinor.hpp:41
Holds grid, including type + Jacobian (dr/du)
Definition: Grid.hpp:31
auto num_points() const
Number of grid points.
Definition: Grid.hpp:64
const std::vector< double > & r() const
Grid points, r.
Definition: Grid.hpp:75
Class holds Flambaum-Ginges QED Radiative Potential.
Definition: RadPot.hpp:15
std::vector< double > Vel(int l=0) const
Returns entire electric part of potential.
Definition: RadPot.cpp:151
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Definition: Wavefunction.hpp:36
int Znuc() const
Nuclear charge, Z.
Definition: Wavefunction.hpp:98
const Grid & grid() const
Returns a const reference to the radial grid.
Definition: Wavefunction.hpp:81
const Nuclear::Nucleus & nucleus() const
Returns Nuclear::nucleus object (contains nuc. parameters)
Definition: Wavefunction.hpp:96
Dirac Operators: General + derived.
Definition: GenerateOperator.cpp:12
double Q_MLVP(double r, double rN)
Magnetic-loop vacuum polarisation, includes finite-nuclear size.
Definition: FGRadPot.cpp:280
constexpr double alpha
fine-structure constant
Definition: PhysConst_constants.hpp:13
namespace qip::overloads provides operator overloads for std::vector
Definition: Vector.hpp:450
Simple struct; holds key-value pair, both strings. == compares key.
Definition: InputBlock.hpp:105