Sources#
Raw elemental data sources behind the higher-level classes, plus the
Element enum and quick stats helper. New in cifkit 1.2.1 (migrated
from bobleesj.utils). See the
OLED tutorial for elemental-data context.
Mendeleev numbers#
cifkit.sources.mendeleev.numbers maps each element symbol to its
Mendeleev number (e.g. numbers["Fe"] == 55), the ordering used by all
_sorted_by_mendeleev properties in Cif.
Periodic table#
- cifkit.sources.ptable.get_data()#
Get the periodic table data.
Sourced from https://pubchem.ncbi.nlm.nih.gov/ptable/atomic-mass/
- cifkit.sources.ptable.values_from_atomic_number(atomic_number)#
Get the element data by atomic number.
- cifkit.sources.ptable.values_from_symbol(symbol)#
Get the element data by chemical symbol.
- cifkit.sources.ptable.values_from_name(name)#
Get the element data by name.
Radii#
- cifkit.sources.radius.data() dict#
Return a dictionary of element radius data.
- cifkit.sources.radius.value(element: str) dict[str, float]#
Get the radius data for a given element.
- Parameters:
element (str) – The chemical symbol of the element.
- Returns:
A dictionary containing the CIF radius and Pauling radius.
- Return type:
dict[str, float]
- Raises:
KeyError – If the element is not found in the radius data.
Examples
>>> get_radius("Fe") {'CIF': 1.242, 'Pauling_CN12': 1.26}
- cifkit.sources.radius.supported_elements() list[str]#
Get a list of supported elements.
- Returns:
A list of chemical symbols for the elements that have radius data.
- Return type:
list[str]
Examples
>>> get_supported_elements() ['Si', 'Sc', 'Fe', ...]
- cifkit.sources.radius.are_available(elements: list[str]) bool#
Check if all elements in the list are supported.
- Parameters:
elements (list[str]) – A list of chemical symbols of elements.
- Returns:
True if all elements are supported, False otherwise.
- Return type:
bool
Examples
>>> are_all_available(["Fe", "O", "N"]) True >>> are_all_available(["Fe", "UnknownElement"]) False
- cifkit.sources.radius.is_available(element: str) bool#
Check if an element is supported.
- Parameters:
element (str) – The chemical symbol of the element.
- Returns:
True if the element is supported, False otherwise.
- Return type:
bool
Examples
>>> is_supported("Fe") True >>> is_supported("UnknownElement") False
Element enum#
All 118 elements, symbol to full name:
from cifkit.data.element import Element
Element.Fe.symbol # 'Fe'
Element.Fe.full_name # 'Iron'
Element.all_symbols() # ['H', 'He', ..., 'Og']