cobra.core.formula Module Contents

class cobra.core.formula.Formula(formula=None)[source]

Describes a Chemical Formula

Parameters:formula (string) – A legal formula string contains only letters and numbers.

Combine two molecular formulas.

Parameters:other_formula (Formula, str) – string for a chemical formula
Returns:The combined formula
Return type:Formula

Breaks the chemical formula down by element.


Calculate the mol mass of the compound

Returns:the mol mass
Return type:float