Atomic Number Table¶
- class mlip.data.helpers.atomic_number_table.AtomicNumberTable(zs: Sequence[int])¶
The atomic number table which is handling the mappings between atomic species (indexes) and atomic numbers.
- __init__(zs: Sequence[int])¶
Constructor.
- Parameters:
zs – A sorted and deduplicated sequence of atomic numbers Z.
- index_to_z(index: int) int ¶
Maps an index (i.e., a value of atomic species) to an atomic number Z.
- Parameters:
index – The index to map to the atomic number.
- Returns:
The atomic number Z.
- z_to_index(atomic_number: int) int ¶
Maps an atomic number Z to an index (i.e., a value of atomic species).
- Parameters:
atomic_number – The atomic number Z.
- Returns:
The index.
- z_to_index_map(max_atomic_number: int) ndarray ¶
Returns a Z-to-index map that can be used by multiple numbers at once.
- Parameters:
max_atomic_number – The size of the resulting map array, i.e., the maximum atomic number to consider.
- Returns:
The map which is an array where the array index is the atomic number and the value at that index is the atomic index.