# rmgpy.pdep.Network¶

class rmgpy.pdep.Network(label='', isomers=None, reactants=None, products=None, path_reactions=None, bath_gas=None, net_reactions=None, T=0.0, P=0.0, e_list=None, j_list=None, n_grains=0, n_j=0, active_k_rotor=True, active_j_rotor=True, grain_size=0.0, grain_count=0, E0=None, Emax=None, Emin=None)

A representation of a unimolecular reaction network. The attributes are:

Attribute

Description

isomers

A list of the unimolecular isomers (Configuration objects) in the network

reactants

A list of the bimolecular reactant channels (Configuration objects) in the network

products

A list of the bimolecular product channels (Configuration objects) in the network

path_reactions

A list of Reaction objects that connect isomers to their unimolecular and bimolecular products (the high-pressure-limit)

bath_gas

A dictionary of the bath gas species (keys) and their mole fractions (values)

net_reactions

A list of Reaction objects that connect any pair of isomers (pressure dependent reactions)

T

The current temperature in K

P

The current pressure in Pa

e_list

The current array of energy grains in J/mol

j_list

The current array of total angular momentum quantum numbers

n_isom

The number of unimolecular isomers in the network

n_reac

The number of bimolecular reactant channels in the network

n_prod

The number of bimolecular product channels in the network

n_grains

The number of energy grains

n_j

The number of angular momentum grains

grain_size

Maximum size of separation between energies

grain_count

Minimum number of descrete energies separated

E0

A list of ground state energies of isomers, reactants, and products (J/mol)

Emax

Highest energy level considered in graining before padding

Emin

Minimum energy levell considered in graining

active_k_rotor

True if the K-rotor is treated as active, False if treated as adiabatic

active_j_rotor

True if the J-rotor is treated as active, False if treated as adiabatic

rmgmode

True if in RMG mode, False otherwise

eq_ratios

An array containing concentration of each isomer and reactant channel present at equilibrium

coll_freq

An array of the frequency of collision between isomers and the bath gas

Mcoll

Matrix of first-order rate coefficients for collisional population transfer between grains for each isomer

dens_states

3D np array of stable configurations, number of grains, and number of J

Kij

The microcanonical rates to go from isomer $j$ to isomer $i$. 4D array with indexes: i, j, energies, rotational energies

Gnj

The microcanonical rates to go from isomer $j$ to reactant/product $n$. 4D array with indexes: n, j, energies, rotational energies

Fim

The microcanonical rates to go from reactant $m$ to isomer $i$. 4D array with indexes: n, j, energies, rotational energies

K

2D Array of phenomenological rates at the specified T and P

p0

U

2D Array of estimated uncorrelated uncertainties in K matrix

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.

get_all_species()

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

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.

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.