mlcolvar.data.graph.AtomicNumberTable¶
- class mlcolvar.data.graph.AtomicNumberTable(zs: List[int])[source]¶
Bases:
objectThe atomic number table. Used to map between one hot encodings and a given set of actual atomic numbers.
- __init__(zs: List[int]) None[source]¶
Initializes an atomi number table object
- Parameters:
zs (List[int]) – The atomic numbers in this table
Methods
__init__(zs)Initializes an atomi number table object
from_zs(atomic_numbers)Build the table from an array atomic numbers.
index_to_symbol(index)Map the encoding to the atomic symbol
index_to_z(index)Maps the encoding to the actual atomic number
z_to_index(atomic_number)Maps an atomic number to the encoding.
zs_to_indices(atomic_numbers)Maps an array of atomic number to the encodings.
- classmethod from_zs(atomic_numbers: Iterable[int]) AtomicNumberTable[source]¶
Build the table from an array atomic numbers.
- Parameters:
atomic_numbers (Iterable[int]) – The atomic numbers to be used for building the table
- index_to_symbol(index: int) str[source]¶
Map the encoding to the atomic symbol
- Parameters:
index (int) – Index of the encoding to be mapped
- index_to_z(index: int) int[source]¶
Maps the encoding to the actual atomic number
- Parameters:
index (int) – Index of the encoding to be mapped