get_reduced_formula

Full name: ase2sprkkr.asr.structureinfo.get_reduced_formula

ase2sprkkr.asr.structureinfo.get_reduced_formula(formula, stoichiometry=False)[source]

Get reduced formula from formula.

Returns the reduced formula corresponding to a chemical formula, in the same order as the original formula E.g. Cu2S4 -> CuS2

Parameters:
  • formula (str)

  • stoichiometry (bool) – If True, return the stoichiometry ignoring the elements appearing in the formula, so for example “AB2” rather than “MoS2”

Return type:

A string containing the reduced formula.