tidyms.chem.atoms¶
Tools for working with Isotopes and Elements.
Objects¶
Element
Isotope
PeriodicTable
Constants¶
EM: Mass of the electron.
Exceptions¶
InvalidIsotope
- class Element(symbol: str, name: str, isotopes: Dict[int, Isotope])¶
Representation of a chemical element.
- Attributes:
- namestr
Element name.
- symbolstr
Element symbol
- isotopesDict[int, Isotope]
Mapping from mass number to an isotope
- zint
Atomic number.
- nominal_massint
Mass number of the most abundant isotope
- get_abundances() Tuple[ndarray, ndarray, ndarray]¶
Returns the Mass number, exact mass and abundance of each Isotope.
- Returns:
- m: array[int]
Mass number of each isotope.
- M: array[float]
Exact mass of each isotope.
- p: array[float]
Abundance of each isotope.
- exception InvalidIsotope¶
- class Isotope(z: int, a: int, m: float, abundance: float)¶
Representation of an Isotope.
- Attributes:
- z: int
Atomic number
- n: int
Neutron number
- a: int
Mass number
- m: float
Exact mass.
- defect: float
Difference between the exact mass and mass number.
- abundance: float
Relative abundance of the isotope.
- PeriodicTable()¶
Reference the PeriodicTable object.
Examples
>>> import tidyms as ms >>> ptable = ms.chem.PeriodicTable()