Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | List of all members
o2scl::nucmass_info Class Reference

Nuclear mass information. More...

#include <nucmass.h>

Inheritance diagram for o2scl::nucmass_info:
o2scl::nucmass o2scl::nucmass_fit_base o2scl::nucmass_table o2scl::nucmass_dvi o2scl::nucmass_dz_fit o2scl::nucmass_dz_fit_33 o2scl::nucmass_frdm o2scl::nucmass_semi_empirical o2scl::nucmass_ame o2scl::nucmass_dglg o2scl::nucmass_dz_table o2scl::nucmass_hfb o2scl::nucmass_hfb_sp o2scl::nucmass_ktuy o2scl::nucmass_mnmsk o2scl::nucmass_sdnp o2scl::nucmass_wlw

Public Member Functions

int parse_elstring (std::string ela, int &Z, int &N, int &A)
 Parse a string representing an element. More...
int eltoZ (std::string el)
 Return Z given the element name abbreviation. More...
std::string Ztoel (size_t Z)
 Return the element name abbreviation given Z. More...
std::string tostring (size_t Z, size_t N)
 Return a string of the form "Pb208" for a given Z and N. More...

Protected Types

typedef std::map< std::string, int, std::greater< std::string > >::iterator table_it
 A convenient typedef for an iterator for element_table.

Protected Attributes

std::map< std::string, int, std::greater< std::string > > element_table
 A map containing the proton numbers organized by element abbreviation.
std::string element_list [nelements]
 The list of elements organized by proton number.

Static Protected Attributes

static const int nelements =119
 The number of elements (proton number)

Detailed Description

This class exists to provide some basic information on nuclei to nuclear mass classes which are children of nucmass.

Elements 113, 115, 117 and 118 are named "Uut", "Uup", "Uus", and "Uuo", respectively, until the IUPAC decides on their names. Note that some of the nuclear mass tables use older or alternative names for the heavier elements, so Ztoel() may return something different than is stored in, e.g., nucmass_ame::entry::el.

Idea for Future:
Add the full names for each element.

Definition at line 62 of file nucmass.h.

Member Function Documentation

◆ eltoZ()

int o2scl::nucmass_info::eltoZ ( std::string  el)

If the string parameter el is invalid, the error handler is called and the value -1 is returned.

◆ parse_elstring()

int o2scl::nucmass_info::parse_elstring ( std::string  ela,
int &  Z,
int &  N,
int &  A 

Accepts strings of one of the following forms:

  • Pb208
  • pb208
  • Pb 208
  • Pb-208
  • pb 208
  • pb-208 or one of the special strings n, p, d or t for the neutron, proton, deuteron, and triton, respectively. This function also allows the value of A to precede the element symbol.
At present, this allows nuclei which don't make sense because A<Z, such as Carbon-5.
Idea for Future:

Warn about malformed combinations like Carbon-5

Right now, n4 is interpreted incorrectly as Nitrogen-4, rather than the tetraneutron.

Interpret strings with the full name rather than just the abbreviation.

◆ tostring()

std::string o2scl::nucmass_info::tostring ( size_t  Z,
size_t  N 

Note that if Z is zero, then and 'n' is used to indicate the a nucleus composed entirely of neutrons and if the argument Z is greater than 118, the error handler is called.

◆ Ztoel()

std::string o2scl::nucmass_info::Ztoel ( size_t  Z)
This function returns "n" indicating the neutron for Z=0, and if the argument Z is greater than 118, then the error handler is called.

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

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).