10#include <boost/python/class.hpp>
11#include <boost/python/dict.hpp>
12#include <boost/python/make_constructor.hpp>
13#include <boost/python/make_function.hpp>
14#include <boost/python/register_ptr_to_python.hpp>
25dict neutron(
const Atom &self) {
51static std::shared_ptr<Atom> setAtom(
const std::string &symbol,
const uint16_t a_number = 0,
52 const uint16_t z_number = 0) {
55 return std::shared_ptr<Atom>(
new Atom(atom));
58 else if (symbol.empty()) {
60 return std::shared_ptr<Atom>(
new Atom(atom));
63 return std::shared_ptr<Atom>(
new Atom(atom));
69 register_ptr_to_python<Atom *>();
70 register_ptr_to_python<std::shared_ptr<Atom>>();
72 class_<Atom, boost::noncopyable>(
"Atom", no_init)
74 make_constructor(&setAtom, default_call_policies(),
75 (arg(
"symbol") =
"", arg(
"a_number") = 0, arg(
"z_number") = 0)),
76 "Constructor for Atom class")
77 .def_readonly(
"symbol", &
Atom::symbol,
"The element symbol of this atom")
78 .def_readonly(
"z_number", &
Atom::z_number,
"The atomic number (number of protons) of this atom")
79 .def_readonly(
"a_number", &
Atom::a_number,
"The mass number (number of nucleons) of this atom")
80 .def_readonly(
"abundance", &
Atom::abundance,
"The abundance of this atom")
81 .def_readonly(
"mass", &
Atom::mass,
"The relative atomic mass of this atom")
82 .def_readonly(
"mass_density", &
Atom::mass_density,
"The mass density of this atom in g/cm^3")
83 .def_readonly(
"number_density", &
Atom::number_density,
"The number density of this atom in cm^-3")
84 .def(
"neutron", &neutron, arg(
"self"),
"Neutron cross-section information for this atom");
Struture to hold the common information for an atom.
const std::string symbol
The atomic symbol. In other words the one or two character abbreviation.
const NeutronAtom neutron
Handle to class containing neutronic atomic properties.
const uint16_t z_number
The atomic number, or number of protons, for the atom.
const double abundance
The natural abundance of the isotope as a percentage between 0 and 100.
const uint16_t a_number
The total number of protons and neutrons, or mass number, for the atom for isotopic averages this is ...
const double mass
The atomic mass in units of 'u' (=1g/mol/Na).
const double number_density
The number density in units of cm-3 as calculated from the mass density.
const double mass_density
The atomic mass density in units of g/cm3.
MANTID_KERNEL_DLL const Atom & getAtom(const uint16_t z_number, const uint16_t a_number=0)
double coh_scatt_length_real
The real part of the coherent scattering length in fm.
double tot_scatt_length
The total scattering length in fm.
double inc_scatt_length
The incoherent scattering length in fm.
double coh_scatt_length
The coherent scattering length in fm.
double coh_scatt_length_img
The imaginary part of the coherent scattering length in fm.
double inc_scatt_length_img
The imaginary part of the incoherent scattering length in fm.
double inc_scatt_xs
The incoherent scattering cross section in barns.
double tot_scatt_xs
The total scattering cross section in barns.
double abs_scatt_xs
The absorption cross section for 2200m/s neutrons in barns.
double inc_scatt_length_real
The real part of the incoherent scattering length in fm.
double coh_scatt_xs
The coherent scattering cross section in barns.