pmutt.reaction.Reaction

class pmutt.reaction.Reaction(reactants, reactants_stoich, products, products_stoich, transition_state=None, transition_state_stoich=None, notes=None)

Bases: _pmuttBase

Represents a chemical reaction

reactants

Reactants

Type:

list of pmutt model objects

reactants_stoich

Stoichiometric quantities of reactants

Type:

list of float

products

Products

Type:

list of pmutt model objects

products_stoich

Stoichiometric quantities of products

Type:

list of float

transition_state

Transition state specie. Default is None

Type:

pmutt model object, optional

transition_state_stoich

Stoichiometric quantities of transition state species. Default is None

Type:

list of float, optional

notes

Other notes such as the source of the reaction. Default is None

Type:

str or dict, optional

Notes

Specie-specific parameters can be passed by having a key named after the specie mapping onto a dictionary whose keys are the parameters to pass.

e.g. For the reaction: H2 + 0.5O2 = H2O, the pressures can be specified independently using the following dictionary. In this example arbitrary values were used so the quantity evaluated may be meaningless.

kwargs = {
    'T': 298.,
    'H2_kwargs': {'P': 2.},
    'O2_kwargs': {'P': 1.},
    'H2O_kwargs': {'P': 1.,}
}
__init__(reactants, reactants_stoich, products, products_stoich, transition_state=None, transition_state_stoich=None, notes=None)

Methods

__init__(reactants, reactants_stoich, ...[, ...])

check_element_balance()

Checks the reactants, products and transition state elemental composition

from_dict(json_obj)

Recreate an object from the JSON representation.

from_string(reaction_str, species[, ...])

Create a reaction object using the reaction string

get_A([T, rev, m, use_q])

Gets pre-exponential factor between reactants (or products) and transition state in 1/s

get_Cp_act(units[, rev])

Gets change in heat capacity (constant P) between reactants/products and the transition state

get_Cp_state(state, units, **kwargs)

Gets the heat capacity at constant pressure at a state

get_CpoR_act([rev])

Gets change in dimensionless heat capacity between reactants/products and the transition state

get_CpoR_state(state, **kwargs)

Gets dimensionless heat capacity at constant pressure at a state

get_Cv_act(units[, rev])

Gets change in heat capacity (constant V) between reactants/products and the transition state

get_Cv_state(state, units, **kwargs)

Gets the heat capacity at constant volume at a state

get_CvoR_act([rev])

Gets change in dimensionless heat capacity (constant V) between reactants/products and the transition state

get_CvoR_state(state, **kwargs)

Gets dimensionless heat capacity at constant volume at a state

get_E_act(units, T[, rev, del_m])

Gets act energy between reactants (or products) and transition state

get_E_state(state, units[, T, include_ZPE])

Gets the electronic energy at a state

get_EoRT_act([rev, del_m])

Gets dimensionless Arrhenius activation energy between reactants (or products) and transition state

get_EoRT_state(state[, include_ZPE])

Gets dimensionless electronic energy at a state

get_F_act(units, T[, rev])

Gets change in Helmholtz energy between reactants/products and the transition state

get_F_state(state, units, T, **kwargs)

Gets the Helholtz energy at a state

get_FoRT_act([rev])

Gets change in dimensionless Helmholtz energy between reactants/products and transition state

get_FoRT_state(state, **kwargs)

Gets dimensionless Helmholtz energy at a state

get_G_act(units, T[, rev])

Gets change in Gibbs energy between reactants/products and the transition state

get_G_state(state, units, T, **kwargs)

Gets the Gibbs energy at a state

get_GoRT_act([rev])

Gets change in dimensionless Gibbs energy between reactants/products and the transition state

get_GoRT_state(state, **kwargs)

Gets dimensionless Gibbs energy at a state

get_H_act(units, T[, rev])

Gets change in enthalpy between reactants/products and the transition state

get_H_state(state, units, T, **kwargs)

Gets the enthalpy at a state

get_HoRT_act([rev])

Gets change in dimensionless enthalpy between reactants/products and the transition state

get_HoRT_state(state, **kwargs)

Gets dimensionless enthalpy at a state

get_Keq([rev, act])

Gets equilibrium constant between reactants and products

get_S_act(units[, rev])

Gets change in entropy between reactants/products and the transition state

get_S_state(state, units, **kwargs)

Gets the entropy at a state

get_SoR_act([rev])

Gets change in dimensionless entropy between reactants/products and the transition state

get_SoR_state(state, **kwargs)

Gets dimensionless entropy at a state

get_U_act(units, T[, rev])

Gets change in internal energy between reactants/products and the transition state

get_U_state(state, units, T, **kwargs)

Gets the internal energy at a state

get_UoRT_act([rev])

Gets change in dimensionless internal energy between reactants/products and the transition state

get_UoRT_state(state, **kwargs)

Gets dimensionless internal energy at a state

get_delta_Cp(units[, rev, act])

Gets change in heat capacity (constant P) between reactants and products

get_delta_CpoR([rev, act])

Gets change in dimensionless heat capacity between reactants and products

get_delta_Cv(units[, rev, act])

Gets change in heat capacity (constant V) between reactants and products

get_delta_CvoR([rev, act])

Gets change in dimensionless heat capacity (constant V) between reactants and products

get_delta_E(units, T[, rev, act])

Gets change in electronic energy between reactants and products

get_delta_EoRT([rev, act])

Gets change in dimensionless electronic energy between reactants and products

get_delta_F(units, T[, rev, act])

Gets change in Helmholtz energy between reactants and products

get_delta_FoRT([rev, act])

Gets change in dimensionless Helmholtz energy between reactants and products

get_delta_G(units, T[, rev, act])

Gets change in Gibbs energy between reactants and products

get_delta_GoRT([rev, act])

Gets change in dimensionless Gibbs energy between reactants and products

get_delta_H(units, T[, rev, act])

Gets change in enthalpy between reactants and products

get_delta_HoRT([rev, act])

Gets change in dimensionless enthalpy between reactants and products

get_delta_S(units[, rev, act])

Gets change in entropy between reactants and products

get_delta_SoR([rev, act])

Gets change in dimensionless entropy between reactants and products

get_delta_U(units, T[, rev, act])

Gets change in internal energy between reactants and products

get_delta_UoRT([rev, act])

Gets change in dimensionless internal energy between reactants and products

get_delta_q([rev, act])

Gets change in partition function between reactants and products

get_delta_quantity(initial_state, ...)

Helper method to calculate the change in thermodynamic quantity between states

get_q_act([rev, include_ZPE])

Gets change in partition function between reactants/products and the transition state

get_q_state(state, **kwargs)

Gets partition function at a state

get_species([include_TS, key])

Returns the unique species included in the reaction.

get_state_quantity(state, method_name, **kwargs)

Helper method to calculate the thermodynamic quantity of the state

to_dict()

Represents object as dictionary with JSON-accepted datatypes

to_string([species_delimiter, ...])

Writes the Reaction object as a stoichiometric reaction

Attributes

products

products_stoich

reactants

reactants_stoich

transition_state

transition_state_stoich

check_element_balance()

Checks the reactants, products and transition state elemental composition

Raises:

ValueError – Raised if the reactants, products and/or transition state element composition does not agree.

classmethod from_dict(json_obj)

Recreate an object from the JSON representation.

Parameters:

json_obj (dict) – JSON representation

Returns:

Reaction

Return type:

Reaction object

classmethod from_string(reaction_str, species, species_delimiter='+', reaction_delimiter='=', notes=None, raise_error=True, raise_warning=True)

Create a reaction object using the reaction string

Parameters:
  • reaction_str (str) – Reaction string.

  • species (dict or list) – Dictionary using the names as keys. If you have a list of species it will automatically be converted to a dictionary.

  • species_delimiter (str, optional) – Delimiter that separate species. Leading and trailing spaces will be trimmed. Default is ‘+’

  • reaction_delimiter (str, optional) – Delimiter that separate states of the reaction. Leading and trailing spaces will be trimmed. Default is ‘=’

  • notes (str or dict, optional) – Other notes such as the source of the reaction. Default is None

  • raise_error (bool, optional) – If True, raises an error if the transition state is not located in species. Default is True

  • raise_warning (bool, optional) – Only relevant if raise_error is False. Raises a warning if the transition state is not located in species. If a warning is raised, the Reaction will try to be initialized without the transition state. Default is True

Returns:

Reaction

Return type:

Reaction object

Raises:

KeyError – Raised if species does not contain an entry for the reactants, products or transition state in reaction_str

get_A(T=298.15, rev=False, m=0, use_q=True, **kwargs)

Gets pre-exponential factor between reactants (or products) and transition state in 1/s

\(A = \frac {k_B T} {h} \frac {q^{TS}}{q^{initial state}} \exp (m)\) if use_q = True

\(A = \frac {k_B T} {h} \exp\bigg(\frac {\Delta S^{TS}}{R}+m \bigg)\) if use_q = False

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • T (float, optional) – Temperature in K. Default is standard temperature.

  • m (int, optional) – Molecularity of gas-phase species in the reaction. Condensed-phase reactions and unimolecular gas-phase reactions should have a value of 1. Bimolecular gas-phase reactions should have a value of 2. If None specified, m will be calculated (assuming all species in the initial state arw gas phase). To get the transition-state estimate of the pre-exponential factor, set to 0 (default).

  • use_q (bool, optional) – If True, uses ratio of partition functions to calculate A (Note: include_ZPE=False). If False, uses the entropy of activation to calculate A.

  • kwargs (keyword arguments) – Parameters required to calculate pre-exponential factor. See class docstring to see how to pass specific parameters to different species.

Returns:

A – Pre-exponential factor

Return type:

float

get_Cp_act(units, rev=False, **kwargs)

Gets change in heat capacity (constant P) between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_Cp – Change in heat capacity between reactants/products and the transition state

Return type:

float

get_Cp_state(state, units, **kwargs)

Gets the heat capacity at constant pressure at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity at constant pressure. See class docstring to see how to pass specific parameters to different species.

Returns:

Cp – Heat capacity at constant pressure of the reaction state

Return type:

float

get_CpoR_act(rev=False, **kwargs)

Gets change in dimensionless heat capacity between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

CvoR_act – Change in heat capacity between reactants/products and the transition state

Return type:

float

get_CpoR_state(state, **kwargs)

Gets dimensionless heat capacity at constant pressure at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless heat capacity at constant pressure. See class docstring to see how to pass specific parameters to different species.

Returns:

CpoR – Dimensionless heat capacity at constant pressure of the reaction state

Return type:

float

get_Cv_act(units, rev=False, **kwargs)

Gets change in heat capacity (constant V) between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

Cv_act – Change in heat capacity between reactants and products

Return type:

float

get_Cv_state(state, units, **kwargs)

Gets the heat capacity at constant volume at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity at constant volume. See class docstring to see how to pass specific parameters to different species.

Returns:

Cv – Heat capacity at constant volume of the reaction state

Return type:

float

get_CvoR_act(rev=False, **kwargs)

Gets change in dimensionless heat capacity (constant V) between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

CvoR_act – Change in heat capacity between reactants/products and transition state

Return type:

float

get_CvoR_state(state, **kwargs)

Gets dimensionless heat capacity at constant volume at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless heat capacity at constant volume. See class docstring to see how to pass specific parameters to different species.

Returns:

CvoR – Dimensionless heat capacity at constant volume of the reaction state

Return type:

float

get_E_act(units, T, rev=False, del_m=1, **kwargs)

Gets act energy between reactants (or products) and transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • del_m (int, optional) – Change in molecularity of gas-phase species in the reaction. Condensed-phase and unimolecular gas-phase reactions should have a value of 0. Bimolecular gas-phase reactions should have a value of -1. If None specified, m will be calculated (assuming all species in the initial state and transition state are gas phase). To get the transition-state enthalpy of activation, set to 1 (default).

  • kwargs (keyword arguments) – Parameters required to calculate act energy. See class docstring to see how to pass specific parameters to different species.

Returns:

E_act – act energy between reactants (or products) and transition state

Return type:

float

get_E_state(state, units, T=298.15, include_ZPE=False, **kwargs)

Gets the electronic energy at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • include_ZPE (bool, optional) – If True, includes the zero point energy. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate electronic energy. See class docstring to see how to pass specific parameters to different species.

Returns:

E – Electronic energy of the reaction state

Return type:

float

get_EoRT_act(rev=False, del_m=1, **kwargs)

Gets dimensionless Arrhenius activation energy between reactants (or products) and transition state

If the transition state method is used, the enthalpy of activation is converted to activation energy using the following:

\(\frac {E_a}{RT} = \frac {\Delta H^{TS}}{RT} + (1-\Delta n^{TS})\)

where \(\Delta n^{TS}\) is the change in the number of molecules on forming the transition state.

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • del_m (int, optional) – Change in molecularity of gas-phase species in the reaction. Condensed-phase and unimolecular gas-phase reactions should have a value of 0. Bimolecular gas-phase reactions should have a value of -1. If None specified, m will be calculated (assuming all species in the initial state and transition state are gas phase). To get the transition-state enthalpy of activation, set to 1 (default).

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless act energy

Returns:

EoRT_act – Dimensionless act energy between reactants (or products) and transition state

Return type:

float

get_EoRT_state(state, include_ZPE=False, **kwargs)

Gets dimensionless electronic energy at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • include_ZPE (bool, optional) – If True, includes the zero point energy. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless electronic energy. See class docstring to see how to pass specific parameters to different species.

Returns:

EoRT – Dimensionless electronic energy of the reaction state.

Return type:

float

get_F_act(units, T, rev=False, **kwargs)

Gets change in Helmholtz energy between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Helmholtz energy. See class docstring to see how to pass specific parameters to different species.

Returns:

F_act – Change in Helmholtz energy between reactants/products and the transition state

Return type:

float

get_F_state(state, units, T, **kwargs)

Gets the Helholtz energy at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • kwargs (keyword arguments) – Parameters required to calculate Helholtz energy. See class docstring to see how to pass specific parameters to different species.

Returns:

F – Helmholtz energy of the reaction state

Return type:

float

get_FoRT_act(rev=False, **kwargs)

Gets change in dimensionless Helmholtz energy between reactants/products and transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Helmholtz energy. See class docstring to see how to pass specific parameters to different species.

Returns:

FoRT_act – Change in Helmholtz energy between reactants/products and the transition state

Return type:

float

get_FoRT_state(state, **kwargs)

Gets dimensionless Helmholtz energy at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless Helmholtz energy. See class docstring to see how to pass specific parameters to different species.

Returns:

FoRT – Dimensionless Helmoltz energy of the reaction state

Return type:

float

get_G_act(units, T, rev=False, **kwargs)

Gets change in Gibbs energy between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Gibbs energy. See class docstring to see how to pass specific parameters to different species.

Returns:

G_act – Change in Gibbs energy between reactants/products and the transition state

Return type:

float

get_G_state(state, units, T, **kwargs)

Gets the Gibbs energy at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • kwargs (keyword arguments) – Parameters required to calculate Gibbs energy. See class docstring to see how to pass specific parameters to different species.

Returns:

G – Gibbs energy of the reaction state

Return type:

float

get_GoRT_act(rev=False, **kwargs)

Gets change in dimensionless Gibbs energy between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Gibbs energy. See class docstring to see how to pass specific parameters to different species.

Returns:

GoRT_act – Change in Gibbs energy between reactants/products and the transition state

Return type:

float

get_GoRT_state(state, **kwargs)

Gets dimensionless Gibbs energy at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless Gibbs energy. See class docstring to see how to pass specific parameters to different species.

Returns:

GoRT – Dimensionless Gibbs energy of the reaction state

Return type:

float

get_H_act(units, T, rev=False, **kwargs)

Gets change in enthalpy between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate enthalpy. See class docstring to see how to pass specific parameters to different species.

Returns:

H_act – Change in enthalpy between reactants/products and the transition state

Return type:

float

get_H_state(state, units, T, **kwargs)

Gets the enthalpy at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • kwargs (keyword arguments) – Parameters required to calculate enthalpy. See class docstring to see how to pass specific parameters to different species.

Returns:

H – Enthalpy of the reaction state

Return type:

float

get_HoRT_act(rev=False, **kwargs)

Gets change in dimensionless enthalpy between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate enthalpy. See class docstring to see how to pass specific parameters to different species.

Returns:

HoRT_act – Change in enthalpy between reactants/products and the transition state

Return type:

float

get_HoRT_state(state, **kwargs)

Gets dimensionless enthalpy at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless enthalpy. See class docstring to see how to pass specific parameters to different species.

Returns:

HoRT – Dimensionless heat capacity at constant pressure of the reaction state.

Return type:

float

get_Keq(rev=False, act=False, **kwargs)

Gets equilibrium constant between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate equilibrium constant. See class docstring to see how to pass specific parameters to different species.

Returns:

Keq – Equilibrium constant between reactants and products

Return type:

float

get_S_act(units, rev=False, **kwargs)

Gets change in entropy between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate entropy. See class docstring to see how to pass specific parameters to different species.

Returns:

S_act – Change in entropy between reactants/products and the transition state

Return type:

float

get_S_state(state, units, **kwargs)

Gets the entropy at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters required to calculate entropy. See class docstring to see how to pass specific parameters to different species.

Returns:

S – Entropy of the reaction state

Return type:

float

get_SoR_act(rev=False, **kwargs)

Gets change in dimensionless entropy between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate entropy. See class docstring to see how to pass specific parameters to different species.

Returns:

SoR_act – Change in entropy between reactants/products and the transition state

Return type:

float

get_SoR_state(state, **kwargs)

Gets dimensionless entropy at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless entropy. See class docstring to see how to pass specific parameters to different species.

Returns:

SoR – Dimensionless entropy of the reaction state

Return type:

float

get_U_act(units, T, rev=False, **kwargs)

Gets change in internal energy between reactants/products and the transition state

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate internal energy. See class docstring to see how to pass specific parameters to different species.

Returns:

U_act – Change in internal energy between reactants/products and the transition state

Return type:

float

get_U_state(state, units, T, **kwargs)

Gets the internal energy at a state

Parameters:
  • state (str) –

    State to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • kwargs (keyword arguments) – Parameters required to calculate internal energy. See class docstring to see how to pass specific parameters to different species.

Returns:

U – Internal energy of the reaction state

Return type:

float

get_UoRT_act(rev=False, **kwargs)

Gets change in dimensionless internal energy between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate internal energy. See class docstring to see how to pass specific parameters to different species.

Returns:

UoRT_act – Change in internal energy between reactants/products and the transition state

Return type:

float

get_UoRT_state(state, **kwargs)

Gets dimensionless internal energy at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’ (same as transition state)

  • kwargs (keyword arguments) – Parameters required to calculate dimensionless internal energy. See class docstring to see how to pass specific parameters to different species.

Returns:

UoRT – Dimensionless internal energy of the reaction state.

Return type:

float

get_delta_Cp(units, rev=False, act=False, **kwargs)

Gets change in heat capacity (constant P) between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_Cp – Change in heat capacity between reactants and products

Return type:

float

get_delta_CpoR(rev=False, act=False, **kwargs)

Gets change in dimensionless heat capacity between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_CvoR – Change in heat capacity between reactants and products

Return type:

float

get_delta_Cv(units, rev=False, act=False, **kwargs)

Gets change in heat capacity (constant V) between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_Cv – Change in heat capacity between reactants and products

Return type:

float

get_delta_CvoR(rev=False, act=False, **kwargs)

Gets change in dimensionless heat capacity (constant V) between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate heat capacity. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_CvoR – Change in heat capacity between reactants and products

Return type:

float

get_delta_E(units, T, rev=False, act=False, **kwargs)

Gets change in electronic energy between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate electronic energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_E – Change in electronic energy between reactants and products

Return type:

float

get_delta_EoRT(rev=False, act=False, **kwargs)

Gets change in dimensionless electronic energy between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate electronic energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_EoRT – Change in electronic energy between reactants and products

Return type:

float

get_delta_F(units, T, rev=False, act=False, **kwargs)

Gets change in Helmholtz energy between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Helmholtz energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_F – Change in Helmholtz energy between reactants and products

Return type:

float

get_delta_FoRT(rev=False, act=False, **kwargs)

Gets change in dimensionless Helmholtz energy between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Helmholtz energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_FoRT – Change in Helmholtz energy between reactants and products

Return type:

float

get_delta_G(units, T, rev=False, act=False, **kwargs)

Gets change in Gibbs energy between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Gibbs energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_G – Change in Gibbs energy between reactants and products

Return type:

float

get_delta_GoRT(rev=False, act=False, **kwargs)

Gets change in dimensionless Gibbs energy between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate Gibbs energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_GoRT – Change in Gibbs energy between reactants and products

Return type:

float

get_delta_H(units, T, rev=False, act=False, **kwargs)

Gets change in enthalpy between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate enthalpy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_H – Change in enthalpy between reactants and products

Return type:

float

get_delta_HoRT(rev=False, act=False, **kwargs)

Gets change in dimensionless enthalpy between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate enthalpy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_HoRT – Change in enthalpy between reactants and products

Return type:

float

get_delta_S(units, rev=False, act=False, **kwargs)

Gets change in entropy between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate entropy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_S – Change in entropy between reactants and products

Return type:

float

get_delta_SoR(rev=False, act=False, **kwargs)

Gets change in dimensionless entropy between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate entropy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_SoR – Change in entropy between reactants and products

Return type:

float

get_delta_U(units, T, rev=False, act=False, **kwargs)

Gets change in internal energy between reactants and products

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float) – Temperature in K

  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate internal energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_U – Change in internal energy between reactants and products

Return type:

float

get_delta_UoRT(rev=False, act=False, **kwargs)

Gets change in dimensionless internal energy between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate internal energy. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_UoRT – Change in internal energy between reactants and products

Return type:

float

get_delta_q(rev=False, act=False, **kwargs)

Gets change in partition function between reactants and products

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • act (bool, optional) – If True, uses the transition state as the final state. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate partition function. See class docstring to see how to pass specific parameters to different species.

Returns:

delta_q – Change in partition function between reactants and products

Return type:

float

get_delta_quantity(initial_state, final_state, method_name, **kwargs)

Helper method to calculate the change in thermodynamic quantity between states

Parameters:
  • initial_state (str) –

    Thermodynamic state. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

  • final_state (str) –

    Thermodynamic state. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

  • method_name (str) – Name of method to use to calculate quantity. Calculates any quantity as long as the relevant objects have the same method name

  • kwargs (keyword arguments) – Arguments passed to evaluate the quantity of the reactants and products

Returns:

delta_quantity – Change in thermodynamic quantity between particular states

Return type:

float

get_q_act(rev=False, include_ZPE=False, **kwargs)

Gets change in partition function between reactants/products and the transition state

Parameters:
  • rev (bool, optional) – Reverse direction. If True, uses products as initial state instead of reactants. Default is False

  • include_ZPE (bool, optional) – If True, includes zero-point energy when calculating the value of the partition functions. Default is False

  • kwargs (keyword arguments) – Parameters required to calculate partition function. See class docstring to see how to pass specific parameters to different species.

Returns:

q_act – Change in partition function between reactants/products and the transition state

Return type:

float

get_q_state(state, **kwargs)

Gets partition function at a state

Parameters:
  • state (str) –

    state to calculate quantity. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’

  • kwargs (keyword arguments) – Parameters with the conditions to calculate partition function. See class docstring to see how to pass specific parameters to different species.

Returns:

q – Partition function of the reaction state

Return type:

float

get_species(include_TS=True, key='name')

Returns the unique species included in the reaction.

Parameters:
  • include_TS (bool, optional) – Whether transition states should be included. Default is True

  • key (str, optional) – Attribute to use as the key in the output dictionary. Default is name

Returns:

species – Unique species in the reaction

Return type:

dict

get_state_quantity(state, method_name, **kwargs)

Helper method to calculate the thermodynamic quantity of the state

Parameters:
  • state (str) –

    Thermodynamic state. Supported options:

    • ’reactants’

    • ’products’

    • ’transition state’

    • ’transition_state’

    • ’ts’

  • method_name (str) – Name of method to use to calculate quantity. Calculates any quantity as long as the relevant objects have the same method name

  • kwargs (keyword arguments) – Arguments required to calculate the thermodynamic quantity of interest.

Returns:

state_quantity – Thermodynamic quantity of particular state

Return type:

float

property products
property products_stoich
property reactants
property reactants_stoich
to_dict()

Represents object as dictionary with JSON-accepted datatypes

Returns:

obj_dict

Return type:

dict

to_string(species_delimiter='+', reaction_delimiter='=', stoich_format='.2f', include_TS=True, stoich_space=False, key='name')

Writes the Reaction object as a stoichiometric reaction

Parameters:
  • species_delimiter (str, optional) – Separates species. Default is ‘+’

  • reaction_delimiter (str, optional) – Separates reaction states. Default is ‘=’

  • stoich_format (float, optional) – Format to write stoichiometric numbers. Default is ‘.2f’ (float rounded to 2 decimal places)

  • include_TS (bool, optional) – If True, includes transition states in output. Default is True

  • stoich_space (bool, optional) – If True, inserts a space between stoichiometric coefficients and the species name. Default is False

  • key (str, optional) – Attribute to use to print out species. Default is name

Returns:

reaction_str – Reaction string

Return type:

str

property transition_state
property transition_state_stoich