emzed.chemistry.molecular_formula module

class emzed.chemistry.molecular_formula.MolecularFormula(form)[source]

Bases: object

as_dict()[source]
as_string()[source]
mass(**specialisations)[source]

specialisations maps symbol to a dictionary d providing a mass by d[“mass”], eg:

specialisations = { ‘C’ : 12.0 } inst.mass(C=12.0)

or if you use the mass module:

inst.mass(C=mass.C12)

or you use mass in connection with the elements module:

inst.mass(C=elements.C12)