Break mutiple bonds stepwise, keep the fragments from each

User 55ffa2f197

02-08-2013 14:27:04

Hi,


I need to break certain bounds in a macrocycle (m1), for each break (bond), i want to capture the small fragment generated from it, i did this :


for (MolBond b; bondList){


Molecule m2 = m1.cloneMolecule();


m2.removeBond(b)


}


however in cloned molecule m2, the bond b cannot be found after each break when i am checking on the fragment counts.


Following would break bonds stepwise, however the broken molecule is aggregated/accumlated into m2, i really want m2 only has two frags at each step, so i can tag the frag. I hope this is clear to you, i would appreciate if we can talk this over on the phone.


Thanks, Dong


for (MolBond b; bondList){


Molecule m2 = m1;


m2.removeBond(b)


}


 

ChemAxon 5433b8e56b

02-08-2013 15:43:06

Hi,


yes, you can not remove the original bond from the cloned molecule by its reference.


You should try to store the bond indicies instead of the refenece to the bond, and delete the bond based on its index from the cloned molecule with the help of removeBond(int) method.


I move this question to the Strucutre representation related forum, where my colleagues can follow up with you, if you have further questions on this problem.


Regards,
Istvan 

User 55ffa2f197

02-08-2013 16:04:42

Hi Istvan,


you are right, cannot remove by referece, as you have suggested, i did following, and it works great



Molecule m2 = molecule.cloneMolecule();


m2.removeBond(bondsIdx.get(bond))


Is there a method to get the bond hash index straight from molecule, now i do two steps; mol.getBondArray(), then from bond array to construct the bond index, so i can look up the bond number based on bond object. I could not find such function


Thanks


Dong



 

ChemAxon 5433b8e56b

02-08-2013 22:36:08

Hi,


there is an indexOf method that takes a MolBond object in the MoleculeGraph class for getting the index.


Regards,
Istvan 

User 55ffa2f197

05-08-2013 11:51:21

it is so obvious apparently i am looking at the wrong place before