uclchem.makerates.species#

Module Contents#

Classes#

Species

Species is a class that holds all the information about an individual species in the

Functions#

is_number(→ bool)

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:

int

get_desorb_products() list[str][source]#

Obtain the desorbtion products of ice species

Returns:

The desorption products

Return type:

list[str]

get_freeze_alpha(product_list: list[str]) float[source]#

Obtain the freeze out ratio of a species for a certain reaction

Parameters:

product_list (list[str]) – For a specific reaction, get the freezeout ratio

Returns:

The freezeout ratio

Return type:

float

get_freeze_products() dict[list[str], float][source]#

Obtain the product to which the species freeze out

Returns:

Reactions and their respective freeze out ratios.

Return type:

dict[str, float]

Yields:

Iterator[dict[str, float]] – Iterator that returns all of the freeze out reactions with ratios

get_freeze_products_list() list[list[str]][source]#

Returns all the freeze products without their ratios

Returns:

List of freeze products

Return type:

list[list[str]]

get_mass() int[source]#

Get the molecular mass of the chemical species

Returns:

The molecular mass

Return type:

int

get_n_atoms() int[source]#

Obtain the number of atoms in the molecule

Returns:

The number of atoms

Return type:

int

get_name() str[source]#

Get the name of the chemical species.

Returns:

The name

Return type:

str

is_bulk_species() bool[source]#

Checks if the species is in the bulk

Returns:

True if a bulk species

Return type:

bool

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:

bool

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:

bool

is_ion() bool[source]#

Checks if the species is ionized, either postively or negatively.

Returns:

True if it is an ionized

Return type:

bool

is_surface_species() bool[source]#

Checks if the species is on the surface

Returns:

True if a surface species

Return type:

bool

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.

Parameters:

new_desorbs (list[str]) – The new desorption products

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:
  • product_list (list[str]) – The list of freeze out products

  • freeze_alpha (float) – The freeze out ratio.

It is called alpha, since it is derived from the alpha column in the UCLCHEM reaction format: uclchem/UCLCHEM

set_n_atoms(new_n_atoms: int) None[source]#

Set the number of atoms

Parameters:

new_n_atoms (int) – The new number of atoms

to_UCL_format() str[source]#
enthalpy[source]#
is_refractory = False[source]#
mass[source]#
monoFraction[source]#
n_atoms = 0[source]#
name[source]#
solidFraction[source]#
volcFraction[source]#
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:

bool

uclchem.makerates.species.elementList = ['H', 'D', 'HE', 'C', 'N', 'O', 'F', 'P', 'S', 'CL', 'LI', 'NA', 'MG', 'SI', 'PAH', '15N',...[source]#
uclchem.makerates.species.elementMass = [1, 2, 4, 12, 14, 16, 19, 31, 32, 35, 3, 23, 24, 28, 420, 15, 13, 18, 0, 56][source]#
uclchem.makerates.species.symbols = ['#', '@', '*', '+', '-', '(', ')'][source]#