core¶
- class srim.core.isotopes.Isotope(symbol: str, mass_number: int, mass_amu: float, abundance_percent: float)¶
A naturally occurring isotope of an element
- Parameters:
symbol (
str) – Element symbol, for example"Si".mass_number (
int) – Mass number, the28of silicon-28.mass_amu (
float) – Atomic mass [amu].abundance_percent (
float) – Natural abundance [%].
- srim.core.isotopes.stable_isotopes(symbol)¶
Naturally occurring isotopes of an element
- Parameters:
symbol (
str) – Element symbol, for example"Si".- Returns:
Most abundant first. Empty for an element with no natural isotopes.
- Return type:
tupleofIsotope- Raises:
ValueError – If
symbolis not an element symbol.
- srim.core.isotopes.isotope_label(isotope)¶
Label of an isotope, for example
"Si-28"
- srim.core.isotopes.find_isotope(symbol, mass_amu)¶
The natural isotope of an element whose mass matches, or None
A match is a mass within 1e-4 amu; the closest one is returned.
- class srim.core.compounds.Compound(name: str, formula: str, density_g_cm3: float, phase: int = 0)¶
A material with a chemical formula, as offered by the desktop app
- Parameters:
name (
str) – Name of the material, for example"Kapton".formula (
str) – Chemical formula, for example"C22H10N2O5".density_g_cm3 (
float) – Density [g/cm3].phase (
int) – 0 for a solid or liquid, 1 for a gas.
- srim.core.compounds.predefined_compounds()¶
The common materials, in the order of the data file
- srim.core.compounds.formula_elements(formula)¶
Elements of a chemical formula, with their ratios
- Parameters:
formula (
str) – Chemical formula such as"SiO2"or"N78.08O20.95Ar0.93". A ratio that is not written is 1.0.- Returns:
Element symbols and ratios in formula order.
- Return type:
listof (str,float)- Raises:
ValueError – If the formula is malformed, names an unknown element or repeats an element.