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(self) str[source]

Return the phase.

property abundance(self) equilibrator_api.ureg.Quantity[source]

Return the abundance.

property standard_abundance(self) equilibrator_api.ureg.Quantity[source]

Return the standard abundance in this phase.

property physiolical_abundance(self) equilibrator_api.ureg.Quantity[source]

Return the default physiological abundance in this phase.

property dimensionality(self) 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(self) float[source]

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

property ln_physiological_abundance(self) float[source]

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

reset_abundance(self) None[source]

Reset the abundance to standard abundance.

property is_physiological(self) 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.

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

Bases: object

A class that combines a equilibrator_api Compound and a Condition.

static get_default(compound: equilibrator_cache.Compound) Condition[source]

Get the default phase of a compound.

Parameters

compound – a Compound

Returns

the default phase

property atom_bag(self) dict[source]

Get the compound’s atom bag.

property smiles(self) str[source]

Get the compound’s InChI.

property inchi(self) str[source]

Get the compound’s InChI.

property inchi_key(self) str[source]

Get the compound’s InChIKey.

property id(self) int[source]

Get the compound’s equilibrator internal ID.

property formula(self) str[source]

Get the chemical formula.

property mass(self) float[source]

Get the chemical molecular mass.

property phase(self) str[source]

Get the phase.

property html_formula(self) str[source]

Get the chemical formula.

property phase_shorthand(self) str[source]

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

property possible_phases(self) Tuple[str][source]

Get the possible phases for this compound.

property abundance(self) equilibrator_api.ureg.Quantity[source]

Get the abundance.

property ln_abundance(self) float[source]

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

property ln_physiological_abundance(self) float[source]

Return the log of the default physiological abundance.

property is_physiological(self) bool[source]

Check if the abundance is physiological.

get_stored_standard_dgf_prime(self, 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(self) 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(self) 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(self) 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(self) equilibrator_api.ureg.Quantity[source]

Get the abundance.

property ln_physiological_abundance(self) float[source]

Return the log of the default physiological abundance.

property ln_abundance(self) float[source]

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

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

Bases: PhasedCompound

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

get_stored_standard_dgf_prime(self, 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(self) equilibrator_api.ureg.Quantity[source]

Get the standard formation ΔG.

property atom_bag(self) dict[source]

Get the compound’s atom bag.

property ln_abundance(self) float[source]

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

property ln_physiological_abundance(self) float[source]

Return the log of the default physiological abundance.

property is_physiological(self) bool[source]

Check if the abundance is physiological.