uclchem.makerates.species#
Module Contents#
Classes#
Species is a class that holds all the information about an individual species in the |
Functions#
|
Try to convert input to a float, if it succeeds, return True. |
Attributes#
- class uclchem.makerates.species.Species(inputRow)[source]#
Species is a class that holds all the information about an individual species in the network. It also has convenience functions to check whether the species is a gas or grain species and to help compare between species.
A class representing chemical species, it reads in rows which are formatted as follows: NAME,MASS,BINDING ENERGY,SOLID FRACTION,MONO FRACTION,VOLCANO FRACTION,ENTHALPY :param inputRow: :type inputRow: list
- add_default_freeze() None[source]#
Adds a defalt freezeout, which is freezing out to the species itself, but with no ionization.
- find_constituents(quiet=False)[source]#
Loop through the species’ name and work out what its consituent atoms are. Then calculate mass and alert user if it doesn’t match input mass.
- get_charge() int[source]#
Get the charge of the chemical species in e. Positive integer indicates positive ion, negative indicates negative ion. Assumes species are at most charged +1 or -1.
- Returns:
The charge of the species
- Return type:
- get_freeze_alpha(product_list: list[str]) float[source]#
Obtain the freeze out ratio of a species for a certain reaction
- get_freeze_products() dict[list[str], float][source]#
Obtain the product to which the species freeze out
- get_freeze_products_list() list[list[str]][source]#
Returns all the freeze products without their ratios
- get_mass() int[source]#
Get the molecular mass of the chemical species
- Returns:
The molecular mass
- Return type:
- get_n_atoms() int[source]#
Obtain the number of atoms in the molecule
- Returns:
The number of atoms
- Return type:
- is_bulk_species() bool[source]#
Checks if the species is in the bulk
- Returns:
True if a bulk species
- Return type:
- is_grain_species() bool[source]#
Return whether the species is a species on the grain
- Returns:
True if it is a grain species.
- Return type:
- is_ice_species() bool[source]#
Return whether the species is a species on the grain
- Returns:
True if it is an ice species.
- Return type:
- is_ion() bool[source]#
Checks if the species is ionized, either postively or negatively.
- Returns:
True if it is an ionized
- Return type:
- is_surface_species() bool[source]#
Checks if the species is on the surface
- Returns:
True if a surface species
- Return type:
- set_desorb_products(new_desorbs: list[str]) None[source]#
Set the desorption products for species on the surface or in the bulk. It is assumed that there is only one desorption pathway.
- set_freeze_products(product_list: list[str], freeze_alpha: float) None[source]#
Add the freeze products of the species, one species can have several freeze products.
- Parameters:
It is called alpha, since it is derived from the alpha column in the UCLCHEM reaction format: uclchem/UCLCHEM
- uclchem.makerates.species.is_number(s) bool[source]#
Try to convert input to a float, if it succeeds, return True.
- Parameters:
s – Input element to check for
- Returns:
True if a number, False if not.
- Return type:
- uclchem.makerates.species.elementList = ['H', 'D', 'HE', 'C', 'N', 'O', 'F', 'P', 'S', 'CL', 'LI', 'NA', 'MG', 'SI', 'PAH', '15N',...[source]#