Get reaction file from a molecule

User d68ef9d5a9

09-09-2011 14:12:17

Hi,


I need to create a reaction file with partial reaction with only the reaction arrow and one produc ( the reactant needs to be missing). Please let me know how I can generate the reaction file programmatically?


I see Reaction class is all deprecated. And I am not sure where to start a reaction-like class and get reaction rxn file programmatically.


Ben  


 


 

User d68ef9d5a9

12-09-2011 19:45:57

Hello:


Can anybody help, please?


Ben

ChemAxon d76e6e95eb

12-09-2011 19:52:02

The Reaction class was used for virtual synthesis. The RxnMolecule class is what you need.

ChemAxon 25dcd765a3

13-09-2011 10:37:17

Hi,


// create a new reaction molecule
RxnMolecule rxn = new RxnMolecule();
// read a product molecule from string
Molecule product = MolImporter.importMol("CCC");
// add the product to the reaction
rxn.addComponent(product, RxnMolecule.PRODUCTS);

// optionally write the result to mrv format
    System.out.println(rxn.toFormat("mrv"));

Sorry for the late reply.