CYCLUS
Classes | Functions | Variables
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

void * pyne::rxname::_fill_maps ( )

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

Definition at line 4354 of file pyne.cc.

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

Definition at line 6594 of file pyne.cc.

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

Definition at line 6605 of file pyne.cc.

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

Definition at line 6609 of file pyne.cc.

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

Definition at line 6613 of file pyne.cc.

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

Definition at line 6557 of file pyne.cc.

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

Definition at line 6561 of file pyne.cc.

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

Definition at line 6565 of file pyne.cc.

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

Definition at line 6569 of file pyne.cc.

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

Definition at line 6573 of file pyne.cc.

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

Definition at line 6577 of file pyne.cc.

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

Definition at line 6581 of file pyne.cc.

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

Definition at line 6585 of file pyne.cc.

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

Definition at line 6323 of file pyne.cc.

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

Definition at line 6327 of file pyne.cc.

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

Definition at line 6409 of file pyne.cc.

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

Definition at line 6413 of file pyne.cc.

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

Definition at line 6421 of file pyne.cc.

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

Definition at line 6425 of file pyne.cc.

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

Definition at line 6433 of file pyne.cc.

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

Definition at line 6442 of file pyne.cc.

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

Definition at line 6447 of file pyne.cc.

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

Definition at line 6452 of file pyne.cc.

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

Definition at line 6521 of file pyne.cc.

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

Definition at line 6525 of file pyne.cc.

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

Definition at line 6529 of file pyne.cc.

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

Definition at line 6533 of file pyne.cc.

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

Definition at line 6537 of file pyne.cc.

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

Definition at line 6541 of file pyne.cc.

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

Definition at line 6545 of file pyne.cc.

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

Definition at line 6549 of file pyne.cc.

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

Definition at line 6461 of file pyne.cc.

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

Definition at line 6468 of file pyne.cc.

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

Definition at line 6475 of file pyne.cc.

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

Definition at line 6482 of file pyne.cc.

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

Definition at line 6489 of file pyne.cc.

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

Definition at line 6496 of file pyne.cc.

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

Definition at line 6503 of file pyne.cc.

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

Definition at line 6510 of file pyne.cc.

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

Definition at line 6367 of file pyne.cc.

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

Definition at line 6371 of file pyne.cc.

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

Definition at line 6343 of file pyne.cc.

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

Definition at line 6347 of file pyne.cc.

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

Definition at line 6380 of file pyne.cc.

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

Definition at line 6394 of file pyne.cc.

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

Definition at line 6389 of file pyne.cc.

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

Definition at line 6399 of file pyne.cc.

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 1455 of file pyne.h.

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

Definition at line 6621 of file pyne.cc.

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

Definition at line 6632 of file pyne.cc.

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

Definition at line 6636 of file pyne.cc.

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

Definition at line 6640 of file pyne.cc.

Variable Documentation

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

A dummy variable used when calling _fill_maps().

Definition at line 6320 of file pyne.cc.

std::string pyne::rxname::_names

Raw array of reaction names.

Definition at line 3766 of file pyne.cc.

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

Mapping between alternative names for reactions and the reaction id.

Definition at line 4344 of file pyne.cc.

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

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

Definition at line 4350 of file pyne.cc.

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

Mapping from reaction ids to MT numbers.

Definition at line 4347 of file pyne.cc.

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

Mapping from reaction ids to reaction names.

Definition at line 4345 of file pyne.cc.

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

Mapping from particle type and reaction ids to offsets.

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

Definition at line 4352 of file pyne.cc.

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

Mapping from reaction ids to labels (short descriptions).

Definition at line 4349 of file pyne.cc.

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

Mapping from MT numbers to reaction names.

Definition at line 4348 of file pyne.cc.

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

Mapping from reaction names to reaction ids.

Definition at line 4346 of file pyne.cc.

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

Set of reaction names, must be valid variable names.

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

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 4351 of file pyne.cc.