User 90425de59b
24-02-2010 15:38:34
Hi,
I'm not sure I'm on the right forum but I couldn't find a more appropriate one.
So I'm trying to perform substructure search using the lastest MarvinBeans. As a simple test I just performed substructure search on phenilalanine using benzene as query:
chemaxon.struc.Molecule query = MolImporter.importMol("c1ccccc1");
chemaxon.struc.Molecule test = MolImporter.importMol("NC(Cc1ccccc1)C(=O)O") ;
System.out.println("Results: "+test.contains(query));
But the result is false... I'm guessing this is not the appropriate way to perform substructure search (what is actually doing the contains method by the way?), so I was wondering if it was possible to perforum such task using MarvinBeans?
Thanks in advance
Regards
Vincent
ChemAxon 7c2d26e5cf
01-03-2010 15:31:18
The Molecule API is not capable for substructure search.
chemaxon.struc.MoleculeGraph.contains(MoleculeGraph graph) checks whether the original MoleculeGraph object includes all MolAtom instances that are member of the "graph" object. It does not compare chemical properties of the nodes. In your example, you have created two separate Molecule objects. Each Molecule object has created its own MolAtom instances. There is not any MolAtom instances from the first structure whose reference would be stored in the second molecule object.
To define queries and find chemical sub structures, you need the SSS module that is part of the JChem package:
chemaxon.sss.search.Search
I move your topic to the JChem forum, where JChem guys can answer your further questions about substructure search.
User c1ce6b3d19
03-03-2010 15:15:43