oxmol.element module

Representation of chemical element.

This is a thin wrapper around the PyO3 base class: it calls the base class’ __new__ constructor and return an instance of the base class.

At present, it doesn’t seem to be possible to truly subclass PyO3 classes from Python, so this is all we are able to do on the Python end.

class oxmol.element.Element

Bases: oxmol.oxmol.PyElement

A chemical element. Represented in chemcore::molecule as a Rust enum.

Parameters:atomic_number – an int, the atomic number.
classmethod from_symbol(symbol: str) → oxmol.oxmol.PyElement

Create an element from its atomic symbol.