15.1.1.1.1.2. cobra.core.formula

15.1.1.1.1.2.1. 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.
__init__(formula=None)[source]
__add__(other_formula)[source]

Combine two molecular formulas.

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

Breaks the chemical formula down by element.

weight()

Calculate the mol mass of the compound

Returns:the mol mass
Return type:float