6.1.2.4. equilibrator_api.phased_reaction
¶
inherit from equilibrator_cache.reaction.Reaction an add phases.
6.1.2.4.1. Module Contents¶
- class equilibrator_api.phased_reaction.PhasedReaction(sparse: Dict[equilibrator_cache.Compound, float], arrow: str = '<=>', rid: str = None, sparse_with_phases: Dict[equilibrator_api.phased_compound.PhasedCompound, float] = None)[source]¶
Bases:
equilibrator_cache.Reaction
A daughter class of Reaction that adds phases and abundances.
- static to_phased_compound(cpd: equilibrator_cache.Compound) equilibrator_api.phased_compound.PhasedCompound [source]¶
Convert a Compound object to PhasedCompound.
- clone() PhasedReaction [source]¶
Clone this reaction object.
- reverse() PhasedReaction [source]¶
Return a PhasedReaction with the reverse reaction.
- get_element_data_frame() pandas.DataFrame [source]¶
Tabulate the elemental composition of all reactants.
- Returns
A data frame where the columns are the compounds and the indexes are atomic elements.
- Return type
DataFrame
- hash_md5(reversible: bool = True) str [source]¶
Return a MD5 hash of the PhasedReaction.
This hash is useful for finding reactions with the exact same stoichiometry. We create a unique formula string based on the Compound IDs and coefficients.
- set_abundance(compound: equilibrator_cache.Compound, abundance: equilibrator_api.ureg.Quantity)[source]¶
Set the abundance of the compound.
- set_phase(compound: equilibrator_cache.Compound, phase: str)[source]¶
Set the phase of the compound.
- get_phased_compound(compound: equilibrator_cache.Compound) Tuple[equilibrator_api.phased_compound.PhasedCompound, float] [source]¶
Get the PhasedCompound object by the Compound object.
- get_abundance(compound: equilibrator_cache.Compound) equilibrator_api.ureg.Quantity [source]¶
Get the abundance of the compound.
- property is_physiological bool [source]¶
Check if all concentrations are physiological.
This function is used by eQuilibrator to know if to present the adjusted dG’ or not (since the physiological dG’ is always displayed and it would be redundant).
- Returns
True if all compounds are at physiological abundances.
- get_stoichiometry(compound: equilibrator_cache.Compound) float [source]¶
Get the abundance of the compound.
- add_stoichiometry(compound: equilibrator_cache.Compound, coeff: float) None [source]¶
Add to the stoichiometric coefficient of a compound.
If this compound is not already in the reaction, add it.
- separate_stored_dg_prime(p_h: equilibrator_api.ureg.Quantity, ionic_strength: equilibrator_api.ureg.Quantity, temperature: equilibrator_api.ureg.Quantity, p_mg: equilibrator_api.ureg.Quantity) Tuple[equilibrator_cache.Reaction, equilibrator_api.ureg.Quantity] [source]¶
Split the PhasedReaction to aqueous phase and all the rest.
- Parameters
p_h –
ionic_strength –
temperature –
p_mg –
- Returns
a tuple (residual_reaction, stored_dg_prime) where
residual_reaction is a Reaction object (excluding the compounds that had stored values), and stored_dg_prime is the total dG’ of the compounds with stored values (in kJ/mol).
- separate_stored_dg() Tuple[equilibrator_cache.Reaction, equilibrator_api.ureg.Quantity] [source]¶
Split the PhasedReaction to aqueous phase and all the rest.
- Returns
a tuple (residual_reaction, stored_dg) where
residual_reaction is a Reaction object (excluding the compounds that had stored values), and stored_dg is the total dG of the compounds with stored values (in kJ/mol).
- dg_correction() equilibrator_api.ureg.Quantity [source]¶
Calculate the concentration adjustment in the dG’ of reaction.
- Returns
the correction for delta G in units of RT