Of course, please remember that if your input is not so clean (various charge states, unclearly defined stereochemistry, etc), then you may want to do some normalization before you do isomorphism checking or SMILES/InChI generation. The InChI generation does some normalization, but not all. If this applies, you may be interested in this paper to see what ChemSpider does for normalization (all of it you should be able to do with the CDK):
http://www.jcheminf.com/content/7/1/30 Egon On Wed, Jul 8, 2015 at 1:06 AM, Zheng Shi <[email protected]> wrote: > Thanks. I will see. Thank you very much. > > On Tue, Jul 7, 2015 at 5:03 PM, Egon Willighagen > <[email protected]> wrote: >> >> Dear Zheng Shi, >> >> I think what you are looking for is "isomorphism checking". If the >> chemical graph of two structures is the same, they are called >> isomorphic. The following Groovy code shows a very basic example: >> >> butane = MoleculeFactory.makeAlkane(4); >> isomorphismTester = new UniversalIsomorphismTester() >> println "Is isomorphic: " + >> isomorphismTester.isIsomorph( >> butane, butane >> ) >> >> But that can also indeed be done with canonical SMILES or InChI, as >> indicated by John. >> >> Egon >> >> On Mon, Jul 6, 2015 at 11:16 PM, Zheng Shi <[email protected]> wrote: >> > The "compare" means to tell if two molecules are equal. Suppose I have a >> > molecule B, which is generated by molecule A during a reaction: A -> B, >> > and >> > I get a molecule C, which is also generated by molecule A during a >> > reaction: >> > A->C. I want to tell whether B and C are the same. Usually we can >> > visualize >> > the structure of the two structures to see. But if the number of >> > molecules >> > is too big, for example, two sdf files contain some molecules, then it's >> > not >> > convenient to visualize manually. So is there a reasonable way to do >> > that? >> > can we just generate canonical form for molecules (like SMILES, then >> > compare >> > the SMILES)? Is it reasonable for this? Or other methods? Thanks. >> > >> > On Mon, Jul 6, 2015 at 3:17 AM, John M <[email protected]> >> > wrote: >> >> >> >> Hit send too soon... >> >> >> >> b) Generate hash codes (CDK/InChIKey) >> >> c) Graph-Isomorphism check. >> >> >> >> Normally the best approach is (a) but this might not be the >> >> equality/comparison you want? >> >> >> >> John >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Don't Limit Your Business. Reach for the Cloud. >> >> GigeNET's Cloud Solutions provide you with the tools and support that >> >> you need to offload your IT needs and focus on growing your business. >> >> Configured For All Businesses. Start Your Cloud Today. >> >> https://www.gigenetcloud.com/ >> >> _______________________________________________ >> >> Cdk-user mailing list >> >> [email protected] >> >> https://lists.sourceforge.net/lists/listinfo/cdk-user >> >> >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Don't Limit Your Business. Reach for the Cloud. >> > GigeNET's Cloud Solutions provide you with the tools and support that >> > you need to offload your IT needs and focus on growing your business. >> > Configured For All Businesses. Start Your Cloud Today. >> > https://www.gigenetcloud.com/ >> > _______________________________________________ >> > Cdk-user mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/cdk-user >> > >> >> >> >> -- >> E.L. Willighagen >> Department of Bioinformatics - BiGCaT >> Maastricht University (http://www.bigcat.unimaas.nl/) >> Homepage: http://egonw.github.com/ >> LinkedIn: http://se.linkedin.com/in/egonw >> Blog: http://chem-bla-ics.blogspot.com/ >> PubList: http://www.citeulike.org/user/egonw/tag/papers >> ORCID: 0000-0001-7542-0286 >> ImpactStory: https://impactstory.org/EgonWillighagen > > -- E.L. Willighagen Department of Bioinformatics - BiGCaT Maastricht University (http://www.bigcat.unimaas.nl/) Homepage: http://egonw.github.com/ LinkedIn: http://se.linkedin.com/in/egonw Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers ORCID: 0000-0001-7542-0286 ImpactStory: https://impactstory.org/EgonWillighagen ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

