sandlerchemeq.reaction

Reaction class for chemical reactions

class Reaction[source]

Bases: object

A chemical reaction consisting of reactant and product Components. Automatically balances the reaction upon initialization.

components: list[Component]

List of all components in the reaction (reactants + products)

nu: ndarray

Stoichiometric coefficients (negative for reactants, positive for products)

stoProps: dict

Dictionary of stoichiometric property sums

stosum(propname)[source]

compute stoichiometric sum of property named propname

Parameters:

propname (str)

Return type:

float | ndarray

__init__(components=<factory>, nu=<factory>, stoProps=<factory>)
Parameters:
Return type:

None

__str__()[source]

spoof nu if reaction is not yet balanced

show()[source]