Get Products/Reactants of Reaction

User d6c1b7eb8c

12-08-2009 15:36:22

Hi, sorry if this is a silly question:

I'm looking to simply output just the products (or reactants) of a reaction, as opposed to the whole 'reaction molecule' produced by reactor.react(). I have found that under the Reaction class there is a 'getReactants' method call, however this only returns the reactants defined in the reaction itself, as opposed to the result of a Reactor().

At the moment the only way I can see to do this is to:


products = reactor.react()


resultStrings = result.toFormat("smiles")

then split the resultStrings ("reactants>>products") into their components manually,

is this the best way to do it?


Thank you very much,
Ben

ChemAxon e08c317633

12-08-2009 15:50:33

Hi,


reactor.react() generates and returns products by default (in a molecule array). react() returns reactions only if the Reactor.setResultType(int) method is set with REACTION_OUTPUT parameter.


Zsolt