rxn.metrics.utils.combine_precursors_and_products

rxn.metrics.utils.combine_precursors_and_products(precursors, products, total_precursors, total_products)[source]

Combine two matching iterables of precursors/products into an iterator of reaction SMILES.

Parameters
  • precursors (Iterator[str]) – iterable of sets of precursors.

  • products (Iterator[str]) – iterable of sets of products.

  • total_precursors (int) – total number of precursors.

  • total_products (int) – total number of products.

Return type

Iterator[str]

Returns

iterator over reaction SMILES.