rmgpy.rmg.pdep.PDepNetwork

class rmgpy.rmg.pdep.PDepNetwork(index=- 1, source=None)

A representation of a partial unimolecular reaction network. Each partial network has a single source isomer or reactant channel, and is responsible only for \(k(T,P)\) values for net reactions with source as the reactant. Multiple partial networks can have the same source, but networks with the same source and any explored isomers must be combined.

Attribute

Type

Description

source

list

The isomer or reactant channel that acts as the source

explored

list

A list of the unimolecular isomers whose reactions have been fully explored

add_path_reaction(newReaction)

Add a path reaction to the network. If the path reaction already exists, no action is taken.

apply_chemically_significant_eigenvalues_method(lumping_order=None, method='allen', neglect_high_energy_collisions=False, high_energy_rate_tol=0.01)

Compute the phenomenological rate coefficients \(k(T,P)\) at the current conditions using the chemically-significant eigenvalues method. If a lumping_order is provided, the algorithm will attempt to lump the configurations (given by index) in the order provided, and return a reduced set of \(k(T,P)\) values.

apply_modified_strong_collision_method(efficiency_model='default')

Compute the phenomenological rate coefficients \(k(T,P)\) at the current conditions using the modified strong collision method.

apply_reservoir_state_method()

Compute the phenomenological rate coefficients \(k(T,P)\) at the current conditions using the reservoir state method.

calculate_collision_model()

Calculate the matrix of first-order rate coefficients for collisional population transfer between grains for each isomer, including the corresponding collision frequencies.

calculate_densities_of_states()

Calculate the densities of states of each configuration that has states data. The densities of states are computed such that they can be applied to each temperature in the range of interest by interpolation.

calculate_equilibrium_ratios()

Return an array containing the fraction of each isomer and reactant channel present at equilibrium, as determined from the Gibbs free energy and using the concentration equilibrium constant \(K_\mathrm{c}\). These values are ratios, and the absolute magnitude is not guaranteed; however, the implementation scales the elements of the array so that they sum to unity.

calculate_microcanonical_rates()

Calculate and return arrays containing the microcanonical rate coefficients \(k(E)\) for the isomerization, dissociation, and association path reactions in the network.

cleanup()

Delete intermedate arrays used to compute k(T,P) values.

explore_isomer(isomer)

Explore a previously-unexplored unimolecular isomer in this partial network using the provided core-edge reaction model reaction_model, returning the new reactions and new species.

get_all_species()

Return a list of all unique species in the network, including all isomers, reactant and product channels, and bath gas species.

get_energy_filtered_reactions(T, tol)

Returns a list of products and isomers that are greater in Free Energy than a*R*T + Gfsource(T)

get_leak_branching_ratios(T, P)

Return a dict with the unexplored isomers in the partial network as the keys and the fraction of the total leak coefficient as the values.

get_leak_coefficient(T, P)

Return the pressure-dependent rate coefficient \(k(T,P)\) describing the total rate of “leak” from this network. This is defined as the sum of the \(k(T,P)\) values for all net reactions to nonexplored unimolecular isomers.

get_maximum_leak_species(T, P)

Get the unexplored (unimolecular) isomer with the maximum leak flux. Note that the leak rate coefficients vary with temperature and pressure, so you must provide these in order to get a meaningful result.

get_rate_filtered_products(T, P, tol)

determines the set of path_reactions that have fluxes less than tol at steady state where all A => B + C reactions are irreversible and there is a constant flux from/to the source configuration of 1.0

initialize(Tmin, Tmax, Pmin, Pmax, maximum_grain_size=0.0, minimum_grain_count=0, active_j_rotor=True, active_k_rotor=True, rmgmode=False)

Initialize a pressure dependence calculation by computing several quantities that are independent of the conditions. You must specify the temperature and pressure ranges of interesting using Tmin and Tmax in K and Pmin and Pmax in Pa. You must also specify the maximum energy grain size grain_size in J/mol and/or the minimum number of grains grain_count.

invalidate()

Mark the network as in need of a new calculation to determine the pressure-dependent rate coefficients

log_summary(level=20)

Print a formatted list of information about the current network. Each molecular configuration - unimolecular isomers, bimolecular reactant channels, and bimolecular product channels - is given along with its energy on the potential energy surface. The path reactions connecting adjacent molecular configurations are also given, along with their energies on the potential energy surface. The level parameter controls the level of logging to which the summary is written, and is DEBUG by default.

map_densities_of_states()

Map the overall densities of states to the current energy grains. Semi-logarithmic interpolation will be used if the grain sizes of Elist0 and e_list do not match; this should not be a significant source of error as long as the grain sizes are sufficiently small.

merge(other)

Merge the partial network other into this network.

remove_disconnected_reactions()

gets rid of reactions/isomers/products not connected to the source by a reaction sequence

remove_reactions(reaction_model, networks, rxns=None, prods=None)

removes a list of reactions from the network and all reactions/products left disconnected by removing those reactions

select_energy_grains(T, grain_size=0.0, grain_count=0)

Select a suitable list of energies to use for subsequent calculations. This is done by finding the minimum and maximum energies on the potential energy surface, then adding a multiple of \(k_\mathrm{B} T\) onto the maximum energy.

You must specify either the desired grain spacing grain_size in J/mol or the desired number of grains n_grains, as well as a temperature T in K to use for the equilibrium calculation. You can specify both grain_size and grain_count, in which case the one that gives the more accurate result will be used (i.e. they represent a maximum grain size and a minimum number of grains). An array containing the energy grains in J/mol is returned.

set_conditions(T, P, ymB=None)

Set the current network conditions to the temperature T in K and pressure P in Pa. All of the internal variables are updated accordingly if they are out of date. For example, those variables that depend only on temperature will not be recomputed if the temperature is the same.

solve_full_me(tlist, x0)

Directly solve the full master equation using a stiff ODE solver. Pass the reaction network to solve, the temperature T in K and pressure P in Pa to solve at, the energies e_list in J/mol to use, the output time points tlist in s, the initial total populations x0, the full master equation matrix M, the accounting matrix indices relating isomer and energy grain indices to indices of the master equation matrix, and the densities of states dens_states in mol/J of each isomer. Returns the times in s, population distributions for each isomer, and total population profiles for each configuration.

solve_reduced_me(tlist, x0)

Directly solve the reduced master equation using a stiff ODE solver. Pass the output time points tlist in s and the initial total populations x0. Be sure to run one of the methods for generating \(k(T,P)\) values before calling this method. Returns the times in s, population distributions for each isomer, and total population profiles for each configuration.

solve_ss_network(T, P)

calculates the steady state concentrations if all A => B + C reactions are irreversible and the flux from/to the source configuration is 1.0

update(reaction_model, pdep_settings)

Regenerate the \(k(T,P)\) values for this partial network if the network is marked as invalid.

update_configurations(reaction_model)

Sort the reactants and products of each of the network’s path reactions into isomers, reactant channels, and product channels. You must pass the current reaction_model because some decisions on sorting are made based on which species are in the model core.