Skip to content

Species

jaff.core.species.Species

The Species class is an ordered, name-indexed Catalogue of Specie objects. It supports lookup by name, by serialized form, and by integer index:

species["H2O"]
species["+/H/H/O"]
species[0]

The ne parameter on many accessor methods excludes the electron species ("e-"), which is often treated separately in network solvers.

Attributes

count : int
Total number of species in the collection.

Constructor

Species(species=None, check_length=True)

Parameters

species : list[Specie] or list[str] or None
Initial species. Plain strings are converted to Specie objects with indices assigned in list order. If None, an empty catalogue is created.
check_length : bool, optional
If True (default), verifies that the list and name-dict have the same length. Set to False when constructing from reactants/products that may contain duplicate species.