TkN 2.1
Toolkit for Nuclei
tknucleus Class Reference

A nucleus made of Z protons and N neutrons. More...

Detailed Description

A nucleus made of Z protons and N neutrons.

To access any nuclear property, a tkn::tknucleus needs to be created. it can be created using its symbol, or its proton and mass number:

tknucleus nuc("235U");
tknucleus nuc2(92,235);
A nucleus made of Z protons and N neutrons.
Definition: tknucleus.h:54
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:
tknucleus nuc("U");
tknucleus nuc2(92);
The main properties of a nucleus can be printed with:
tknucleus nuc1("12C");
nuc1.print()
[ INFO ] 12C (Z=6, N=6) properties:
[ INFO ] Ground state configuration: 0+
[ INFO ] Stable nucleus, abundance: 98.93 %
tknucleus nuc2("U");
nuc2.print()
[ INFO ] 238U (Z=92, N=146) properties:
[ INFO ] Ground state configuration: 0+
[ INFO ] Radioactive nucleus:
[ INFO ] lifetime = 4e+09 (6e+06) y
[ INFO ] Decay: [A;100][SF;5.4e-05]
For each element, the following properties can be available:
  • charge
  • symbol
  • elemen_name
  • group block
  • standard state
  • atomic mass (u)
  • electronic configuration
  • atomic radius (van der Waals) (pm)
  • ionization energy (eV)
  • melting point (K)
  • boiling point (K)
  • density (g/cm³)
  • year discovered
  • list of X-rays (keV)
Then, for each isotope, the following properties can be available from the databases (see (see the data sources section)):
  • abundance (%)
  • decay mode (returned as a string)
  • charge radius (fm)
  • electric quadrupole (barn)
  • magnetic dipole (μN)
  • mass excess (keV)
  • lifetime
  • spin-parity
  • quadrupole deformation ß²
  • fission yields:
    • thermal neutron-induced fission yields for 235-Uranium
    • fast neutron-induced fission yields for 238-Uranium
    • thermal neutron-induced fission yields for 239-Plutonium
    • thermal neutron-induced fission yields for 241-Plutonium
    • spontaneous fission yields for 252-Californium
  • cumulative fission yields:
    • availaible for each independant fission yield cited above
  • year of discovery of the isotope
From the mass excess values, the following properties are calculated in TkN:
  • binding energy per nucleon (keV)
  • pairing gap (keV)
  • Q-values (keV):
    • α
    • ∆α: 0.5 x ( Qα(Z+2,N+2) - Qα(Z,N) )
    • ß⁻
    • double ß⁻
    • ß⁺
    • electron capture
    • double electron capture
    • ß⁻ delayed neutron emission
    • ß⁻ delayed double neutron emission
    • electron capture followed by proton emission
  • separation energies(keV):
    • neutron separation energy
    • two neutron separation energy
    • proton separation energy
    • two proton separation energy
to see the available properties for a given nucleus, use the tknucleus::list_properties() method:
tknucleus nuc("12C")
nuc.list_properties()
[ INFO ] nucleus properties:
[ INFO ] Qalpha -7366.587870 keV [FLOAT]
[ INFO ] QbetaMinus -17338.068000 keV [FLOAT]
[ INFO ] QbetaMinusOneNeutronEmission -32436.962060 keV [FLOAT]
[ INFO ] QbetaMinusTwoNeutronEmission -54942.663120 keV [FLOAT]
[ INFO ] QdeltaAlpha 102.334915 keV [FLOAT]
[ INFO ] QdoubleBetaMinus -32013.335000 keV [FLOAT]
[ INFO ] QdoubleElectronCapture -25077.761000 keV [FLOAT]
[ INFO ] QelectronCapture -13369.398000 keV [FLOAT]
[ INFO ] QelectronCaptureOneProtonEmission -27466.140064 keV [FLOAT]
[ INFO ] QpositronEmission -14391.395900 keV [FLOAT]
[ INFO ] XRay_Kalpha1 0.277000 keV [FLOAT]
[ INFO ] abundance 98.930000 % [FLOAT]
[ INFO ] atomic_mass 12.011000 u [FLOAT]
[ INFO ] atomic_radius_van_der_Waals 170.000000 pm [FLOAT]
[ INFO ] binding_energy_ldm_fit_overA -210.980700 keV [FLOAT]
[ INFO ] binding_energy_overA 7680.144562 keV [FLOAT]
[ INFO ] boiling_point 4098.000000 K [FLOAT]
[ INFO ] charge 6 [TEXT]
[ INFO ] decay_modes [TEXT]
[ INFO ] density 2.267000 [FLOAT]
[ INFO ] electric_quadrupole 0.060000 barn [FLOAT]
[ INFO ] electronic_configuration [He]2s2 2p2 [TEXT]
[ INFO ] group_block Nonmetal [TEXT]
[ INFO ] ionization_energy 11.260000 eV [FLOAT]
[ INFO ] isotope_year_discovered 1919 [TEXT]
[ INFO ] lifetime STABLE [FLOAT]
[ INFO ] mass_excess 0.000000 keV [FLOAT]
[ INFO ] melting_point 3823.000000 K [FLOAT]
[ INFO ] name Carbon [TEXT]
[ INFO ] neutronSeparationEnergy 18720.715060 keV [FLOAT]
[ INFO ] pairingGap 6887.203165 keV [FLOAT]
[ INFO ] protonSeparationEnergy 15956.679064 keV [FLOAT]
[ INFO ] quadrupoleDeformation 0.576601 [FLOAT]
[ INFO ] radius 2.470200 fm [FLOAT]
[ INFO ] spin_parity 0+ [TEXT]
[ INFO ] state Solid [TEXT]
[ INFO ] symbol C [TEXT]
[ INFO ] twoNeutronSeparationEnergy 31841.309120 keV [FLOAT]
[ INFO ] twoProtonSeparationEnergy 27185.429128 keV [FLOAT]
[ INFO ] year_discovered Ancient [TEXT]
The results can be filtered using a regular expression:
tknucleus nuc("12C")
nuc.list_properties("Q*")
[ INFO ] nucleus properties:
[ INFO ] Qalpha -7366.587870 keV [FLOAT]
[ INFO ] QbetaMinus -17338.068000 keV [FLOAT]
[ INFO ] QbetaMinusOneNeutronEmission -32436.962060 keV [FLOAT]
[ INFO ] QbetaMinusTwoNeutronEmission -54942.663120 keV [FLOAT]
[ INFO ] QdeltaAlpha 102.334915 keV [FLOAT]
[ INFO ] QdoubleBetaMinus -32013.335000 keV [FLOAT]
[ INFO ] QdoubleElectronCapture -25077.761000 keV [FLOAT]
[ INFO ] QelectronCapture -13369.398000 keV [FLOAT]
[ INFO ] QelectronCaptureOneProtonEmission -27466.140064 keV [FLOAT]
[ INFO ] QpositronEmission -14391.395900 keV [FLOAT]
To test if a property is available, use the use the tknucleus::has_property() method:
  • If the requested property is available and is a measured property (with a value and an associated error) get it using: tkproperty_list::get()
    tknucleus nuc("12C");
    if(nuc.has_property("abundance")) {
    auto value = nuc.get("abundance");
    cout << nuc.get_symbol() << " abundance: " << value->get_value() << " +- " << value->get_error() << " " << value->get_unit() << endl;
    }
    12C abundance: 98.93 +- 0.08 %
    The returned value is a tkn::tkmeasure, see the dedicated section
  • If the requested property is available and is refering to a string value (e.g. drounf state spin parity), get it using tknucleus::get_property()
    tknucleus nuc("13C");
    value = nuc.get_property("spin_parity");
    cout << nuc.get_symbol() << " GS spin parity: " << value << endl;
    13C GS spin parity: 1/2-
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_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_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_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 54 of file tknucleus.h.

Inheritance diagram for tknucleus:
tkproperty_list

#include <tknucleus.h>

Public Member Functions

 tknucleus ()
 default constructor More...
 
 tknucleus (const char *_symbol)
 tknucleus constructor taking a string as input More...
 
 tknucleus (int _Z)
 tknucleus constructor taking only Z as input More...
 
 tknucleus (int _Z, int _A)
 tknucleus constructor taking Z and A as input More...
 
virtual ~tknucleus ()=default
 
int get_a ()
 return the mass number More...
 
double get_abundance () const
 returns the natural abundance in percent More...
 
shared_ptr< tkmeasureget_abundance_measure ()
 return the abundance tkmeasure object More...
 
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 More...
 
shared_ptr< tkmeasureget_binding_energy_over_a_measure ()
 returns the binding energy tkmeasure object More...
 
tkstring get_decay_mode_str ()
 return the decay modes as a string More...
 
vector< pair< tkstring, double > > get_decay_modes ()
 return the decay modes as a vector of decay More...
 
int get_discovery_year ()
 return the discovery year More...
 
double get_electric_quadrupole ()
 return the electric quadrupole moment in barn by default More...
 
shared_ptr< tkmeasureget_electric_quadrupole_measure ()
 return the electric quadrupole moment tkmeasure object More...
 
const tkstringget_element_name ()
 return the name of the chimical element More...
 
const tkstringget_element_symbol ()
 return the symbol of the chimical element More...
 
double get_fission_yield (tkstring _parent, bool _cumulative=false)
 returns the fission yield of the current nucleus More...
 
shared_ptr< tklevelget_ground_state ()
 return the ground state level (nullptr if no GS known) More...
 
const tkstringget_jpi () const
 return the ground state spin and parity as a string More...
 
shared_ptr< tklevel_schemeget_level_scheme ()
 return a tklevel_scheme shared pointer to the nucleus level scheme More...
 
double get_lifetime (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::s)
 returns the lifetime in second More...
 
shared_ptr< tkmeasureget_lifetime_measure () const
 returns the lifetime tkmeasure object More...
 
tkstring get_lifetime_str ()
 returns the lifetime in string (using the best adapted unit) More...
 
double get_magnetic_dipole ()
 return the magnetic dipole moment in mun by default More...
 
shared_ptr< tkmeasureget_magnetic_dipole_measure ()
 return the magnetic dipole moment tkmeasure object More...
 
double get_mass_excess (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::keV)
 return the mass excess in keV by default More...
 
shared_ptr< tkmeasureget_mass_excess_measure ()
 return the mass excess tkmeasure object More...
 
int get_n ()
 return the neutron number More...
 
double get_radius () const
 returns the radius in fm More...
 
shared_ptr< tkmeasureget_radius_measure ()
 return the radius tkmeasure object More...
 
const tkspin_parityget_spin_parity ()
 return the ground state spin and parity object More...
 
const tkstringget_symbol ()
 return the nucleus symbol More...
 
const vector< shared_ptr< tkmeasure > > get_xrays ()
 returns the list of xrays More...
 
int get_z ()
 return the proton number More...
 
bool is_bound () const
 test if the nucleus is bound (positive binding energy) More...
 
bool is_doubly_magic ()
 return true in case of z and n are magic numbers More...
 
bool is_known () const
 test if the nucleus is known More...
 
bool is_n_magic ()
 return true in case of n is a magic number More...
 
bool is_stable () const
 test if the nucleus is stable More...
 
bool is_z_magic ()
 return true in case of z is a magic number More...
 
void print () const
 print the main nucleus properties More...
 
- Public Member Functions inherited from tkproperty_list
 tkproperty_list (tkstring _name)
 
virtual ~tkproperty_list ()=default
 
shared_ptr< tkmeasureget (const tkstring &_property) const
 get the property as tkmeasure More...
 
vector< shared_ptr< tkmeasure > > get_data_properties (const tkstring &_opt="*")
 get a vector of data properties according to a regular expression More...
 
const std::map< tkstring, property_string > get_properties ()
 get the properties map More...
 
tkstring get_property (const tkstring &_property) const
 get the property value as a string More...
 
tkstring get_property_type (const tkstring &_property) const
 get the property type as a string More...
 
tkstring get_property_unit (const tkstring &_property) const
 get the property unnit as a string More...
 
bool has_property (const tkstring &_property) const
 to check if the property is available More...
 
void list_data_properties (const tkstring &_opt="*") const
 list the available tkmeasure properties More...
 
void list_properties (const tkstring &_opt="*") const
 list the available properties More...
 

Friends

class tkmanager
 

Constructor & Destructor Documentation

◆ tknucleus() [1/4]

tknucleus ( )
inline

default constructor

Definition at line 76 of file tknucleus.h.

◆ tknucleus() [2/4]

tknucleus ( int  _Z,
int  _A 
)

tknucleus constructor taking Z and A as input

Parameters
_Zproton number
_Anucleon number

Definition at line 63 of file tknucleus.cpp.

◆ tknucleus() [3/4]

tknucleus ( int  _Z)

tknucleus constructor taking only Z as input

Parameters
_Zproton number

The most stable nucleus is returned and the most abundant if more than one stable

Definition at line 87 of file tknucleus.cpp.

◆ tknucleus() [4/4]

tknucleus ( const char *  _symbol)

tknucleus constructor taking a string as input

Parameters
_symbolnucleus 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 107 of file tknucleus.cpp.

◆ ~tknucleus()

virtual ~tknucleus ( )
virtualdefault

Member Function Documentation

◆ get_a()

int get_a ( )
inline

return the mass number

Definition at line 92 of file tknucleus.h.

◆ get_abundance()

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 192 of file tknucleus.cpp.

◆ get_abundance_measure()

shared_ptr< tkmeasure > get_abundance_measure ( )
inline

return the abundance tkmeasure object

Definition at line 123 of file tknucleus.h.

◆ get_binding_energy_over_a()

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

Parameters
_unitunit 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 222 of file tknucleus.cpp.

◆ get_binding_energy_over_a_measure()

shared_ptr< tkmeasure > get_binding_energy_over_a_measure ( )
inline

returns the binding energy tkmeasure object

Definition at line 133 of file tknucleus.h.

◆ get_decay_mode_str()

tkstring get_decay_mode_str ( )
inline

return the decay modes as a string

Definition at line 151 of file tknucleus.h.

◆ get_decay_modes()

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 318 of file tknucleus.cpp.

◆ get_discovery_year()

int get_discovery_year ( )
inline

return the discovery year

Definition at line 154 of file tknucleus.h.

◆ get_electric_quadrupole()

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 179 of file tknucleus.cpp.

◆ get_electric_quadrupole_measure()

shared_ptr< tkmeasure > get_electric_quadrupole_measure ( )
inline

return the electric quadrupole moment tkmeasure object

Definition at line 118 of file tknucleus.h.

◆ get_element_name()

const tkstring & get_element_name ( )
inline

return the name of the chimical element

Definition at line 85 of file tknucleus.h.

◆ get_element_symbol()

const tkstring & get_element_symbol ( )
inline

return the symbol of the chimical element

Definition at line 83 of file tknucleus.h.

◆ get_fission_yield()

double get_fission_yield ( tkstring  _parent,
bool  _cumulative = false 
)

returns the fission yield of the current nucleus

Parameters
_parentname of the fissioning nucleus
_cumulativeif 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:

  • 235U
  • 238U
  • 239Pu
  • 241Pu
  • 252Cf

Definition at line 264 of file tknucleus.cpp.

◆ get_ground_state()

shared_ptr< tklevel > get_ground_state ( )

return the ground state level (nullptr if no GS known)

Definition at line 300 of file tknucleus.cpp.

◆ get_jpi()

const tkstring & get_jpi ( ) const
inline

return the ground state spin and parity as a string

Definition at line 169 of file tknucleus.h.

◆ get_level_scheme()

shared_ptr< tklevel_scheme > get_level_scheme ( )

return a tklevel_scheme shared pointer to the nucleus level scheme

Definition at line 141 of file tknucleus.cpp.

◆ get_lifetime()

double get_lifetime ( const tkunit_manager::units_keys  _unit = tkunit_manager::units_keys::s)

returns the lifetime in second

Parameters
_unitunit 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 239 of file tknucleus.cpp.

◆ get_lifetime_measure()

shared_ptr< tkmeasure > get_lifetime_measure ( ) const
inline

returns the lifetime tkmeasure object

Definition at line 138 of file tknucleus.h.

◆ get_lifetime_str()

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 275 of file tknucleus.cpp.

◆ get_magnetic_dipole()

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 166 of file tknucleus.cpp.

◆ get_magnetic_dipole_measure()

shared_ptr< tkmeasure > get_magnetic_dipole_measure ( )
inline

return the magnetic dipole moment tkmeasure object

Definition at line 113 of file tknucleus.h.

◆ get_mass_excess()

double get_mass_excess ( const tkunit_manager::units_keys  _unit = tkunit_manager::units_keys::keV)

return the mass excess in keV by default

Parameters
_unitunit 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 205 of file tknucleus.cpp.

◆ get_mass_excess_measure()

shared_ptr< tkmeasure > get_mass_excess_measure ( )
inline

return the mass excess tkmeasure object

Definition at line 128 of file tknucleus.h.

◆ get_n()

int get_n ( )
inline

return the neutron number

Definition at line 90 of file tknucleus.h.

◆ get_radius()

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 153 of file tknucleus.cpp.

◆ get_radius_measure()

shared_ptr< tkmeasure > get_radius_measure ( )
inline

return the radius tkmeasure object

Definition at line 108 of file tknucleus.h.

◆ get_spin_parity()

const tkspin_parity & get_spin_parity ( )
inline

return the ground state spin and parity object

Definition at line 167 of file tknucleus.h.

◆ get_symbol()

const tkstring & get_symbol ( )
inline

return the nucleus symbol

Definition at line 95 of file tknucleus.h.

◆ get_xrays()

const vector< shared_ptr< tkmeasure > > get_xrays ( )
inline

returns the list of xrays

Definition at line 172 of file tknucleus.h.

◆ get_z()

int get_z ( )
inline

return the proton number

Definition at line 88 of file tknucleus.h.

◆ is_bound()

bool is_bound ( ) const

test if the nucleus is bound (positive binding energy)

Definition at line 307 of file tknucleus.cpp.

◆ is_doubly_magic()

bool is_doubly_magic ( )
inline

return true in case of z and n are magic numbers

Definition at line 102 of file tknucleus.h.

◆ is_known()

bool is_known ( ) const
inline

test if the nucleus is known

Definition at line 160 of file tknucleus.h.

◆ is_n_magic()

bool is_n_magic ( )

return true in case of n is a magic number

Definition at line 136 of file tknucleus.cpp.

◆ is_stable()

bool is_stable ( ) const
inline

test if the nucleus is stable

Definition at line 162 of file tknucleus.h.

◆ is_z_magic()

bool is_z_magic ( )

return true in case of z is a magic number

Definition at line 131 of file tknucleus.cpp.

◆ print()

void print ( ) const

print the main nucleus properties

Definition at line 330 of file tknucleus.cpp.

Friends And Related Function Documentation

◆ tkmanager

friend class tkmanager
friend

Definition at line 56 of file tknucleus.h.


The documentation for this class was generated from the following files: