CYCLUS
Loading...
Searching...
No Matches
pyne::rxname Namespace Reference

Classes

class  IndeterminateReactionForm
 
class  NotAReaction
 

Functions

void * _fill_maps ()
 
int offset (int dz, int da, int ds=0)
 
Hash Functions

Custom hash function for reaction name to reaction ids.

This functions will not return a value less than 1000, effectively reserving space for the MT numbers.

unsigned int hash (std::string s)
 
unsigned int hash (const char *s)
 
Name Functions

Returns the canonical name of a reaction channel.

Parameters
nInteger input of possible reaction, nominally an id or MT number.
sString input of possible reaction, often a reaction or alternate name.
from_nucInitial target nuclide prior to reaction. When from_nuc is an integer it must be in id form.
to_nucTarget nuclide after reaction occurs. When to_nuc is an integer it must be in id form.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
std::string name (int n)
 
std::string name (unsigned int n)
 
std::string name (char *s)
 
std::string name (std::string s)
 
std::string name (int from_nuc, int to_nuc, std::string z="n")
 
std::string name (int from_nuc, std::string to_nuc, std::string z="n")
 
std::string name (std::string from_nuc, int to_nuc, std::string z="n")
 
std::string name (std::string from_nuc, std::string to_nuc, std::string z="n")
 
ID Functions

Returns the recation id of a reaction channel.

This id has been precomputed from the hash of the name.

Parameters
xInput reaction specification, may be a reaction name, alternate name, an id, or an MT number.
from_nucInitial target nuclide prior to reaction. When from_nuc is an integer it must be in id form.
to_nucTarget nuclide after reaction occurs. When to_nuc is an integer it must be in id form.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
unsigned int id (int x)
 
unsigned int id (unsigned int x)
 
unsigned int id (const char *x)
 
unsigned int id (std::string x)
 
unsigned int id (int from_nuc, int to_nuc, std::string z="n")
 
unsigned int id (int from_nuc, std::string to_nuc, std::string z="n")
 
unsigned int id (std::string from_nuc, int to_nuc, std::string z="n")
 
unsigned int id (std::string from_nuc, std::string to_nuc, std::string z="n")
 
MT Number Functions

Returns the MT number of a reaction channel, if available.

Parameters
xInput reaction specification, may be a reaction name, alternate name, an id, or an MT number.
from_nucInitial target nuclide prior to reaction. When from_nuc is an integer it must be in id form.
to_nucTarget nuclide after reaction occurs. When to_nuc is an integer it must be in id form.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
unsigned int mt (int x)
 
unsigned int mt (unsigned int x)
 
unsigned int mt (char *x)
 
unsigned int mt (std::string x)
 
unsigned int mt (int from_nuc, int to_nuc, std::string z="n")
 
unsigned int mt (int from_nuc, std::string to_nuc, std::string z="n")
 
unsigned int mt (std::string from_nuc, int to_nuc, std::string z="n")
 
unsigned int mt (std::string from_nuc, std::string to_nuc, std::string z="n")
 
Label Functions

Returns a short description of a reaction channel.

Parameters
xInput reaction specification, may be a reaction name, alternate name, an id, or an MT number.
from_nucInitial target nuclide prior to reaction. When from_nuc is an integer it must be in id form.
to_nucTarget nuclide after reaction occurs. When to_nuc is an integer it must be in id form.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
std::string label (int x)
 
std::string label (unsigned int x)
 
std::string label (char *x)
 
std::string label (std::string x)
 
std::string label (int from_nuc, int to_nuc, std::string z="n")
 
std::string label (int from_nuc, std::string to_nuc, std::string z="n")
 
std::string label (std::string from_nuc, int to_nuc, std::string z="n")
 
std::string label (std::string from_nuc, std::string to_nuc, std::string z="n")
 
Documentation Functions

Returns a short description of a reaction channel.

Parameters
xInput reaction specification, may be a reaction name, alternate name, an id, or an MT number.
from_nucInitial target nuclide prior to reaction. When from_nuc is an integer it must be in id form.
to_nucTarget nuclide after reaction occurs. When to_nuc is an integer it must be in id form.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
std::string doc (int x)
 
std::string doc (unsigned int x)
 
std::string doc (char *x)
 
std::string doc (std::string x)
 
std::string doc (int from_nuc, int to_nuc, std::string z="n")
 
std::string doc (int from_nuc, std::string to_nuc, std::string z="n")
 
std::string doc (std::string from_nuc, int to_nuc, std::string z="n")
 
std::string doc (std::string from_nuc, std::string to_nuc, std::string z="n")
 
Child Functions

Returns the child nuclide comming from a parent for a reaction channel.

Parameters
nucNuclide after reaction occurs. When nuc is an integer it must be in id form.
rxInput reaction specification, may be a reaction name, alternate name, an id, or an MT number.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
int parent (int nuc, unsigned int rx, std::string z="n")
 
int parent (int nuc, std::string rx, std::string z="n")
 
int parent (std::string nuc, unsigned int rx, std::string z="n")
 
int parent (std::string nuc, std::string rx, std::string z="n")
 
Parent Functions

Returns the parent nuclide comming for a child and a given reaction channel.

Parameters
nucInitial target nuclide prior to reaction. When nuc is an integer it must be in id form.
rxInput reaction specification, may be a reaction name, alternate name, an id, or an MT number.
zFlag for incident particle type. Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.
int child (int nuc, unsigned int rx, std::string z="n")
 
int child (int nuc, std::string rx, std::string z="n")
 
int child (std::string nuc, unsigned int rx, std::string z="n")
 
int child (std::string nuc, std::string rx, std::string z="n")
 

Variables

void * _ = pyne::rxname::_fill_maps()
 
std::string _names [NUM_RX_NAMES]
 
std::map< std::string, unsigned int > altnames
 
std::map< unsigned int, std::string > docs
 
std::map< unsigned int, unsigned int > id_mt
 
std::map< unsigned int, std::string > id_name
 
std::map< std::pair< std::string, unsigned int >, int > id_offset
 
std::map< unsigned int, std::string > labels
 
std::map< unsigned int, unsigned int > mt_id
 
std::map< std::string, unsigned int > name_id
 
std::set< std::string > names
 
std::map< std::pair< std::string, int >, unsigned int > offset_id
 

Detailed Description

Converts between naming conventions for reaction channels.

Function Documentation

◆ _fill_maps()

void * pyne::rxname::_fill_maps ( )

A helper function to set the contents of the variables in this library.

Definition at line 2565 of file pyne.cc.

◆ child() [1/4]

int pyne::rxname::child ( int nuc,
std::string rx,
std::string z = "n" )

Definition at line 4266 of file pyne.cc.

◆ child() [2/4]

int pyne::rxname::child ( int nuc,
unsigned int rx,
std::string z = "n" )

Definition at line 4254 of file pyne.cc.

◆ child() [3/4]

int pyne::rxname::child ( std::string nuc,
std::string rx,
std::string z = "n" )

Definition at line 4274 of file pyne.cc.

◆ child() [4/4]

int pyne::rxname::child ( std::string nuc,
unsigned int rx,
std::string z = "n" )

Definition at line 4270 of file pyne.cc.

◆ doc() [1/8]

std::string pyne::rxname::doc ( char * x)

Definition at line 4225 of file pyne.cc.

◆ doc() [2/8]

std::string pyne::rxname::doc ( int from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4233 of file pyne.cc.

◆ doc() [3/8]

std::string pyne::rxname::doc ( int from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4237 of file pyne.cc.

◆ doc() [4/8]

std::string pyne::rxname::doc ( int x)

Definition at line 4217 of file pyne.cc.

◆ doc() [5/8]

std::string pyne::rxname::doc ( std::string from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4241 of file pyne.cc.

◆ doc() [6/8]

std::string pyne::rxname::doc ( std::string from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4245 of file pyne.cc.

◆ doc() [7/8]

std::string pyne::rxname::doc ( std::string x)

Definition at line 4229 of file pyne.cc.

◆ doc() [8/8]

std::string pyne::rxname::doc ( unsigned int x)

Definition at line 4221 of file pyne.cc.

◆ hash() [1/2]

unsigned int pyne::rxname::hash ( const char * s)

Definition at line 4000 of file pyne.cc.

◆ hash() [2/2]

unsigned int pyne::rxname::hash ( std::string s)

Definition at line 3996 of file pyne.cc.

◆ id() [1/8]

unsigned int pyne::rxname::id ( const char * x)

Definition at line 4088 of file pyne.cc.

◆ id() [2/8]

unsigned int pyne::rxname::id ( int from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4098 of file pyne.cc.

◆ id() [3/8]

unsigned int pyne::rxname::id ( int from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4108 of file pyne.cc.

◆ id() [4/8]

unsigned int pyne::rxname::id ( int x)

Definition at line 4078 of file pyne.cc.

◆ id() [5/8]

unsigned int pyne::rxname::id ( std::string from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4113 of file pyne.cc.

◆ id() [6/8]

unsigned int pyne::rxname::id ( std::string from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4118 of file pyne.cc.

◆ id() [7/8]

unsigned int pyne::rxname::id ( std::string x)

Definition at line 4092 of file pyne.cc.

◆ id() [8/8]

unsigned int pyne::rxname::id ( unsigned int x)

Definition at line 4082 of file pyne.cc.

◆ label() [1/8]

std::string pyne::rxname::label ( char * x)

Definition at line 4187 of file pyne.cc.

◆ label() [2/8]

std::string pyne::rxname::label ( int from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4195 of file pyne.cc.

◆ label() [3/8]

std::string pyne::rxname::label ( int from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4199 of file pyne.cc.

◆ label() [4/8]

std::string pyne::rxname::label ( int x)

Definition at line 4179 of file pyne.cc.

◆ label() [5/8]

std::string pyne::rxname::label ( std::string from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4204 of file pyne.cc.

◆ label() [6/8]

std::string pyne::rxname::label ( std::string from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4209 of file pyne.cc.

◆ label() [7/8]

std::string pyne::rxname::label ( std::string x)

Definition at line 4191 of file pyne.cc.

◆ label() [8/8]

std::string pyne::rxname::label ( unsigned int x)

Definition at line 4183 of file pyne.cc.

◆ mt() [1/8]

unsigned int pyne::rxname::mt ( char * x)

Definition at line 4139 of file pyne.cc.

◆ mt() [2/8]

unsigned int pyne::rxname::mt ( int from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4151 of file pyne.cc.

◆ mt() [3/8]

unsigned int pyne::rxname::mt ( int from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4157 of file pyne.cc.

◆ mt() [4/8]

unsigned int pyne::rxname::mt ( int x)

Definition at line 4127 of file pyne.cc.

◆ mt() [5/8]

unsigned int pyne::rxname::mt ( std::string from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4163 of file pyne.cc.

◆ mt() [6/8]

unsigned int pyne::rxname::mt ( std::string from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4169 of file pyne.cc.

◆ mt() [7/8]

unsigned int pyne::rxname::mt ( std::string x)

Definition at line 4145 of file pyne.cc.

◆ mt() [8/8]

unsigned int pyne::rxname::mt ( unsigned int x)

Definition at line 4133 of file pyne.cc.

◆ name() [1/8]

std::string pyne::rxname::name ( char * s)

Definition at line 4017 of file pyne.cc.

◆ name() [2/8]

std::string pyne::rxname::name ( int from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4047 of file pyne.cc.

◆ name() [3/8]

std::string pyne::rxname::name ( int from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4063 of file pyne.cc.

◆ name() [4/8]

std::string pyne::rxname::name ( int n)

Definition at line 4037 of file pyne.cc.

◆ name() [5/8]

std::string pyne::rxname::name ( std::string from_nuc,
int to_nuc,
std::string z = "n" )

Definition at line 4057 of file pyne.cc.

◆ name() [6/8]

std::string pyne::rxname::name ( std::string from_nuc,
std::string to_nuc,
std::string z = "n" )

Definition at line 4069 of file pyne.cc.

◆ name() [7/8]

std::string pyne::rxname::name ( std::string s)

Definition at line 4021 of file pyne.cc.

◆ name() [8/8]

std::string pyne::rxname::name ( unsigned int n)

Definition at line 4041 of file pyne.cc.

◆ offset()

int pyne::rxname::offset ( int dz,
int da,
int ds = 0 )
inline

A helper function to compute nuclide id offsets from z-, a-, and s- deltas.

Definition at line 1363 of file pyne.h.

◆ parent() [1/4]

int pyne::rxname::parent ( int nuc,
std::string rx,
std::string z = "n" )

Definition at line 4294 of file pyne.cc.

◆ parent() [2/4]

int pyne::rxname::parent ( int nuc,
unsigned int rx,
std::string z = "n" )

Definition at line 4282 of file pyne.cc.

◆ parent() [3/4]

int pyne::rxname::parent ( std::string nuc,
std::string rx,
std::string z = "n" )

Definition at line 4302 of file pyne.cc.

◆ parent() [4/4]

int pyne::rxname::parent ( std::string nuc,
unsigned int rx,
std::string z = "n" )

Definition at line 4298 of file pyne.cc.

Variable Documentation

◆ _

void * pyne::rxname::_ = pyne::rxname::_fill_maps()
extern

A dummy variable used when calling _fill_maps().

Definition at line 3994 of file pyne.cc.

◆ _names

std::string pyne::rxname::_names
extern

Raw array of reaction names.

Definition at line 1979 of file pyne.cc.

◆ altnames

std::map< std::string, unsigned int > pyne::rxname::altnames
extern

Mapping between alternative names for reactions and the reaction id.

Definition at line 2555 of file pyne.cc.

◆ docs

std::map< unsigned int, std::string > pyne::rxname::docs
extern

Mapping from reaction ids to documentation strings (long descriptions).

Definition at line 2561 of file pyne.cc.

◆ id_mt

std::map< unsigned int, unsigned int > pyne::rxname::id_mt
extern

Mapping from reaction ids to MT numbers.

Definition at line 2558 of file pyne.cc.

◆ id_name

std::map< unsigned int, std::string > pyne::rxname::id_name
extern

Mapping from reaction ids to reaction names.

Definition at line 2556 of file pyne.cc.

◆ id_offset

std::map< std::pair< std::string, unsigned int >, int > pyne::rxname::id_offset
extern

Mapping from particle type and reaction ids to offsets.

Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.

Definition at line 2563 of file pyne.cc.

◆ labels

std::map< unsigned int, std::string > pyne::rxname::labels
extern

Mapping from reaction ids to labels (short descriptions).

Definition at line 2560 of file pyne.cc.

◆ mt_id

std::map< unsigned int, unsigned int > pyne::rxname::mt_id
extern

Mapping from MT numbers to reaction names.

Definition at line 2559 of file pyne.cc.

◆ name_id

std::map< std::string, unsigned int > pyne::rxname::name_id
extern

Mapping from reaction names to reaction ids.

Definition at line 2557 of file pyne.cc.

◆ names

std::set< std::string > pyne::rxname::names
extern

Set of reaction names, must be valid variable names.

◆ offset_id

std::map< std::pair< std::string, int >, unsigned int > pyne::rxname::offset_id
extern

Mapping from particle type and offset pairs to reaction ids.

Particle flags are 'n', 'p', 'd', 't', 'He3', 'a', 'gamma', and 'decay'.

Definition at line 2562 of file pyne.cc.