Parsing

dct_from_str

qsdsan.utils.dct_from_str(dct_str, sep=',', dtype='float')

Use to parse str into a dict, the str should be written in k1=v1, k2=v2, …, kn=vn (separated by comma or other symbols defined by sep).

get_stoichiometric_coeff

qsdsan.utils.get_stoichiometric_coeff(reaction, ref_component, components, conserved_for, parameters)

Parse input reaction to get array of symbolic expressions (or a function to return numpy array with parameters as kwargs) or numpy array of input values for stoichiometric coefficients.

parse_unit

qsdsan.utils.parse_unit(value)

Parse user’ input units to those that can be recognized by pint.