6.1.2.3. equilibrator_api.phased_compound

inherit from equilibrator_cache.models.compound.Compound an add phases.

6.1.2.3.1. Module Contents

equilibrator_api.phased_compound.AQUEOUS_PHASE_NAME = 'aqueous'[source]
equilibrator_api.phased_compound.GAS_PHASE_NAME = 'gas'[source]
equilibrator_api.phased_compound.LIQUID_PHASE_NAME = 'liquid'[source]
equilibrator_api.phased_compound.SOLID_PHASE_NAME = 'solid'[source]
equilibrator_api.phased_compound.REDOX_PHASE_NAME = 'redox'[source]
equilibrator_api.phased_compound.PhaseInfo[source]
equilibrator_api.phased_compound.PHASE_INFO_DICT[source]
equilibrator_api.phased_compound.NON_AQUEOUS_COMPOUND_DICT[source]
equilibrator_api.phased_compound.MicroSpecie[source]
equilibrator_api.phased_compound.PHASED_COMPOUND_DICT[source]
equilibrator_api.phased_compound.CARBONATE_INCHIS[source]
class equilibrator_api.phased_compound.Condition(phase: str, abundance: equilibrator_api.ureg.Quantity = None)[source]

Bases: object

A class for defining the conditions of a compound.

I.e. the phase and the abundance.

property phase: str[source]

Return the phase.

property abundance: equilibrator_api.ureg.Quantity[source]

Return the abundance.

property standard_abundance: equilibrator_api.ureg.Quantity[source]

Return the standard abundance in this phase.

property physiolical_abundance: equilibrator_api.ureg.Quantity[source]

Return the default physiological abundance in this phase.

property dimensionality: str[source]

Return the dimensionality of the abundance in this phase.

E.g. [concentration] for aqueous phase, or [pressure] for gas phase. :return: the dimensionality in this phase, or None if abundance is fixed.

property ln_abundance: float[source]

Return the log of the ratio between given and std abundances.

property ln_physiological_abundance: float[source]

Return the log of the ratio between phys and std abundances.

property is_physiological: bool[source]

Return True iff the abundance is the same as the physiological.

Returns:

True if the abundance is in physiological conditions,

or if the abundance if fixed in this phase anyway.

reset_abundance(physiological: bool = False) None[source]

Reset the abundance to standard abundance.

Param:

physiological: bool Whether to reset to physiological conditions (e.g. 1 mM) or standard conditions otherwise (i.e. 1 M)

class equilibrator_api.phased_compound.PhasedCompound(compound: equilibrator_cache.Compound, condition: Condition = None)[source]

Bases: object

A class that combines an equilibrator_api Compound and a Condition.

property atom_bag: dict[source]

Get the compound’s atom bag.

property smiles: str[source]

Get the compound’s SMILES.

property inchi: str[source]

Get the compound’s InChI.

property inchi_key: str[source]

Get the compound’s InChIKey.

property id: int[source]

Get the compound’s equilibrator internal ID.

property formula: str[source]

Get the chemical formula.

property mass: float[source]

Get the chemical molecular mass.

property phase: str[source]

Get the phase.

property html_formula: str[source]

Get the chemical formula.

property phase_shorthand: str[source]

Get the phase shorthand (i.e. ‘l’ for liquid).

property possible_phases: Tuple[str][source]

Get the possible phases for this compound.

property abundance: equilibrator_api.ureg.Quantity[source]

Get the abundance.

property ln_abundance: float[source]

Return the log of the abundance (for thermodynamic calculations).

property ln_physiological_abundance: float[source]

Return the log of the default physiological abundance.

property is_physiological: bool[source]

Check if the abundance is physiological.

reset_abundance(physiological: bool = False) None[source]

Reset the abundance to standard abundance.

Param:

physiological: bool Whether to reset to physiological conditions (e.g. 1 mM) or standard conditions otherwise (i.e. 1 M)

get_stored_standard_dgf_prime(p_h: equilibrator_api.ureg.Quantity, ionic_strength: equilibrator_api.ureg.Quantity, temperature: equilibrator_api.ureg.Quantity, p_mg: equilibrator_api.ureg.Quantity) equilibrator_api.ureg.Quantity[source]

Return the stored formation energy of this phased compound.

Only if it exists, otherwise return None (and we will use component-contribution later to get the reaction energy).

Parameters:
  • p_h

  • ionic_strength

  • temperature

  • p_mg

Returns:

standard_dgf_prime (in kJ/mol)

get_stored_standard_dgf() equilibrator_api.ureg.Quantity[source]

Return the stored formation energy of this phased compound.

Only if it exists, otherwise return None (and we will use component-contribution later to get the reaction energy).

Returns:

standard_dgf (in kJ/mol)

get_stored_microspecie() MicroSpecie[source]

Get the stored microspecies (from the PHASED_COMPOUND_DICT).

Returns:

The MicroSpecie namedtuple with the stored formation energy,

or None if this compound has no stored value at this phase.

serialize() dict[source]

Return a serialized version of all the compound thermo data.

Returns:

a list of dictionaries with all the microspecies data

class equilibrator_api.phased_compound.Proton(compound: equilibrator_cache.Compound)[source]

Bases: PhasedCompound

A class specifically for protons.

property abundance: equilibrator_api.ureg.Quantity[source]

Get the abundance.

property ln_physiological_abundance: float[source]

Return the log of the default physiological abundance.

property ln_abundance: float[source]

Return the log of the abundance (for thermodynamic calculations).

class equilibrator_api.phased_compound.RedoxCarrier(compound: equilibrator_cache.Compound, potential: equilibrator_api.ureg.Quantity | None = None)[source]

Bases: PhasedCompound

A class specifically for redox carriers (with a given potential).

property atom_bag: dict[source]

Get the compound’s atom bag.

property ln_abundance: float[source]

Return the log of the abundance (for thermodynamic calculations).

property ln_physiological_abundance: float[source]

Return the log of the default physiological abundance.

property is_physiological: bool[source]

Check if the abundance is physiological.

get_stored_standard_dgf_prime(p_h: equilibrator_api.ureg.Quantity, ionic_strength: equilibrator_api.ureg.Quantity, temperature: equilibrator_api.ureg.Quantity, p_mg: equilibrator_api.ureg.Quantity) equilibrator_api.ureg.Quantity[source]

Get the standard formation ΔG’.

get_stored_standard_dgf() equilibrator_api.ureg.Quantity[source]

Get the standard formation ΔG.