public static IReaction getReactionByAtomContainerID ( IReactionSet reactionSet , String id ) { for ( IReaction reaction : reactionSet . reactions ( ) ) { if ( AtomContainerSetManipulator . containsByID ( reaction . getProducts ( ) , id ) ) return reaction ; } for ( IReaction reaction : reactionSet . reactions ( ) ) { if ( AtomContainerSetManipulator . containsByID ( reaction . getReactants ( ) , id ) ) return reaction ; } return null ; }
Gets a reaction from a ReactionSet by ID of any product or reactant . If several exist only the first one will be returned .