Deleting one molecule template from another

User da8da0ed54

23-10-2012 08:43:53

I've been trying to use the MarvinBeans Java code to perform a simple operation on two molecules, where the smaller molecule is removed from the larger one, and the remaining fragments are output as a Molecule graph. (Basically, deleting the common parts of both, and showing the difference).

I currently do this by recording the bond indexes for the smaller molecule, and then performing running Molecule.removeBond for each on the larger molecule, cleaning up the remaining fragments by looking for any atom only connected to hydrogens. The problem I have is that sometimes the fragment left fits that bill and is cleaned away.

Does anyone know of a cleaner method for doing this that will prove more reliable?

ChemAxon d26931946c

25-10-2012 10:45:27

Hi James, 


If I understand you use the bond indexes of the smaller molecule to remove bonds from the bigger (target) molecule. I don't see why this should remove the same molecule part in both molecule as the order of bonds can be changed easily.


I think you should use MolSearch.


You can find sample codes that you can use in this topic


Best regards, 


Peter

User da8da0ed54

25-10-2012 10:54:49

Thanks, I'll take a look, but that seems to solve it.