Locate framents by id in a fragmented molecule

User 55ffa2f197

06-03-2015 15:41:01

Hi,


Not sure if i picked the right forum to post this question. If not please forward to the right place.


I strategically cut the molecule into multiple fragments and track the bond and atoms where i made the cut, i.e. indexing the cuts/fragments by atom. Now after the cuts i am trying to locate the particular fragment by the atom involved the cuts. i went through a couple of API functions and i could not find one that suit my needs. The most close one is molecule.convertToFrags(), but after that the original atom I used to make the cut cannot longer be used in the child  molecules (fragments) for searching purpose. I hope i described my question clearly, can you give me some advice as to how to go about this. I am using java API to do this.


Thanks


Dong 

User 55ffa2f197

06-03-2015 16:39:09

OK, after reading the API doc look like following would do what i want:



SelectionMolecule[] mols=molecule.findFrags()




 for(SelectionMolecule mol:mols){


mol.indexOf(atom);


}




 


atom is my bookmark atom


Dong


ChemAxon a202a732bf

09-03-2015 13:02:49

Hi Dong,


yes, you are right, the fragment for which mol.indexOf(atom) >= 0 will contain the thought atom. Or you can use contains(atom) alternatively.


Regards,


Zsuzsa