rmgpy.rmg.pdep.PDepReaction¶
- class rmgpy.rmg.pdep.PDepReaction(index=-1, label='', reactants=None, products=None, specific_collider=None, network=None, kinetics=None, network_kinetics=None, reversible=True, transition_state=None, duplicate=False, degeneracy=1, pairs=None)¶
- apply_solvent_correction(solvent)¶
apply kinetic solvent correction
- calculate_coll_limit(temp, reverse)¶
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(e_list, j_list, reac_dens_states, prod_dens_states, T)¶
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(T)¶
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.
- can_tst()¶
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, orFalse
otherwise.
- check_collision_limit_violation(t_min, t_max, p_min, p_max)¶
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.
- copy()¶
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(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.
- ensure_species(reactant_resonance, product_resonance, save_order)¶
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
isTrue
the atom order is reset after performing atom isomorphism.
- fix_barrier_height(force_positive, solvent, apply_solvation_correction)¶
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(T)¶
Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the specified temperature.
- generate_3d_ts(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()¶
Used for incorporating library reactions with pressure-dependent kinetics in PDep networks. Only implemented for LibraryReaction
- generate_pairs()¶
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(network_kinetics, Tmin, Tmax, surface_site_density)¶
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(Tlist)¶
Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.
- get_enthalpy_of_reaction(T)¶
Return the enthalpy of reaction in J/mol evaluated at temperature T in K.
- get_entropies_of_reaction(Tlist)¶
Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.
- get_entropy_of_reaction(T)¶
Return the entropy of reaction in J/mol*K evaluated at temperature T in K.
- get_equilibrium_constant(T, potential, type, surface_site_density)¶
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), orKp
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. For protons (H+), a reference concentration of 1000 mol/m^3 (1 mol/L) is assumed
- get_equilibrium_constants(Tlist, potential, type)¶
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), orKp
for pressures. Note that this function currently assumes an ideal gas mixture.
- get_free_energies_of_reaction(Tlist, potential)¶
Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.
- get_free_energy_of_reaction(T, potential)¶
Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K and potential in Volts (if applicable)
- get_mean_sigma_and_epsilon(reverse)¶
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(T, P, surface_site_density, potential)¶
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(reverse)¶
Returns the reduced mass of the reactants if reverse is
False
Returns the reduced mass of the products if reverse isTrue
- get_reversible_potential(T)¶
Get the Potential in V at T in ‘K’ at which the charge transfer reaction is at equilibrium
- get_source()¶
Get the source of this PDepReaction
- get_stoichiometric_coefficient(spec)¶
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(T, surface_site_density, potential)¶
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()¶
Get a URL to search for this reaction in the rmg website.
- has_template(reactants, products)¶
Return
True
if the reaction matches the template of reactants and products, which are both lists ofSpecies
objects, orFalse
if not.
- is_association()¶
Return
True
if the reaction represents an association reaction \(\ce{A + B <=> C}\) orFalse
if not.
- is_balanced()¶
Return
True
if the reaction has the same number of each atom on each side of the reaction equation, orFalse
if not.
- is_charge_transfer_reaction()¶
Return
True
if one or more reactants or products are electrons
- is_dissociation()¶
Return
True
if the reaction represents a dissociation reaction \(\ce{A <=> B + C}\) orFalse
if not.
- is_isomerization()¶
Return
True
if the reaction represents an isomerization reaction \(\ce{A <=> B}\) orFalse
if not.
- is_isomorphic(other, either_direction, check_identical, check_only_label, check_template_rxn_products, generate_initial_map, strict, save_order)¶
Return
True
if this reaction is the same as the other reaction, orFalse
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 comparisonscheck_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 labelsstrict (bool, optional) – if
False
, perform isomorphism ignoring electronssave_order (bool, optional) – if
True
, perform isomorphism saving atom order
- is_surface_charge_transfer_reaction()¶
Return
True
if one or more reactants or products are electrons
- is_surface_reaction()¶
Return
True
if one or more reactants or products are surface species (or surface sites)
- is_unimolecular()¶
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}\), orFalse
if not.
- matches_species(reactants, products)¶
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
- protons¶
The stochiometric coeff for protons in charge transfer reactions
- reverse_arrhenius_charge_transfer_rate(k_forward, reverse_units, Tmin, Tmax)¶
Reverses the given k_forward, which must be a SurfaceChargeTransfer type. You must supply the correct units for the reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
- reverse_arrhenius_rate(k_forward, reverse_units, Tmin, Tmax)¶
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(k_forward, reverse_units, surface_site_density, Tmin, Tmax)¶
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(k_forward, reverse_units, Tmin, Tmax)¶
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).
- reverse_surface_charge_transfer_rate(k_forward, reverse_units, Tmin, Tmax)¶
Reverses the given k_forward, which must be a SurfaceChargeTransfer type. You must supply the correct units for the reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
- set_reference_potential(T)¶
Set the reference Potential of the SurfaceChargeTransfer kinetics model to the reversible potential of the reaction
- to_cantera(species_list, use_chemkin_identifier)¶
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(species_list, kinetics)¶
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(use_index)¶
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