charged
charged(attr="", mass=False, ne=False)
Filters the catalogue to species with a non-zero net charge and returns either the Specie objects or a chosen attribute of each. Preserves the relative catalogue order of the surviving species.
Parameters
- attr : str, optional
- Name of a
Specieattribute to extract. If given, returns that attribute value for each charged species instead of theSpecieobject itself. Leave empty (default) to return theSpecieobjects.
Supported attributes are: charge elements exploded fidx index mass name serialized
- mass : bool, optional
- If
True, returns the mass of each charged species. Equivalent to passingattr="mass". DefaultFalse. - ne : bool, optional
- If
True, excludes the electron species ("e-") from the result even though it is charged. DefaultFalse.
Returns
- Vector[Specie or any]
- Charged
Specieobjects in catalogue order, or the value of attr for each charged species if attr was given.