ampsci
High-precision calculations for one- and two-valence atomic systems
GenerateOperator.hpp
1#pragma once
2#include "IO/InputBlock.hpp"
3#include "Operators/include.hpp"
4#include "TensorOperator.hpp"
5#include "Wavefunction/Wavefunction.hpp"
6#include <memory>
7#include <string>
8#include <vector>
9
10namespace DiracOperator {
11
12/*!
13 @brief List of available operators, their generator functions, and a short description.
14 @details
15 This list is used by @ref generate() to form operators, and is called in a few modules.
16
17 It is also what gets printed to the screen by:
18 ```shell
19 ampsci -o
20 ```
21
22 @note Operators must be added to this list in order for ampsci to know where to find them, and to document to users what's available.
23*/
24static const std::vector<
25 std::tuple<std::string,
26 std::unique_ptr<DiracOperator::TensorOperator> (*)(
27 const IO::InputBlock &input, const Wavefunction &wf),
28 std::string>>
29 operator_list{
30 {"E1", &generate_E1, "Electric dipole (moment), length form: -|e|r"},
31 {"E1v", &generate_E1v, "Electric dipole, v-form"},
32 {"E2", &generate_E2, "Electric quadrupole moment operator"},
33 {"Ek", &generate_Ek, "Electric multipole moment operator, in low qr limit"},
34 {"ialpha", &generate_ialpha, "i*alpha (propto E1v)"},
35 {"M1", &generate_M1, "Magnetic dipole (relativistic formula)"},
36 {"M1nr", &generate_M1nr, "Non-relativistic M1"},
37 {"Multipole", &generate_Multipole,
38 "Multipole transition operators (Vector,Axial,Scalar,Pseudoscalar)"},
39 {"hfs", &generate_hfs, "Hyperfine structure k-pole operators"},
40 {"fieldshift", &generate_fieldshift, "Field-shift F(r) operator"},
41 {"r", &generate_r, "radial (scalar) |r|"},
42 {"sigma_r", &generate_sigma_r, "scalar sigma.r operator"},
43 {"pnc", &generate_pnc, "NSI PNC operator"},
44 {"Vrad", &generate_Vrad, "QED Radiative potential"},
45 {"MLVP", &generate_MLVP,
46 "Magnetic-Loop vacuum polarisation vertex correction to HFS"},
47 {"p", &generate_p, "Momentum operator"},
48 {"l", &generate_l, "Orbital L"},
49 {"s", &generate_s, "Spin S (not sigma)"}};
50
51//------------------------------------------------------------------------------
52
53//! Returns a unique_ptr (polymorphic) to the requested operator, with given properties
54/*!
55 @details
56
57 From the command line, use
58 ```shell
59 ampsci -o
60 ```
61 to get a list of available operators.
62 For a specific operator 'OperatorName', use:
63 ```shell
64 ampsci -o OperatorName
65 ```
66 to see available run-time options for that operator.
67
68*/
69std::unique_ptr<DiracOperator::TensorOperator>
70generate(std::string_view operator_name, const IO::InputBlock &input,
71 const Wavefunction &wf);
72
73//! List available operators
74void list_operators();
75
76} // namespace DiracOperator
Holds list of Options, and a list of other InputBlocks. Can be initialised with a list of options,...
Definition InputBlock.hpp:153
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Definition Wavefunction.hpp:37
Dirac operators: TensorOperator base class and derived implementations for single-particle (one-body)...
Definition GenerateOperator.cpp:3
std::unique_ptr< DiracOperator::TensorOperator > generate(std::string_view operator_name, const IO::InputBlock &input, const Wavefunction &wf)
Returns a unique_ptr (polymorphic) to the requested operator, with given properties.
Definition GenerateOperator.cpp:7
void list_operators()
List available operators.
Definition GenerateOperator.cpp:40