Hi, This can be done with an isomorphism checker, for example the UniversalIsomorphismTester. But, in general, if you have a method like:
isIsomorphic(IAtomContainer a, IAtomContainer b) then a way to do this is: public void makeUnique(ArrayList<IAtomContainer> all) { ArrayList<IAtomContainer> unique = new ArrayList<IAtomContainer>(); for (IAtomContainer a : all) { if (isUnique(a, unique)) unique.add(a): } } where the isUnique() method would be something like: public boolean isUnique(IAtomContainer a, ArrayList<IAtomContainer> l) { for (IAtomContainer b : l) { if (isIsomorphic(a, b)) return false; } return true; } and, as I say isIsomorphic is probably just calls UniversalIsomorphismTester.isIsomorphic(a, b) - for simple applications, it is convenient to put the try{...} catch {...} block in this part, and just ignore problems. gilleain On Thu, Jul 2, 2009 at 1:29 PM, suyog<suyog....@gmail.com> wrote: > > > hi... all > I have one .sdf file with thousands of molecule in it... > I want to identify duplicate molecules(having similar structure) from .sdf > file using CDK... > > How do I do this???? > Which classes should i use?? > Or if you have any sample code please paste link.... > > Any suggestion/ clue is appreciated.... > > > Thanks & Regards > Suyog > -- > View this message in context: > http://www.nabble.com/How-identify-douplicate-molecules----tp24305861p24305861.html > Sent from the cdk-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Cdk-user mailing list > Cdk-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cdk-user > ------------------------------------------------------------------------------ _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user