KineticaKPM.jl API
KPM Runner
KineticaKPM.KPMRun
— Typekpm = KPMRun(model_path)
KPM runner for prediction of reaction activation energies.
Handles instantiation of the underlying Scikit-Learn model in Python, and can be called to use this model for predictions.
KPM Calculators
KineticaKPM.KPMBasicCalculator
— TypeBasic KPM kinetic calculator for reactions.
Kinetic calculator that uses KPM to predict activation energies for reactions and uses these predictions within the Arrhenius equation to calculate rate constants.
Basic calculator uses a flat RT/h
Arrhenius prefactor for all reactions. This is usually not accurate enough to enable sensible kinetic simulations.
Implemented conditions:
- Temperature (
T
, unit: K)
Requires:
- Reaction energies (
rd.dH
, unit: eV) - Trained KPM model (
kpm.model_path
, loaded whenKPMRun
is instantiated)
Has support for dispatching with/without a maximum rate constant k_max
and scaling by time unit t_unit
(assuming rates are provided in units of /s).
KineticaKPM.KPMCollisionCalculator
— TypeCollision theory-based KPM kinetic calculator for reactions.
Kinetic calculator that uses KPM to predict activation energies for reactions and uses these predictions within the Arrhenius equation to calculate rate constants.
Collision theory-based calculator approximates Arrhenius prefactors on a per-reaction basis with a hard sphere approximation of collision frequency. This is most accurate for small, spherical reactants, and becomes less realistic the further from this ideal the reactants get.
Additionally, allows for using one of a selection of steric factors for correcting discrepancies between collision theory prefactors and real Arrhenius prefactors.
Implemented conditions:
- Temperature (
T
, unit: K)
Requires:
- Reaction energies (
rd.dH
, unit: eV) - Trained KPM model (
kpm.model_path
, loaded whenKPMRun
is instantiated)
Has support for dispatching with/without a maximum rate constant k_max
and scaling by time unit t_unit
(assuming rates are provided in units of /s).
KineticaKPM.KPMCollisionEntropyCalculator
— TypeCollision theory-based KPM kinetic calculator for reactions, with translational entropy.
Kinetic calculator that uses KPM to predict activation energies for reactions and uses these predictions within the Arrhenius equation to calculate rate constants.
Collision theory-based calculator approximates Arrhenius prefactors on a per-reaction basis with a hard sphere approximation of collision frequency. This is most accurate for small, spherical reactants, and becomes less realistic the further from this ideal the reactants get.
Additionally, calculates translational entropy change for each reaction to correct for lack of entropic contribution in collision theory prefactors.
Implemented conditions:
- Temperature (
T
, unit: K)
Requires:
- Reaction energies (
rd.dH
, unit: eV) - Trained KPM model (
kpm.model_path
, loaded whenKPMRun
is instantiated)
Has support for dispatching with/without a maximum rate constant k_max
and scaling by time unit t_unit
(assuming rates are provided in units of /s).
Property Calculation
KineticaKPM.calc_collision_params
— Functionμ, σ = calc_collision_params(rd, sd[, easy_units])
Calculates the collision theory parameters for given reactions.
Collision theory requires calculation of a reduced mass μ and a collision cross-section σ for each pair of reactants in a reaction.
Calculates these values, using an 'average collision partner' for unimolecular reactions. Possible to get around this by implementing a non-reactive collision partner with unit concentration to all unimolecular reactions, effectively making them bimolecular for the purposes of these calculations.
Must be preceded by a call to get_frag_stats!()
to populate species weights and radii.
KineticaKPM.calc_steric_factors
— Functionρ = calc_steric_factors(rd, sd, steric_factor)
Calculates steric factors for all reactions in rd
, using the requested steric factor function.
Valid steric factors are
:basic
- Calculates steric factors as1/(α_A * α_B)
, whereα_i = n_i² + 5r_i(n_i - 1)
.:exp
- Calculates steric factors as1/(α_A * α_B)^β
, whereα_i = n_i² + 5r_i(n_i - 1)
. Requires passing a value of β viaparams
:logistic
- Calculates steric factors with an adjustable bivariate logistic distribution. Requires passing a value of β viaparams
:dlogistic
- Calculates steric factors with 2 adjustable bivariate logistic distributions. Requires passing a vector of [βassoc, βdissoc] viaparams
:none
- Makes all steric factors equal to 1, removing them from the rate equation.
ρ = calc_steric_factors(rd, sd, Val(:none))
Makes all steric factors equal to 1, removing them from the rate equation.
ρ = calc_steric_factors(rd, uniq_frags, Val(:basic))
Calculates steric factors as 1/(α_A * α_B)
, where α_i = n_i + 5r_i(n_i - 1)
.
ρ = calc_steric_factors(rd, uniq_frags, Val(:exp), β)
Calculates steric factors as 1/(α_A * α_B)^β
, where α_i = n_i² + 5r_i(n_i - 1)
.
ρ = calc_steric_factors(rd, uniq_frags, Val(:logistic), β)
Calculates steric factors on an adjustable bivariate logistic distribution.
The steric factor ρ for a reaction is calculated as
ρ = D / ((1+exp(βα_A))(1+exp(βα_B)))
where
D = (1+exp(β))^2,
α_i = n_i + 5r_i(n_i-1),
and A and B are the bimolecular reactants.
ρ = calc_steric_factors(rd, uniq_frags, Val(:dlogistic), β_assoc, β_dissoc)
Calculates steric factors on 2 adjustable bivariate logistic distributions.
Creates 2 logistic distributions: one for associative reactions, and the other for dissociative reactions. The gradient of each distribution can be tuned with its respective β parameter.
The steric factor ρ for an associative reaction is calculated as
ρ = D_assoc / ((1+exp(β_assoc*α_A))(1+exp(β_assoc*α_B)))
while the steric factor for a dissociative reaction is calculated as
ρ = D_dissoc / ((1+exp(β_dissoc*α_A))(1+exp(β_dissoc*α_B)))
where
D_assoc = (1+exp(β_assoc))^2,
D_dissoc = (1+exp(β_dissoc))^2,
α_i = n_i + 5r_i(n_i-1),
and A and B are the bimolecular reactants. Reactions which are neither associative nor dissociative use the associative steric factor by default.