ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
Loading...
Searching...
No Matches
PNC.hpp
1#pragma once
2#include "DiracOperator/TensorOperator.hpp"
3#include "IO/InputBlock.hpp"
4#include "Wavefunction/Wavefunction.hpp"
5
6namespace DiracOperator {
7
8//==============================================================================
10
31class PNCnsi final : public ScalarOperator {
32public:
33 PNCnsi(double c, double t, const Grid &rgrid, double factor = 1.0,
34 const std::string &in_units = "iQw*e-11")
35 : ScalarOperator(Parity::odd, factor * PhysConst::GFe11 / std::sqrt(8.0),
36 Nuclear::fermiNuclearDensity_tcN(t, c, 1.0, rgrid),
37 {0, -1, +1, 0}, 0, Realness::imaginary),
38 m_unit(in_units) {}
39 std::string name() const override final { return "pnc-nsi"; }
40 std::string units() const override final { return m_unit; }
41
42private:
43 const std::string m_unit{"iQw*e-11"};
44};
45
46class PNCnsi_const final : public ScalarOperator {
47public:
48 PNCnsi_const(double Rnuc_au, double factor = 1.0,
49 const std::string &in_units = "iQw*e-11")
50 : ScalarOperator(Parity::odd,
51 (3.0 / (4.0 * M_PI * Rnuc_au * Rnuc_au * Rnuc_au)) *
52 factor * PhysConst::GFe11 / std::sqrt(8.0),
53 {}, {0, -1, +1, 0}, 0, Realness::imaginary),
54 m_unit(in_units) {}
55 std::string name() const override final { return "pnc_const"; }
56 std::string units() const override final { return m_unit; }
57
58private:
59 const std::string m_unit{"iQw*e-11"};
60};
61
62//==============================================================================
63inline std::unique_ptr<DiracOperator::TensorOperator>
64generate_pnc(const IO::InputBlock &input, const Wavefunction &wf) {
65 using namespace DiracOperator;
66 input.check(
67 {{{"c",
68 "Half-density radius for Fermi rho(r). [defaut: from wavefunction]"},
69 {"t", "skin thickness [2.3]"},
70 {"N", "Neutron number, for units [default: from wavefunction]"},
71 {"print", "Write details to screen [true]"}}});
72 if (input.has_option("help")) {
73 return nullptr;
74 }
75 const auto r_rms = wf.get_rrms();
76 const auto c = input.get("c", Nuclear::c_hdr_formula_rrms_t(r_rms));
77 const auto t = input.get("t", Nuclear::default_t);
78 const auto N = input.get("N", wf.Anuc() - wf.Znuc());
79 std::string units =
80 N == 1 ? "i(-Qw)e-11" : "i(-Qw/" + std::to_string(N) + ")e-11";
81 if (input.get("print", true))
82 std::cout << "pnc: with c=" << c << ", t=" << t << " [" << units << "]\n";
83 return std::make_unique<PNCnsi>(c, t, wf.grid(), -1.0 * N, "units");
84}
85
86} // namespace DiracOperator
Nuclear-spin independent PNC operator (Qw)
Definition PNC.hpp:31
std::string name() const override final
Returns "name" of operator (e.g., 'E1')
Definition PNC.hpp:39
std::string units() const override final
Returns units of operator (usually au, may be MHz, etc.)
Definition PNC.hpp:40
Speacial case for scalar operator.
Definition TensorOperator.hpp:233
Holds grid, including type + Jacobian (dr/du)
Definition Grid.hpp:31
Holds list of Options, and a list of other InputBlocks. Can be initialised with a list of options,...
Definition InputBlock.hpp:142
bool check(std::initializer_list< std::string > blocks, const std::vector< std::pair< std::string, std::string > > &list, bool print=false) const
Check all the options and blocks in this; if any of them are not present in 'list',...
Definition InputBlock.hpp:594
bool has_option(std::string_view key) const
Check is option is present (even if not set) in current block.
Definition InputBlock.hpp:201
T get(std::string_view key, T default_value) const
If 'key' exists in the options, returns value. Else, returns default_value. Note: If two keys with sa...
Definition InputBlock.hpp:417
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Definition Wavefunction.hpp:36
const Grid & grid() const
Returns a const reference to the radial grid.
Definition Wavefunction.hpp:81
int Znuc() const
Nuclear charge, Z.
Definition Wavefunction.hpp:98
int Anuc() const
Nuclear mass number, A.
Definition Wavefunction.hpp:100
double get_rrms() const
Nuclear rms charge radii, in fm (femptometres)
Definition Wavefunction.hpp:102
Dirac Operators: General + derived.
Definition GenerateOperator.cpp:12
double c_hdr_formula_rrms_t(double rrms, double t)
Calculates c from rrms and t.
Definition NuclearData.cpp:73
std::vector< double > fermiNuclearDensity_tcN(double t, double c, double Z_norm, const Grid &grid)
Fermi charge distribution, rho(r) - normalised to Z_norm.
Definition NuclearPotentials.cpp:321
Set of commonly-used Physics constants.
Definition PhysConst_constants.hpp:9
constexpr double GFe11
Fermi weak constant * 10^11, in atomic units.
Definition PhysConst_constants.hpp:119
constexpr double c
speed of light in a.u. (=1/alpha)
Definition PhysConst_constants.hpp:63