emzed.chemistry.fit_formula module¶
- emzed.chemistry.fit_formula.formula_table(min_mass, max_mass, *, mass_c=None, mass_h=None, mass_n=None, mass_o=None, mass_p=None, mass_s=None, c_range=None, h_range=None, n_range=None, o_range=None, p_range=None, s_range=None, apply_rules=True, apply_rule_1=True, apply_rule_2=True, apply_rule_4=True, apply_rule_5=True, apply_rule_6=True, rule_45_range='extended')[source]¶
This is a Python version of HR2 formula generator for CHNOPS, see https://fiehnlab.ucdavis.edu/projects/seven-golden-rules
This function generates a table containing molecular formulas consisting of elements C, H, N, O, P and S having a mass in range [min_mass, max_mass]. For each element one can provide an given count or an inclusive range of atom counts considered in this process.
Putting some restrictions on atomcounts, eg C=(0, 100), can speed up the process tremendously.