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 |
addPathReaction
(newReaction)¶Add a path reaction to the network. If the path reaction already exists, no action is taken.
applyChemicallySignificantEigenvaluesMethod
(lumpingOrder=None)¶Compute the phenomenological rate coefficients \(k(T,P)\) at the current conditions using the chemically-significant eigenvalues method. If a lumpingOrder 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.
applyModifiedStrongCollisionMethod
(efficiencyModel='default')¶Compute the phenomenological rate coefficients \(k(T,P)\) at the current conditions using the modified strong collision method.
applyReservoirStateMethod
()¶Compute the phenomenological rate coefficients \(k(T,P)\) at the current conditions using the reservoir state method.
calculateCollisionModel
()¶Calculate the matrix of first-order rate coefficients for collisional population transfer between grains for each isomer, including the corresponding collision frequencies.
calculateDensitiesOfStates
()¶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.
calculateEquilibriumRatios
()¶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.
calculateMicrocanonicalRates
()¶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.
exploreIsomer
(isomer)¶Explore a previously-unexplored unimolecular isomer in this partial network using the provided core-edge reaction model reactionModel, returning the new reactions and new species.
getAllSpecies
()¶Return a list of all unique species in the network, including all isomers, reactant and product channels, and bath gas species.
getLeakBranchingRatios
(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.
getLeakCoefficient
(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.
getMaximumLeakSpecies
(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.
initialize
(Tmin, Tmax, Pmin, Pmax, maximumGrainSize=0.0, minimumGrainCount=0, activeJRotor=True, activeKRotor=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 grainSize in J/mol and/or the minimum number of grains grainCount.
invalidate
()¶Mark the network as in need of a new calculation to determine the pressure-dependent rate coefficients
label
¶Get the label for this network (analogous to reaction families as a reaction’s source)
mapDensitiesOfStates
()¶Map the overall densities of states to the current energy grains. Semi-logarithmic interpolation will be used if the grain sizes of Elist0 and Elist 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.
printSummary
(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.
selectEnergyGrains
(T, grainSize=0.0, grainCount=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 grainSize in J/mol or the desired number of grains Ngrains, as well as a temperature T in K to use for the equilibrium calculation. You can specify both grainSize and grainCount, 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.
setConditions
(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.
solveFullME
(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 Elist 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 densStates in mol/J of each isomer. Returns the times in s, population distributions for each isomer, and total population profiles for each configuration.
solveReducedME
(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.
update
(reactionModel, pdepSettings)¶Regenerate the \(k(T,P)\) values for this partial network if the network is marked as invalid.
updateConfigurations
(reactionModel)¶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 reactionModel because some decisions on sorting are made based on which species are in the model core.