Element#
- class montepy.Element(Z: montepy.types.PositiveInt)#
Bases:
SingletonGroupClass to represent an element e.g., Aluminum.
Note
This class is immutable, and hashable, meaning it is suitable as a dictionary key.
- Parameters:
Z (
Integral) – the Z number of the element- Raises:
UnknownElement – if there is no element with that Z number.
Methods:
get_by_name(cls, name)Get an element by it's name.
get_by_symbol(cls, symbol)Get an element by it's symbol.
Attributes:
The atomic number for this Element.
The name of the element.
The atomic symbol for this Element.
- classmethod get_by_name(cls, name: str) Element#
Get an element by it’s name.
E.g., get the element with Z=1 from “hydrogen”.
- Returns:
the element with this name
- Return type:
- Raises:
UnknownElement – if there is no element with that name.
- Parameters:
name (str)
- classmethod get_by_symbol(cls, symbol: str) Element#
Get an element by it’s symbol.
E.g., get the element with Z=1 from “H”.
- Returns:
the element with this symbol
- Return type:
- Raises:
UnknownElement – if there is no element with that symbol.
- Parameters:
symbol (str)