![]() |
TkN 2.5
Toolkit for Nuclei
|
Represents a nucleus and provides access to its properties. More...
Represents a nucleus and provides access to its properties.
A nucleus made of Z protons and N neutrons.
A tknucleus can be created by symbol, by (Z, A), or by Z alone (in which case the most stable isotope is returned). It provides access to ground-state properties (spin-parity, lifetime, mass excess, binding energy, Q-values, separation energies, decay modes, fission yields, X-rays, etc.) as well as to the level scheme via get_level_scheme().
Example:
To access any nuclear property, a tknucleus needs to be created. it can be created using its symbol, or its proton and mass number:
A nucleus can also be create only using it's element name or charge number. In such case, the most stable isotope will be returned, and the most abundant in case of multiple stable nuclei:
The main properties of a nucleus can be printed with:
For each element, the following properties can be available:
Then, for each isotope, the following properties can be available from the databases (see (see the data sources section)):
From the mass excess values, the following properties are calculated in TkN:
to see the available properties for a given nucleus, use the tknucleus::list_properties() method:
The results can be filtered using a regular expression:
To test if a property is available, use the use the tknucleus::has_property() method:
For a faster access to the most used properties, few specific methods have been added to tknucleus objects:
| method name | description |
|---|---|
| get_a() | nucleon number |
| get_n() | neutron number |
| get_z() | proton number |
| get_symbol() | nucleus name (ex: 12C) |
| get_element_name() | element name (ex: Carbon) |
| get_element_symbol() | element symbol (ex: C) |
| is_known() | returns true if the nucleus is known in the database |
| is_stable() | returns true if the nucleus is stable |
| is_bound() | returns true if the binding energy is positive |
| is_z_magic() | is Z a magic number |
| is_n_magic() | is N a magic number |
| is_doubly_magic() | is nucleus doubly magic |
| get_abundance() | abundance for stable nuclei (in %) |
| get_binding_energy_over_a() | binding energy per nucleon (MeV) (unit as parameter) |
| get_lifetime() | ground state lifetime in seconds (unit as parameter) |
| get_mass_excess() | mass excess (MeV) (unit as parameter) |
| get_radius() | charge radius (fm) |
| get_magnetic_dipole() | magnetic dipole moment (μN) |
| get_electric_quadrupole() | electric quadrupole moment (barn) |
| get_jpi() | ground state spin and parity as a string |
| get_xrays() | vector of the known xray energies |
| get_decay_mode_str() | decay modes as a string |
| get_decay_modes() | decay modes as a vector of decay and branching ratio |
| get_discovery_year() | year of discovery of the isotope |
| get_ground_state() | access the ground state tkn::tklevel |
| get_level_scheme() | access the tkn::tklevel_scheme |
| get_fission_yield(tkstring _parent, bool _cumulative=false) | get the fission yield of for a given fissioning nucleus (cumulative or not) |
The above methods giving access to a measure (ex: get_lifetime() ), are directly returning the value as a double. Dedicated methods allows to access the tkn::tkmeasure to access to units, uncertainties... etc (see Measures and units).
For exemple, for the lifetime, the method get_lifetime_measure() returns the tkmeasure object.
Definition at line 50 of file tknucleus.h.
#include <tknucleus.h>
Public Member Functions | |
| tknucleus () | |
| default constructor | |
| tknucleus (const char *_symbol) | |
| tknucleus constructor taking a string as input | |
| tknucleus (int _Z) | |
| tknucleus constructor taking only Z as input | |
| tknucleus (int _Z, int _A) | |
| tknucleus constructor taking Z and A as input | |
| virtual | ~tknucleus () override=default |
| int | get_a () |
| return the mass number | |
| double | get_abundance () const |
| returns the natural abundance in percent | |
| shared_ptr< tkmeasure > | get_abundance_measure () |
| return the abundance tkmeasure object | |
| double | get_binding_energy_over_a (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::MeV) |
| returns the binding energy per mass unit in MeV | |
| shared_ptr< tkmeasure > | get_binding_energy_over_a_measure () |
| returns the binding energy tkmeasure object | |
| tkstring | get_decay_mode_str () |
| return the decay modes as a string | |
| vector< pair< tkstring, double > > | get_decay_modes () |
| return the decay modes as a vector of decay | |
| int | get_discovery_year () |
| return the discovery year | |
| double | get_electric_quadrupole () |
| return the electric quadrupole moment in barn by default | |
| shared_ptr< tkmeasure > | get_electric_quadrupole_measure () |
| return the electric quadrupole moment tkmeasure object | |
| const tkstring & | get_element_name () |
| return the name of the chemical element | |
| const tkstring & | get_element_symbol () |
| return the symbol of the chemical element | |
| double | get_fission_yield (tkstring _parent, bool _cumulative=false) |
| returns the fission yield of the current nucleus | |
| shared_ptr< tklevel > | get_ground_state () |
| return the ground state level (nullptr if no GS known) | |
| const tkstring & | get_jpi () const |
| return the ground state spin and parity as a string | |
| shared_ptr< tklevel_scheme > | get_level_scheme () |
| return a tklevel_scheme shared pointer to the nucleus level scheme | |
| double | get_lifetime (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::s) |
| returns the lifetime in second | |
| shared_ptr< tkmeasure > | get_lifetime_measure () const |
| returns the lifetime tkmeasure object | |
| tkstring | get_lifetime_str () |
| returns the lifetime in string (using the best adapted unit) | |
| double | get_magnetic_dipole () |
| return the magnetic dipole moment in mun by default | |
| shared_ptr< tkmeasure > | get_magnetic_dipole_measure () |
| return the magnetic dipole moment tkmeasure object | |
| double | get_mass_excess (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::keV) |
| return the mass excess in keV by default | |
| shared_ptr< tkmeasure > | get_mass_excess_measure () |
| return the mass excess tkmeasure object | |
| int | get_n () |
| return the neutron number | |
| double | get_radius () const |
| returns the radius in fm | |
| shared_ptr< tkmeasure > | get_radius_measure () |
| return the radius tkmeasure object | |
| const tkspin_parity & | get_spin_parity () |
| return the ground state spin and parity object | |
| const tkstring & | get_symbol () |
| return the nucleus symbol | |
| const vector< shared_ptr< tkmeasure > > | get_xrays () |
| returns the list of xrays | |
| int | get_z () |
| return the proton number | |
| bool | is_bound () const |
| test if the nucleus is bound (positive binding energy) | |
| bool | is_doubly_magic () |
| return true in case of z and n are magic numbers | |
| bool | is_known () const |
| test if the nucleus is known | |
| bool | is_n_magic () |
| return true in case of n is a magic number | |
| bool | is_stable () const |
| test if the nucleus is stable | |
| bool | is_z_magic () |
| return true in case of z is a magic number | |
| void | print () const |
| print the main nucleus properties | |
Public Member Functions inherited from tkproperty_list | |
| tkproperty_list (tkstring _name) | |
| virtual | ~tkproperty_list ()=default |
| shared_ptr< tkmeasure > | get (const tkstring &_property) const |
| get the property as tkmeasure | |
| vector< shared_ptr< tkmeasure > > | get_data_properties (const tkstring &_opt="*") |
| get a vector of data properties according to a regular expression | |
| const auto & | get_properties () const |
| get the properties map | |
| tkstring | get_property (const tkstring &_property) const |
| get the property value as a string | |
| tkstring | get_property_type (const tkstring &_property) const |
| get the property type as a string | |
| tkstring | get_property_unit (const tkstring &_property) const |
| get the property unnit as a string | |
| bool | has_property (const tkstring &_property) const |
| to check if the property is available | |
| void | list_data_properties (const tkstring &_opt="*") const |
| list the available tkmeasure properties | |
| void | list_properties (const tkstring &_opt="*") const |
| list the available properties | |
Friends | |
| class | tkmanager |
|
inline |
default constructor
Definition at line 72 of file tknucleus.h.
| tknucleus | ( | int | _Z, |
| int | _A ) |
tknucleus constructor taking Z and A as input
| _Z | proton number |
| _A | nucleon number |
Definition at line 261 of file tknucleus.cpp.
| tknucleus | ( | int | _Z | ) |
tknucleus constructor taking only Z as input
| _Z | proton number |
The most stable nucleus is returned and the most abundant if more than one stable
Definition at line 285 of file tknucleus.cpp.
| tknucleus | ( | const char * | _symbol | ) |
tknucleus constructor taking a string as input
| _symbol | nucleus symbol (ex: "12C") |
if only the element symbol is given, the most stable nucleus is returned (and the most abundant if more than one stable)
Definition at line 309 of file tknucleus.cpp.
|
overridevirtualdefault |
|
inline |
return the mass number
Definition at line 88 of file tknucleus.h.
| double get_abundance | ( | ) | const |
returns the natural abundance in percent
This method returns the natural abundance of the nucleus in percent. in case no abundance is known for this nucleus, a value of -1 is returned. It can be tested using tknucleus::has_property("abundance") prior to call this method or std::is_nan() on the returned value.
Definition at line 396 of file tknucleus.cpp.
|
inline |
return the abundance tkmeasure object
Definition at line 119 of file tknucleus.h.
| double get_binding_energy_over_a | ( | const tkunit_manager::units_keys | _unit = tkunit_manager::units_keys::MeV | ) |
returns the binding energy per mass unit in MeV
| _unit | unit of the returned result. MeV are used by default |
This method returns the binding energy per mass unit of the nucleus in unit of _units. A std::nan(1) is returned in case no mass excess is known for this nucleus. It can be tested using tknucleus::has_property("binding_energy_overA") prior to call this method or std::is_nan() on the returned value.
Definition at line 426 of file tknucleus.cpp.
|
inline |
returns the binding energy tkmeasure object
Definition at line 129 of file tknucleus.h.
|
inline |
return the decay modes as a string
Definition at line 147 of file tknucleus.h.
| vector< pair< tkstring, double > > get_decay_modes | ( | ) |
return the decay modes as a vector of decay
This method returns the different known decay modes as a vector of pair containing the decay as a string and the ratio as a double. A ratio value of -1 means that the value or decay is uncertain
Definition at line 532 of file tknucleus.cpp.
|
inline |
return the discovery year
Definition at line 150 of file tknucleus.h.
| double get_electric_quadrupole | ( | ) |
return the electric quadrupole moment in barn by default
This method returns the electric quadrupole moment of the nucleus in barn. in case no abundance is known for this nucleus, a value of -1 is returned. It can be tested using tknucleus::has_property("electric_quadrupole") prior to call this method or std::is_nan() on the returned value.
Definition at line 383 of file tknucleus.cpp.
|
inline |
return the electric quadrupole moment tkmeasure object
Definition at line 114 of file tknucleus.h.
|
inline |
return the name of the chemical element
Definition at line 81 of file tknucleus.h.
|
inline |
return the symbol of the chemical element
Definition at line 79 of file tknucleus.h.
| double get_fission_yield | ( | tkstring | _parent, |
| bool | _cumulative = false ) |
returns the fission yield of the current nucleus
| _parent | name of the fissioning nucleus |
| _cumulative | if true, returns the cumulative fission yield |
This method returns fission yield of the current nucleus for a given fissioning nucleus _parent. returns 0 if no fission yield is existing. Available fissioning nucleus:
Definition at line 466 of file tknucleus.cpp.
| shared_ptr< tklevel > get_ground_state | ( | ) |
return the ground state level (nullptr if no GS known)
Returns the ground state level of the nucleus.
The ground state is defined as the first level (lowest energy) in the default dataset.
Definition at line 509 of file tknucleus.cpp.
|
inline |
return the ground state spin and parity as a string
Definition at line 165 of file tknucleus.h.
| shared_ptr< tklevel_scheme > get_level_scheme | ( | ) |
return a tklevel_scheme shared pointer to the nucleus level scheme
Definition at line 345 of file tknucleus.cpp.
| double get_lifetime | ( | const tkunit_manager::units_keys | _unit = tkunit_manager::units_keys::s | ) |
returns the lifetime in second
| _unit | unit of the returned result. second is used by default |
This method returns the groundstate lifetime of the nucleus in unit of _units. A std::nan(1) is returned in case no lifetime is known for this nucleus. It can be tested using tknucleus::has_property("lifetime") prior to call this method or std::is_nan() on the returned value.
Definition at line 443 of file tknucleus.cpp.
|
inline |
returns the lifetime tkmeasure object
Definition at line 134 of file tknucleus.h.
| tkstring get_lifetime_str | ( | ) |
returns the lifetime in string (using the best adapted unit)
This method returns the level lifetime as string using the best adapted unit
Definition at line 478 of file tknucleus.cpp.
| double get_magnetic_dipole | ( | ) |
return the magnetic dipole moment in mun by default
This method returns the magnetic dipole moment of the nucleus in mun. in case no abundance is known for this nucleus, a value of -1 is returned. It can be tested using tknucleus::has_property("magnetic_dipole") prior to call this method or std::is_nan() on the returned value.
Definition at line 370 of file tknucleus.cpp.
|
inline |
return the magnetic dipole moment tkmeasure object
Definition at line 109 of file tknucleus.h.
| double get_mass_excess | ( | const tkunit_manager::units_keys | _unit = tkunit_manager::units_keys::keV | ) |
return the mass excess in keV by default
| _unit | unit of the returned result. keV are used by default |
This method returns the mass excess of the nucleus in unit of _units. A std::nan(1) is returned in case no mass excess is known for this nucleus. It can be tested using tknucleus::has_property("mass_excess") prior to call this method or std::is_nan() on the returned value.
Definition at line 409 of file tknucleus.cpp.
|
inline |
return the mass excess tkmeasure object
Definition at line 124 of file tknucleus.h.
|
inline |
return the neutron number
Definition at line 86 of file tknucleus.h.
| double get_radius | ( | ) | const |
returns the radius in fm
This method returns the charge radius in fm. in case no radius is known for this nucleus, a value of -1 is returned. It can be tested using tknucleus::has_property("radius") prior to call this method or std::is_nan() on the returned value.
Definition at line 357 of file tknucleus.cpp.
|
inline |
return the radius tkmeasure object
Definition at line 104 of file tknucleus.h.
|
inline |
return the ground state spin and parity object
Definition at line 163 of file tknucleus.h.
|
inline |
return the nucleus symbol
Definition at line 91 of file tknucleus.h.
|
inline |
returns the list of xrays
Definition at line 168 of file tknucleus.h.
|
inline |
return the proton number
Definition at line 84 of file tknucleus.h.
| bool is_bound | ( | ) | const |
test if the nucleus is bound (positive binding energy)
Returns true if the nucleus has a positive binding energy.
A nucleus beyond the proton or neutron drip line has a negative binding energy and is therefore unbound.
Definition at line 521 of file tknucleus.cpp.
|
inline |
return true in case of z and n are magic numbers
Definition at line 98 of file tknucleus.h.
|
inline |
test if the nucleus is known
Definition at line 156 of file tknucleus.h.
| bool is_n_magic | ( | ) |
return true in case of n is a magic number
Definition at line 339 of file tknucleus.cpp.
|
inline |
test if the nucleus is stable
Definition at line 158 of file tknucleus.h.
| bool is_z_magic | ( | ) |
return true in case of z is a magic number
Definition at line 333 of file tknucleus.cpp.
| void print | ( | ) | const |
print the main nucleus properties
Prints the main properties of the nucleus to the terminal.
Prints the nucleus symbol, Z and N, ground state spin-parity, and for radioactive nuclei the lifetime and decay modes. For stable nuclei, the natural abundance is shown.
Example:
Definition at line 559 of file tknucleus.cpp.
|
friend |
Definition at line 52 of file tknucleus.h.