Reactor API question

User b7aa615db3

25-04-2005 03:17:12

I get two products when I run this:


react -r bt0005_new.mrv "[O-]C(=O)c1ccccc1C([O-])=O"





However, when I run it via the API (RxnTest.java) I only get one product:


java RxnTest bt0005_new.mrv "[O-]C(=O)c1ccccc1C([O-])=O"





Can you explain this to me?

ChemAxon d76e6e95eb

25-04-2005 16:42:09

Although, the number of products depend on the parameters how you call reactor, you should get three products by default! Please see the attached image.





I remapped your reaction scheme (all atoms having changing bonds must be mapped), and the command line utility worked well! (also attached the modified reaction scheme).





You have only one product in your scheme (A -> B), Reactor is prepared to handle reactions with multiple products (A + B -> C+ D).


One react() method call of the Reactor class generates one product set only. To get all isomer variations, you have to call the react() method of the Reactor class in a loop until the resulting array is null.





Code:
 Molecule[] products = null;


 while ((products = reactor.react()) != null) {


 // do something with the products


 }






(The default behaviour of the react command line tool is to generate all isomers, but you can change it with the -p 1 parameter to generate the first product set only.)