pymatgen.core.ion module
Module containing class to create an ion
- class Ion(composition, charge=0.0, properties=None)[source]
Bases:
pymatgen.core.composition.Composition
,monty.json.MSONable
,pymatgen.util.string.Stringify
Basic ion object. It is just a Composition object with an additional variable to store charge. The net charge can either be represented as Mn++, or Mn+2, or Mn[2+]. Note the order of the sign and magnitude in each representation.
Flexible Ion construction, similar to Composition. For more information, please see pymatgen.core.Composition
- property anonymized_formula[source]
An anonymized formula. Appends charge to the end of anonymized composition
- property formula[source]
Returns a formula string, with elements sorted by electronegativity, e.g., Li4 Fe4 P4 O16.
- classmethod from_dict(d)[source]
Generates an ion object from a dict created by as_dict().
- Parameters
d – {symbol: amount} dict.
- classmethod from_formula(formula: str) pymatgen.core.ion.Ion [source]
Creates Ion from formula.
- Parameters
formula –
- Returns
Ion