CSR Composition Stoichiometry

From VLECK
Jump to: navigation, search

The class ChemicalElements parses a chemical formula into its Composition stoichiometry. In addition, it can determine the molecular mass.


example
formula = "C55H72O5N4Mg"
struct  = ChemicalElements.parseFormula(formula)
print formula, "-->", struct
print "mol wt =", ChemicalElements.molecularMass(struct)


 

output
C55H72O5N4Mg --> {'H': 72, 'C': 55, 'Mg': 1, 'O': 5, 'N': 4}
mol wt = 893.48898



see also

CSR Elemental Composition