rxn.chemutils.reaction_equation.apply_to_compound_groups
- rxn.chemutils.reaction_equation.apply_to_compound_groups(reaction, fn)[source]
Apply a function to the groups of compounds in a ReactionEquation.
- Parameters
reaction (
ReactionEquation
) – reaction equation to apply the function to.fn (
Callable
[[List
[str
]],List
[str
]]) – function to apply.
- Return type
- Returns
New ReactionEquation instance after application of the function to the compound groups.