rmgpy.quantity.ArrayQuantity¶
- class rmgpy.quantity.ArrayQuantity¶
The
ArrayQuantity
class provides a representation of an array of physical quantity values, with optional units and uncertainty information. The attributes are:Attribute
Description
value
The numeric value of the quantity in the given units
units
The units the value was specified in
uncertainty
The numeric uncertainty in the value (unitless if multiplicative)
uncertainty_type
The type of uncertainty:
'+|-'
for additive,'*|/'
for multiplicativevalue_si
The numeric value of the quantity in the corresponding SI units
uncertainty_si
The numeric value of the uncertainty in the corresponding SI units (unitless if multiplicative)
It is often more convenient to perform computations using SI units instead of the given units of the quantity. For this reason, the SI equivalent of the value attribute can be directly accessed using the value_si attribute. This value is cached on the
ArrayQuantity
object for speed.- as_dict()¶
A helper function for YAML dumping
- copy()¶
Return a copy of the quantity.
- equals(quantity)¶
Return
True
if the everything in a quantity object matches the parameters in this object. If there are lists of values or uncertainties, each item in the list must be matching and in the same order. Otherwise, returnFalse
(Originally intended to return warning if units capitalization was different, however, Quantity object only parses units matching in case, so this will not be a problem.)
- get_conversion_factor_from_si()¶
Return the conversion factor for converting a quantity to a given set of units from the SI equivalent units.
- get_conversion_factor_from_si_to_cm_mol_s()¶
Return the conversion factor for converting into SI units only with all lengths in cm, instead of m. This is useful for outputting chemkin file kinetics. Depending on the stoichiometry of the reaction the reaction rate coefficient could be /s, cm^3/mol/s, cm^6/mol^2/s, and for heterogeneous reactions even more possibilities. Only lengths are changed. Everything else is in SI, i.e. moles (not molecules) and seconds (not minutes).
- get_conversion_factor_to_si()¶
Return the conversion factor for converting a quantity in a given set of`units` to the SI equivalent units.
- is_uncertainty_additive()¶
Return
True
if the uncertainty is specified in additive format andFalse
otherwise.
- is_uncertainty_multiplicative()¶
Return
True
if the uncertainty is specified in multiplicative format andFalse
otherwise.
- make_object(data, class_dict)¶
A helper function for constructing objects from a dictionary (used when loading YAML files)
- Parameters:
data (dict) – The dictionary representation of the object
class_dict (dict) – A mapping of class names to the classes themselves
- Returns:
None
- uncertainty¶
The numeric value of the uncertainty, in the given units if additive, or no units if multiplicative.
- uncertainty_type¶
'+|-'
for additive,'*|/'
for multiplicative- Type:
The type of uncertainty
- value¶
The numeric value of the array quantity, in the given units.