uclchem.makerates.reaction#
Module Contents#
Classes#
Attributes#
- class uclchem.makerates.reaction.Reaction(inputRow, reaction_source=None)[source]#
- NANCheck(a)[source]#
Convert any Falsy statement to a NAN string
- Parameters:
a – thing to check for falsiness
- Returns:
input a if truthy, otherwise NAN
- Return type:
- changes_surface_count()[source]#
This checks whether a grain reaction changes number of particles on the surface 2 reactants to 2 products won’t but two reactants combining to one will.
- changes_total_mantle()[source]#
Check if the total grains on the mantle are changed by the reaction.
- check_temperature_collision(other) bool[source]#
Check if two reactions have overlapping temperature ranges, returning True means there is a collision.
- Parameters:
other – Another reaction
- Raises:
NotImplementedError – Currently we can only compare against instantiated Reaction objects.
- Returns:
Whether there is a collision (True), or not (False)
- Return type:
- convert_gas_to_surf() None[source]#
Convert the gas-phase species to surface species in place for this reaction. If any ions are produced, the ion is assumed to become neutral because it is on the surface. If any electrons are produced, they are assumed to be absorbed by the grain.
- convert_surf_to_bulk() None[source]#
Convert the surface species to bulk species in place for this reaction.
- get_alpha() float[source]#
Get the alpha parameter from the Kooij-Arrhenius equation
- Returns:
the alpha parameter of the reaction
- Return type:
- get_beta() float[source]#
Get the beta parameter from the Kooij-Arrhenius equation
- Returns:
the beta parameter of the reaction
- Return type:
- get_gamma() float[source]#
Get the gamma parameter from the Kooij-Arrhenius equation
- Returns:
the gamma parameter of the reaction
- Return type:
- get_products() list[str][source]#
Get the four products present in the reaction, padded with NAN for nonexistent
- get_pure_products() list[str][source]#
Get only the pure species that are products, no reaction types and NAN entries
- get_pure_reactants() list[str][source]#
Get only the pure species, no reaction types and NAN entries
- get_reactants() list[str][source]#
Get the four reactants present in the reaction, padded with NAN for nonexistent
- get_reaction_type() str[source]#
Get the type of a reaction from the reactants First check the third reactant for a reaction type, then the second. If there are none in there, it will be regarded as a two body reaction.
- Return type:
- get_reduced_mass() float[source]#
Get the reduced mass to be used to calculate tunneling rate in AMU
- Returns:
reduced mass of moving atoms
- Return type:
- get_sorted_products() list[str][source]#
Get the four products present in the reaction, sorted for fast comparisons
- get_sorted_reactants() list[str][source]#
Get the four reactants present in the reaction, sorted for fast comparisons
- get_source() str[source]#
Get the source of the reaction
- Returns:
The source of the reaction
- Return type:
- get_temphigh() float[source]#
Get the higher temperature boundary of the reaction in Kelvin
- Returns:
the higher temperature boundary
- Return type:
- get_templow() float[source]#
Get the lower temperature boundary of the reaction in Kelvin
- Returns:
the lower temperature boundary
- Return type:
- is_bulk_reaction(include_reactants=True, include_products=True, strict=False) bool[source]#
Check whether it is a bulk reaction, defaults to non-strict since many important bulk reactions interact with the surface.
By default it is NOT strict (strict=False); any species in the bulk returns true If strict=True; all species must be on the ice phase
- Parameters:
- Returns:
Is it a bulk reaction?
- Return type:
- is_gas_reaction(include_reactants=True, include_products=True, strict=True) bool[source]#
Check whether it is a gas reaction, by default it is strict - all reactions must be in the gas-phase - if strict=False; any reaction in the gas-phase returns true.
- Parameters:
- Returns:
Is it a gas phase reaction?
- Return type:
- is_ice_reaction(include_reactants=True, include_products=True, strict=True) bool[source]#
Check whether it is an ice (surface OR bulk) reaction
By default it is strict (strict=True); all species must be in the ice phase If strict=False; any species in ice phase returns True
- Parameters:
- Returns:
Is it an ice phase reaction?
- Return type:
- is_surface_reaction(include_reactants=True, include_products=True, strict=False) bool[source]#
Check whether it is a surface reaction, defaults to non-strict since many important surface reactions can lead to desorption in some way.
By default it is NOT strict (strict=False); any species on the surface returns true If strict=True; all species must be on the ice phase
- Parameters:
- Returns:
Is it a surface reaction?
- Return type:
- predict_reduced_mass() None[source]#
Predict the reduced mass of the tunneling particle in this reaction. This is used in the calculation of the tunneling rates.
- set_alpha(alpha: float) None[source]#
Set the alpha parameter from the Kooij-Arrhenius equation
- Parameters:
alpha (float) – the alpha parameter of the reaction
- set_beta(beta: float) None[source]#
Set the beta parameter from the Kooij-Arrhenius equation
- Parameters:
beta (float) – the beta parameter of the reaction
- set_gamma(gamma: float) None[source]#
Set the gamma parameter from the Kooij-Arrhenius equation
- Parameters:
gamma (float) – the gamma parameter of the reaction
- set_products(products: list[str]) None[source]#
Set the four products present in the reaction, padded with NAN for nonexistent
- set_reactants(reactants: list[str]) None[source]#
Set the four reactants present in the reaction, padded with NAN for nonexistent
- set_reduced_mass(reduced_mass: float) None[source]#
Set the reduced mass to be used to calculate tunneling rate in AMU
- Parameters:
reduced_mass (float) – reduced mass of moving atoms
- set_source(source: str) None[source]#
Set the source of the reaction
- Parameters:
source (str) – The source of the reaction
- set_temphigh(temphigh: float) None[source]#
Set the higher temperature boundary of the reaction in Kelvin
- Parameters:
templow (float) – the higher temperature boundary