rxn.chemutils.reaction_equation.apply_to_compounds

rxn.chemutils.reaction_equation.apply_to_compounds(reaction, fn)[source]

Apply a function to the individual compounds in a ReactionEquation.

Parameters
  • reaction (ReactionEquation) – reaction equation to apply the function to.

  • fn (Callable[[str], str]) – function to apply.

Return type

ReactionEquation

Returns

New ReactionEquation instance after application of the function to the compounds.