# rmgpy.data.kinetics.DepositoryReaction¶

class rmgpy.data.kinetics.DepositoryReaction(index=- 1, reactants=None, products=None, specific_collider=None, kinetics=None, reversible=True, transition_state=None, duplicate=False, degeneracy=1, pairs=None, depository=None, family=None, entry=None)

A Reaction object generated from a reaction depository. In addition to the usual attributes, this class includes depository and entry attributes to store the library and the entry in that depository that it was created from.

SurfaceArrhenius

object

Type:

SurfaceArrhenius

allow_max_rate_violation

‘bool’

Type:

allow_max_rate_violation

allow_pdep_route

‘bool’

Type:

allow_pdep_route

calculate_coll_limit(self, float temp, bool reverse=False)

Calculate the collision limit rate in m3/mol-s for the given temperature implemented as recommended in Wang et al. doi 10.1016/j.combustflame.2017.08.005 (Eq. 1)

calculate_microcanonical_rate_coefficient(self, ndarray e_list, ndarray j_list, ndarray reac_dens_states, ndarray prod_dens_states=None, double T=0.0)

Calculate the microcanonical rate coefficient $$k(E)$$ for the reaction reaction at the energies e_list in J/mol. reac_dens_states and prod_dens_states are the densities of states of the reactant and product configurations for this reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction is reversible, then both are required. This function will try to use the best method that it can based on the input data available:

• If detailed information has been provided for the transition state (i.e. the molecular degrees of freedom), then RRKM theory will be used.

• If the above is not possible but high-pressure limit kinetics $$k_\infty(T)$$ have been provided, then the inverse Laplace transform method will be used.

The density of states for the product prod_dens_states and the temperature of interest T in K can also be provided. For isomerization and association reactions prod_dens_states is required; for dissociation reactions it is optional. The temperature is used if provided in the detailed balance expression to determine the reverse kinetics, and in certain cases in the inverse Laplace transform method.

calculate_tst_rate_coefficient(self, double T) double

Evaluate the forward rate coefficient for the reaction with corresponding transition state TS at temperature T in K using (canonical) transition state theory. The TST equation is

$k(T) = \kappa(T) \frac{k_\mathrm{B} T}{h} \frac{Q^\ddagger(T)}{Q^\mathrm{A}(T) Q^\mathrm{B}(T)} \exp \left( -\frac{E_0}{k_\mathrm{B} T} \right)$

where $$Q^\ddagger$$ is the partition function of the transition state, $$Q^\mathrm{A}$$ and $$Q^\mathrm{B}$$ are the partition function of the reactants, $$E_0$$ is the ground-state energy difference from the transition state to the reactants, $$T$$ is the absolute temperature, $$k_\mathrm{B}$$ is the Boltzmann constant, and $$h$$ is the Planck constant. $$\kappa(T)$$ is an optional tunneling correction.

calculate_tst_rate_coefficients(self, ndarray Tlist) ndarray
can_tst(self) bool

Return True if the necessary parameters are available for using transition state theory – or the microcanonical equivalent, RRKM theory – to compute the rate coefficient for this reaction, or False otherwise.

check_collision_limit_violation(self, float t_min, float t_max, float p_min, float p_max) list

Warn if a core reaction violates the collision limit rate in either the forward or reverse direction at the relevant extreme T/P conditions. Assuming a monotonic behaviour of the kinetics. Returns a list with the reaction object and the direction in which the violation was detected.

comment

unicode

Type:

comment

copy(self)

Create a deep copy of the current reaction.

degeneracy

The reaction path degeneracy for this reaction.

If the reaction has kinetics, changing the degeneracy will adjust the reaction rate by a ratio of the new degeneracy to the old degeneracy.

draw(self, path)

Generate a pictorial representation of the chemical reaction using the draw module. Use path to specify the file to save the generated image to; the image type is automatically determined by extension. Valid extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are vector formats.

duplicate

‘bool’

Type:

duplicate

elementary_high_p

‘bool’

Type:

elementary_high_p

ensure_species(self, bool reactant_resonance=False, bool product_resonance=False, bool save_order=False)

Ensure the reaction contains species objects in its reactant and product attributes. If the reaction is found to hold molecule objects, it modifies the reactant, product and pairs to hold Species objects.

Generates resonance structures for Molecules if the corresponding options, reactant_resonance and/or product_resonance, are True. Does not generate resonance for reactants or products that start as Species objects. If save_order is True the atom order is reset after performing atom isomorphism.

fix_barrier_height(self, bool force_positive=False)

Turns the kinetics into Arrhenius (if they were ArrheniusEP) and ensures the activation energy is at least the endothermicity for endothermic reactions, and is not negative only as a result of using Evans Polanyi with an exothermic reaction. If force_positive is True, then all reactions are forced to have a non-negative barrier.

fix_diffusion_limited_a_factor(self, T)

Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the specified temperature.

generate_3d_ts(self, reactants, products)

Generate the 3D structure of the transition state. Called from model.generate_kinetics().

self.reactants is a list of reactants self.products is a list of products

generate_high_p_limit_kinetics(self)

Used for incorporating library reactions with pressure-dependent kinetics in PDep networks. Only implemented for LibraryReaction

generate_pairs(self)

Generate the reactant-product pairs to use for this reaction when performing flux analysis. The exact procedure for doing so depends on the reaction type:

Reaction type

Template

Resulting pairs

Isomerization

A -> C

(A,C)

Dissociation

A -> C + D

(A,C), (A,D)

Association

A + B -> C

(A,C), (B,C)

Bimolecular

A + B -> C + D

(A,C), (B,D) or (A,D), (B,C)

There are a number of ways of determining the correct pairing for bimolecular reactions. Here we try a simple similarity analysis by comparing the number of heavy atoms. This should work most of the time, but a more rigorous algorithm may be needed for some cases.

generate_reverse_rate_coefficient(self, bool network_kinetics=False, Tmin=None, Tmax=None, double surface_site_density=0)

Generate and return a rate coefficient model for the reverse reaction. Currently this only works if the kinetics attribute is one of several (but not necessarily all) kinetics types.

If the reaction kinetics model is Sticking Coefficient, please provide a nonzero surface site density in mol/m^2 which is required to evaluate the rate coefficient.

get_enthalpies_of_reaction(self, ndarray Tlist) ndarray

Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.

get_enthalpy_of_reaction(self, double T) double

Return the enthalpy of reaction in J/mol evaluated at temperature T in K.

get_entropies_of_reaction(self, ndarray Tlist) ndarray

Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.

get_entropy_of_reaction(self, double T) double

Return the entropy of reaction in J/mol*K evaluated at temperature T in K.

get_equilibrium_constant(self, double T, unicode type=u'Kc', double surface_site_density=2.5e-05) double

Return the equilibrium constant for the reaction at the specified temperature T in K and reference surface_site_density in mol/m^2 (2.5e-05 default) The type parameter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations (default), or Kp for pressures. This function assumes a reference pressure of 1e5 Pa for gas phases species and uses the ideal gas law to determine reference concentrations. For surface species, the surface_site_density is the assumed reference.

get_equilibrium_constants(self, ndarray Tlist, unicode type=u'Kc') ndarray

Return the equilibrium constants for the reaction at the specified temperatures Tlist in K. The type parameter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations (default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.

get_free_energies_of_reaction(self, ndarray Tlist) ndarray

Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.

get_free_energy_of_reaction(self, double T) double

Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K.

get_mean_sigma_and_epsilon(self, bool reverse=False)

Calculates the collision diameter (sigma) using an arithmetic mean Calculates the well depth (epsilon) using a geometric mean If reverse is False the above is calculated for the reactants, otherwise for the products

get_rate_coefficient(self, double T, double P=0, double surface_site_density=0) double

Return the overall rate coefficient for the forward reaction at temperature T in K and pressure P in Pa, including any reaction path degeneracies.

If diffusion_limiter is enabled, the reaction is in the liquid phase and we use a diffusion limitation to correct the rate. If not, then use the intrinsic rate coefficient.

If the reaction has sticking coefficient kinetics, a nonzero surface site density in mol/m^2 must be provided

get_reduced_mass(self, bool reverse=False)

Returns the reduced mass of the reactants if reverse is False Returns the reduced mass of the products if reverse is True

get_source()

Return the database that was the source of this reaction. For a DepositoryReaction this should be a KineticsDepository object.

get_stoichiometric_coefficient(self, Species spec) int

Return the stoichiometric coefficient of species spec in the reaction. The stoichiometric coefficient is increased by one for each time spec appears as a product and decreased by one for each time spec appears as a reactant.

get_surface_rate_coefficient(self, double T, double surface_site_density) double

Return the overall surface rate coefficient for the forward reaction at temperature T in K with surface site density surface_site_density in mol/m2. Value is returned in combination of [m,mol,s]

get_url(self)

Get a URL to search for this reaction in the rmg website.

has_template(self, list reactants, list products) bool

Return True if the reaction matches the template of reactants and products, which are both lists of Species objects, or False if not.

index

‘int’

Type:

index

is_association(self) bool

Return True if the reaction represents an association reaction $$\ce{A + B <=> C}$$ or False if not.

is_balanced(self) bool

Return True if the reaction has the same number of each atom on each side of the reaction equation, or False if not.

is_dissociation(self) bool

Return True if the reaction represents a dissociation reaction $$\ce{A <=> B + C}$$ or False if not.

is_forward

‘bool’

Type:

is_forward

is_isomerization(self) bool

Return True if the reaction represents an isomerization reaction $$\ce{A <=> B}$$ or False if not.

is_isomorphic(self, Reaction other, bool either_direction=True, bool check_identical=False, bool check_only_label=False, bool check_template_rxn_products=False, bool generate_initial_map=False, bool strict=True, bool save_order=False) bool

Return True if this reaction is the same as the other reaction, or False if they are different. The comparison involves comparing isomorphism of reactants and products, and doesn’t use any kinetic information.

Parameters:
• either_direction (bool, optional) – if False,then the reaction direction must match.

• check_identical (bool, optional) – if True, check that atom ID’s match (used for checking degeneracy)

• check_only_label (bool, optional) – if True, only check the string representation, ignoring molecular structure comparisons

• check_template_rxn_products (bool, optional) – if True, only check isomorphism of reaction products (used when we know the reactants are identical, i.e. in generating reactions)

• generate_initial_map (bool, optional) – if True, initialize map by pairing atoms with same labels

• strict (bool, optional) – if False, perform isomorphism ignoring electrons

• save_order (bool, optional) – if True, perform isomorphism saving atom order

is_surface_reaction(self) bool

Return True if one or more reactants or products are surface species (or surface sites)

is_unimolecular(self) bool

Return True if the reaction has a single molecule as either reactant or product (or both) $$\ce{A <=> B + C}$$ or $$\ce{A + B <=> C}$$ or $$\ce{A <=> B}$$, or False if not.

k_effective_cache

dict

Type:

k_effective_cache

kinetics

rmgpy.kinetics.model.KineticsModel

Type:

kinetics

label

unicode

Type:

label

matches_species(self, list reactants, list products=None) bool

Compares the provided reactants and products against the reactants and products of this reaction. Both directions are checked.

Parameters:
• reactants (list) – Species required on one side of the reaction

• products (list, optional) – Species required on the other side

network_kinetics

rmgpy.kinetics.arrhenius.Arrhenius

Type:

network_kinetics

pairs

list

Type:

pairs

products

list

Type:

products

rank

object

Type:

rank

reactants

list

Type:

reactants

reverse_arrhenius_rate(self, Arrhenius k_forward, unicode reverse_units, Tmin=None, Tmax=None)

Reverses the given k_forward, which must be an Arrhenius type. You must supply the correct units for the reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).

reverse_sticking_coeff_rate(self, StickingCoefficient k_forward, unicode reverse_units, double surface_site_density, Tmin=None, Tmax=None)

Reverses the given k_forward, which must be a StickingCoefficient type. You must supply the correct units for the reverse rate. The equilibrium constant is evaluated from the current reaction instance (self). The surface_site_density in mol/m^2 is used to evalaute the forward rate constant.

reverse_surface_arrhenius_rate(self, SurfaceArrhenius k_forward, unicode reverse_units, Tmin=None, Tmax=None)

Reverses the given k_forward, which must be a SurfaceArrhenius type. You must supply the correct units for the reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).

reversible

‘bool’

Type:

reversible

specific_collider

rmgpy.species.Species

Type:

specific_collider

to_cantera(self, species_list=None, use_chemkin_identifier=False)

Converts the RMG Reaction object to a Cantera Reaction object with the appropriate reaction class.

If use_chemkin_identifier is set to False, the species label is used instead. Be sure that species’ labels are unique when setting it False.

to_chemkin(self, species_list=None, kinetics=True)

Return the chemkin-formatted string for this reaction.

If kinetics is set to True, the chemkin format kinetics will also be returned (requires the species_list to figure out third body colliders.) Otherwise, only the reaction string will be returned.

to_labeled_str(self, use_index=False)

the same as __str__ except that the labels are assumed to exist and used for reactant and products rather than the labels plus the index in parentheses

transition_state

rmgpy.species.TransitionState

Type:

transition_state