Splitting structure for DB search

User 8bc8ccad88

12-05-2010 08:31:33

Hi, I have a little problem and hope you can help me out.


 


I want to divide a molecule into its disconnected components using the findFrags method and after that perform a substructure search on the DB for all the fragments in an iteration.


 


I wonder how I can use the result from findFrags as input for the substructure search. Can you give a little Java code snippet?


 


Thanks in advance,


Ingo

ChemAxon e500b51457

13-05-2010 10:23:11

Hello,
Please call the  convertToFrags() method to create your components:
    Molecule mol = ...;
    Molecule clonedMol = mol.cloneMolecule();
    Molecule frags[] = clonedMol.convertToFrags();
    for (int i = 0; i < frags.length; i++){
        //use frags;
    }
You can leave out the cloning step if you don't want to preserve the original molecule.

Best regards,
Erika.

User 8bc8ccad88

18-05-2010 11:43:04

Thanks Erika,


this is exactly what I was looking for.


 


Best wishes,


Ingo