public static IReactionSet getRelevantReactionsAsReactant ( IReactionSet reactSet , IAtomContainer molecule ) { IReactionSet newReactSet = reactSet . getBuilder ( ) . newInstance ( IReactionSet . class ) ; for ( IReaction reaction : reactSet . reactions ( ) ) { for ( IAtomContainer atomContainer : reaction . getReactants ( ) . atomContainers ( ) ) if ( atomContainer . equals ( molecule ) ) newReactSet . addReaction ( reaction ) ; } return newReactSet ; }
Get all Reactions object containing a Molecule as a Reactant from a set of Reactions .