PyNE C++
Classes | Typedefs | Functions | Variables
pyne::nucname Namespace Reference

Nuclide naming conventions. More...

Classes

class  IndeterminateNuclideForm
 
class  NotANuclide
 

Typedefs

typedef std::string name_t
 name type
 
typedef int zz_t
 Z number type.
 
typedef std::map< name_t, zz_tname_zz_t
 name and Z num map type
 
typedef name_zz_t::iterator name_zz_iter
 name and Z num iter type
 
typedef std::map< zz_t, name_tzzname_t
 Z num to name map type.
 
typedef zzname_t::iterator zzname_iter
 Z num to name iter type.
 
typedef std::set< name_tname_group
 name grouping type (for testing containment)
 
typedef name_group::iterator name_group_iter
 name grouping iter type
 
typedef std::set< zz_tzz_group
 Z number grouping type (for testing containment)
 
typedef zz_group::iterator zz_group_iter
 Z number grouping iter.
 

Functions

name_zz_t get_name_zz ()
 Creates standard name to Z number mapping.
 
zzname_t get_zz_name ()
 Creates standard Z number to name mapping.
 
name_zz_t get_fluka_zz ()
 Creates standard fluka-name to nucid mapping.
 
zzname_t get_zz_fluka ()
 Creates standard nucid to fluka-name mapping.
 
zz_group name_to_zz_group (name_group eg)
 
isnuclide functions

These functions test if an input nuc is a valid nuclide.

Parameters
nuca possible nuclide
Returns
a bool
bool isnuclide (std::string nuc)
 
bool isnuclide (const char *nuc)
 
bool isnuclide (int nuc)
 
iselement functions

These functions test if an input nuc is a valid element.

Parameters
nuca possible element
Returns
a bool
bool iselement (std::string nuc)
 
bool iselement (const char *nuc)
 
bool iselement (int nuc)
 
Identifier Form Functions

The 'id' nuclide naming convention is the canonical form for representing nuclides in PyNE. This is termed a ZAS, or ZZZAAASSSS, representation because It stores 3 Z-number digits, 3 A-number digits, followed by 4 S-number digits which the nucleus excitation state.

The id() function will always return an nuclide in id form, if successful. If the input nuclide is in id form already, then this is function does no work. For all other formats, the id() function provides a best-guess based on a heirarchy of other formats that is used to resolve ambiguities between naming conventions. For integer input the form resolution order is:

  • id
  • zz (elemental z-num only given)
  • zzaaam
  • cinder (aaazzzm)
  • mcnp
  • zzaaa For string (or char *) input the form resolution order is as follows:
  • ZZ-LL-AAAM
  • Integer form in a string representation, uses interger resolution
  • NIST
  • name form
  • Serpent
  • LL (element symbol) For well-defined situations where you know ahead of time what format the nuclide is in, you should use the various form_to_id() functions, rather than the id() function which is meant to resolve possibly ambiquous cases.
    Parameters
    nuca nuclide
    Returns
    nucid 32-bit integer identifier
int id (int nuc)
 
int id (const char *nuc)
 
int id (std::string nuc)
 
Name Form Functions

The 'name' nuclide naming convention is the more common, human readable notation. The chemical symbol (one or two characters long) is first, followed by the nucleon number. Lastly if the nuclide is metastable, the letter M is concatenated to the end. For example, ‘H-1’ and ‘Am242M’ are both valid. Note that nucname will always return name form with dashes removed, the chemical symbol used for letter casing (ie 'Pu'), and a trailing upercase 'M' for a metastable flag. The name() function first converts functions to id form using the id() function. Thus the form order resolution for id() also applies here.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
std::string name (int nuc)
 
std::string name (const char *nuc)
 
std::string name (std::string nuc)
 
Z-Number Functions

The Z-number, or charge number, represents the number of protons in a nuclide. This function returns that number.

Parameters
nuca nuclide
Returns
an integer Z-number.
int znum (int nuc)
 
int znum (const char *nuc)
 
int znum (std::string nuc)
 
A-Number Functions

The A-number, or nucleon number, represents the number of protons and neutrons in a nuclide. This function returns that number.

Parameters
nuca nuclide
Returns
an integer A-number.
int anum (int nuc)
 
int anum (const char *nuc)
 
int anum (std::string nuc)
 
S-Number Functions

The S-number, or excitation state number, represents the excitation level of a nuclide. Normally, this is zero. This function returns that number.

Parameters
nuca nuclide
Returns
an integer A-number.
int snum (int nuc)
 
int snum (const char *nuc)
 
int snum (std::string nuc)
 
ZZAAAM Form Functions

The ZZAAAM nuclide naming convention is the former canonical form for nuclides in PyNE. This places the charge of the nucleus out front, then has three digits for the atomic mass number, and ends with a metastable flag (0 = ground, 1 = first excited state, 2 = second excited state, etc). Uranium-235 here would be expressed as ‘922350’.

Parameters
nuca nuclide
Returns
an integer nuclide identifier.
int zzaaam (int nuc)
 
int zzaaam (const char *nuc)
 
int zzaaam (std::string nuc)
 
ZZAAAM Form to Identifier Form Functions

This converts from the ZZAAAM nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in ZZAAAM form.
Returns
an integer id nuclide identifier.
int zzaaam_to_id (int nuc)
 
int zzaaam_to_id (const char *nuc)
 
int zzaaam_to_id (std::string nuc)
 
ZZZAAA Form Functions

The ZZZAAA nuclide naming convention is a form in which the nuclides three digit ZZZ number is followed by the 3 digit AAA number. If the ZZZ number is 2 digits, the preceding zeros are not included. Uranium-235 here would be expressed as ‘92235’.

Parameters
nuca nuclide
Returns
an integer nuclide identifier.
int zzzaaa (int nuc)
 
int zzzaaa (const char *nuc)
 
int zzzaaa (std::string nuc)
 
ZZZAAA Form to Identifier Form Functions

This converts from the ZZZAAA nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in ZZZAAA form.
Returns
an integer id nuclide identifier.
int zzzaaa_to_id (int nuc)
 
int zzzaaa_to_id (const char *nuc)
 
int zzzaaa_to_id (std::string nuc)
 
ZZLLAAAM Form Functions

The ZZLLAAAM nuclide naming convention is a form in which the nuclides AA number is followed by the redundant two LL characters, followed by the nuclides ZZZ number. Can also be followed with a metastable flag. Uranium-235 here would be expressed as ‘92-U-235’.

Parameters
nuca nuclide
Returns
an integer nuclide identifier.
std::string zzllaaam (int nuc)
 
std::string zzllaaam (const char *nuc)
 
std::string zzllaaam (std::string nuc)
 
ZZLLAAAM Form to Identifier Form Functions

This converts from the ZZLLAAAM nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in ZZLLAAAM form.
Returns
an integer id nuclide identifier.
int zzllaaam_to_id (const char *nuc)
 
int zzllaaam_to_id (std::string nuc)
 
MCNP Form Functions

This is the naming convention used by the MCNP suite of codes. The MCNP format for entering nuclides is unfortunately non-standard. In most ways it is similar to zzaaam form, except that it lacks the metastable flag. For information on how metastable isotopes are named, please consult the MCNP documentation for more information.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
int mcnp (int nuc)
 
int mcnp (const char *nuc)
 
int mcnp (std::string nuc)
 
MCNP Form to Identifier Form Functions

This converts from the MCNP nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in MCNP form.
Returns
an integer id nuclide identifier.
int mcnp_to_id (int nuc)
 
int mcnp_to_id (const char *nuc)
 
int mcnp_to_id (std::string nuc)
 
OPENMC Form Functions

This is the naming convention used by the OpenMC code. The OpenMC format for entering nuclides uses a GND format. For information on how metastable isotopes are named, please consult the OpenMC documentation for more information.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
std::string openmc (int nuc)
 
std::string openmc (const char *nuc)
 
std::string openmc (std::string nuc)
 
OPENMC Form to Identifier Form Functions

This converts from the OPENMC nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in OPENMC form.
Returns
an integer id nuclide identifier.
int openmc_to_id (const char *nuc)
 
int openmc_to_id (std::string nuc)
 
FLUKA Form Functions

This is the naming convention used by the FLUKA suite of codes. The FLUKA format for entering nuclides requires some knowledge of FLUKA The nuclide in must cases should be the atomic # times 10000000. The exceptions are for FLUKA's named isotopes See the FLUKA Manual for more information.

Parameters
nuca nuclide
Returns
the received FLUKA name
std::string fluka (int nuc)
 
FLUKA Form to Identifier Form Functions

This converts from the FLUKA name to the id canonical form for nuclides in PyNE.

Parameters
namea fluka name
Returns
an integer id nuclide identifier.
int fluka_to_id (std::string name)
 
int fluka_to_id (char *name)
 
Serpent Form Functions

This is the string-based naming convention used by the Serpent suite of codes. The serpent naming convention is similar to name form. However, only the first letter in the chemical symbol is uppercase, the dash is always present, and the the meta-stable flag is lowercase. For instance, ‘Am-242m’ is the valid serpent notation for this nuclide.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
std::string serpent (int nuc)
 
std::string serpent (const char *nuc)
 
std::string serpent (std::string nuc)
 
Serpent Form to Identifier Form Functions

This converts from the Serpent nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in Serpent form.
Returns
an integer id nuclide identifier.
int serpent_to_id (const char *nuc)
 
int serpent_to_id (std::string nuc)
 
NIST Form Functions

This is the string-based naming convention used by NIST. The NIST naming convention is also similar to the Serpent form. However, this convention contains no metastable information. Moreover, the A-number comes before the element symbol. For example, ‘242Am’ is the valid NIST notation.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
std::string nist (int nuc)
 
std::string nist (const char *nuc)
 
std::string nist (std::string nuc)
 
NIST Form to Identifier Form Functions

This converts from the NIST nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in NIST form.
Returns
an integer id nuclide identifier.
int nist_to_id (const char *nuc)
 
int nist_to_id (std::string nuc)
 
CINDER Form Functions

This is the naming convention used by the CINDER burnup library. The CINDER format is similar to zzaaam form except that the placement of the Z- and A-numbers are swapped. Therefore, this format is effectively aaazzzm. For example, ‘2420951’ is the valid cinder notation for ‘AM242M’.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
int cinder (int nuc)
 
int cinder (const char *nuc)
 
int cinder (std::string nuc)
 
Cinder Form to Identifier Form Functions

This converts from the Cinder nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in Cinder form.
Returns
an integer id nuclide identifier.
int cinder_to_id (int nuc)
 
int cinder_to_id (const char *nuc)
 
int cinder_to_id (std::string nuc)
 
ALARA Form Functions

This is the format used in the ALARA activation code elements library. For elements, the form is "ll" where ll is the atomic symbol. For isotopes the form is "ll:AAA". No metastable isotope flag is used.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
std::string alara (int nuc)
 
std::string alara (const char *nuc)
 
std::string alara (std::string nuc)
 
ALARA Form to Identifier Form Functions

This converts from the ALARA nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in ALARA form.
Returns
an integer id nuclide identifier.
int alara_to_id (const char *nuc)
 
int alara_to_id (std::string nuc)
 
SZA Form Functions

This is the new format for ACE data tables in the form SSSZZZAAA. The first three digits represent the excited state (000 = ground, 001 = first excited state, 002 = second excited state, etc). The second three digits are the atomic number and the last three digits are the atomic mass. Prepending zeros can be omitted, making the SZA form equal to the MCNP form for non-excited nuclides.

Parameters
nuca nuclide
Returns
a string nuclide identifier.
int sza (int nuc)
 
int sza (const char *nuc)
 
int sza (std::string nuc)
 
SZA Form to Identifier Form Functions

This converts from the SZA nuclide naming convention to the id canonical form for nuclides in PyNE.

Parameters
nuca nuclide in SZA form.
Returns
an integer id nuclide identifier.
int sza_to_id (int nuc)
 
int sza_to_id (const char *nuc)
 
int sza_to_id (std::string nuc)
 
Ground State Form Functions

This form stores the nuclide in id form, but removes the state information about the nuclide. I is in the same form as ID, but the four last digits are all zeros.

Parameters
nuca nuclide
Returns
a integer groundstate id
int groundstate (int nuc)
 
int groundstate (std::string nuc)
 
int groundstate (const char *nuc)
 
ENSDF Form Functions

This converts id's stored using standard ensdf syntax to nuc_id's

Parameters
ensdfnuc string
Returns
PyNE nuc_id
int ensdf_to_id (const char *nuc)
 
int ensdf_to_id (std::string nuc)
 

Variables

name_zz_t name_zz = pyne::nucname::get_name_zz()
 name to Z num map
 
zzname_t zz_name = pyne::nucname::get_zz_name()
 Z num to name map.
 
name_zz_t fluka_zz = pyne::nucname::get_fluka_zz()
 fluka-name to nucid map
 
zzname_t zz_fluka = pyne::nucname::get_zz_fluka()
 nucid to fluka-name map
 
name_t LAN_array [15]
 array of lanthanide names More...
 
name_group LAN
 lanthanide name group
 
zz_group lan
 lanthanide Z number group More...
 
name_t ACT_array [15]
 array of actinide names More...
 
name_group ACT
 actinide name group
 
zz_group act = pyne::nucname::name_to_zz_group(pyne::nucname::ACT)
 actinide Z number group
 
name_t TRU_array [22]
 array of transuranic names More...
 
name_group TRU
 transuranic name group
 
zz_group tru
 transuranic Z number group More...
 
name_t MA_array [10]
 array of minor actinide names More...
 
name_group MA
 minor actinide name group
 
zz_group ma
 minor actinide Z number group More...
 
name_t FP_array [88]
 array of fission product names More...
 
name_group FP
 fission product name group
 
zz_group fp
 fission product Z number group More...
 
int map_nuc_ids [TOTAL_STATE_MAPS]
 
int map_metastable [TOTAL_STATE_MAPS]
 

State Map functions

These convert from/to decay state ids (used in decay data) to metastable ids (the PyNE default). If the cooresponding value cannot be found, -1 is returned.

std::map< int, int > state_id_map
 
void _load_state_map ()
 
int state_id_to_id (int state)
 
int id_to_state_id (int nuc_id)
 

Detailed Description

Nuclide naming conventions.

Function Documentation

◆ name_to_zz_group()

pyne::nucname::zz_group pyne::nucname::name_to_zz_group ( name_group  eg)

Converts a name group to a Z number group.

Parameters
ega grouping of nuclides by name
Returns
a Z numbered group

Variable Documentation

◆ ACT_array

pyne::nucname::name_t pyne::nucname::ACT_array
Initial value:
= {"Ac", "Th", "Pa", "U",
"Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr"}

array of actinide names

◆ fp

pyne::nucname::zz_group pyne::nucname::fp
Initial value:
=
zz_group name_to_zz_group(name_group eg)
Definition: nucname.cpp:324
name_group FP
fission product name group

fission product Z number group

◆ FP_array

pyne::nucname::name_t pyne::nucname::FP_array
Initial value:
= {"Ag", "Al", "Ar", "As",
"At", "Au", "B", "Ba", "Be", "Bi", "Br", "C", "Ca", "Cd", "Ce", "Cl", "Co",
"Cr", "Cs", "Cu", "Dy", "Er", "Eu", "F", "Fe", "Fr", "Ga", "Gd", "Ge", "H",
"He", "Hf", "Hg", "Ho", "I", "In", "Ir", "K", "Kr", "La", "Li", "Lu", "Mg",
"Mn", "Mo", "N", "Na", "Nb", "Nd", "Ne", "Ni", "O", "Os", "P", "Pb", "Pd",
"Pm", "Po", "Pr", "Pt", "Ra", "Rb", "Re", "Rh", "Rn", "Ru", "S", "Sb", "Sc",
"Se", "Si", "Sm", "Sn", "Sr", "Ta", "Tb", "Tc", "Te", "Ti", "Tl", "Tm", "V",
"W", "Xe", "Y", "Yb", "Zn", "Zr"}

array of fission product names

◆ lan

pyne::nucname::zz_group pyne::nucname::lan
Initial value:
=
zz_group name_to_zz_group(name_group eg)
Definition: nucname.cpp:324
name_group LAN
lanthanide name group

lanthanide Z number group

◆ LAN_array

pyne::nucname::name_t pyne::nucname::LAN_array
Initial value:
= {"La", "Ce", "Pr", "Nd",
"Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu"}

array of lanthanide names

◆ ma

pyne::nucname::zz_group pyne::nucname::ma
Initial value:
=
zz_group name_to_zz_group(name_group eg)
Definition: nucname.cpp:324
name_group MA
minor actinide name group

minor actinide Z number group

◆ MA_array

pyne::nucname::name_t pyne::nucname::MA_array
Initial value:
= {"Np", "Am", "Cm", "Bk",
"Cf", "Es", "Fm", "Md", "No", "Lr"}

array of minor actinide names

◆ tru

pyne::nucname::zz_group pyne::nucname::tru
Initial value:
=
zz_group name_to_zz_group(name_group eg)
Definition: nucname.cpp:324
name_group TRU
transuranic name group

transuranic Z number group

◆ TRU_array

pyne::nucname::name_t pyne::nucname::TRU_array
Initial value:
= {"Np", "Pu", "Am", "Cm",
"Bk", "Cf", "Es", "Fm", "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt",
"Ds", "Rg", "Cn", "Fl", "Lv"}

array of transuranic names