Skip to main content
Fig. 9 | Journal of Cheminformatics

Fig. 9

From: ReactionCode: format for reaction searching, analysis, classification, transform, and encoding/decoding

Fig. 9

Reaction balancing and product correction: The function encodeAndRebalance attempts to correct the missing products in the original reaction by deducing missing to-be-generated bonds. The encode function generates a non-final ReactionCode, which is still able to reproduce the original unbalanced reaction. If the parameter correctProducts is set to true for the decoding, the products related to the missing atom in the given reaction are corrected. Reactiona depicts a fully unbalanced reaction. As there is no reference in the products, the correction algorithm returns the same decoded reaction using the non-final or final ReactionCode. Reaction b depicts a partially balanced reaction ((i.e.unbalanced reaction with more than one products)), where one atom involved in a broken bond is present. The function encodeAndRebalance returns a different reaction because it flags the atoms in products, which do not need to be corrected ([Cl:3]). While decoding the non-final ReactionCode, this information is missing and as the Cl atom is not connected to any atom in the remaining layers or leaving layer, it is considered by our algorithm as leaving and is associated with the other leaving group

Back to article page