S 1 and S 2 denote two reactants, and P denotes the product, which is assumed to be a singleton as byproducts are ignored here. In this study, we considered only synthetic reactions with two reactants, but the proposed method can be generalized to handle any number of reactants. In addition, solvents and reagents can also be incorporated on demand. Consider that the single-step reaction is modeled by a function r as