xnn.common.config.coerce.coerce_species#
- xnn.common.config.coerce.coerce_species(value, default=None)[source]#
Coerce a configured species list to a list of atomic numbers.
Accepts atomic numbers, chemical symbols (upstream NequIP
chemical_symbols), a mix of both, or the string form of such a list.- Parameters:
value (Any) – The raw config value;
Noneselectsdefault.default (sequence of int or None, optional) – Fallback when
valueisNone.
- Returns:
The atomic numbers, in the configured (channel) order.
- Return type:
- Raises:
ValueError – If the resulting list is empty or contains an unknown symbol.