Hi All,

ok, I found the issue. In the used code I parse SMILES into IAtomContainer and then create an IQueryAtomContainer from it (which my search method accepts as parameter) Taking the IAtomContainer from smiles directly for usage in UIT and then results are as expected.

Hence I assume the method/QueryAtomContainerCreator.createBasicQueryContainer(//atomContainer)/ has a bug or I misunderstand the documentation:

/Creates a QueryAtomContainer with SymbolQueryAtom's, AromaticQueryBond's and OrderQueryBond's. If a IBond of the input |container| is flagged aromatic, then it disregards bond order information and only match against an aromatic target atom instead./

As far as I understand this, the method takes Aromaticity into account by requiring both atoms of the bond to be aromatic for a match? But obviously none of the atoms are aromatic in my query.

I just created following "test":

/import org.openscience.cdk.smiles.SmilesParser;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.aromaticity.CDKHueckelAromaticityDetector;
import org.openscience.cdk.isomorphism.UniversalIsomorphismTester;
import org.openscience.cdk.isomorphism.matchers.IQueryAtomContainer;
import org.openscience.cdk.isomorphism.matchers.QueryAtomContainerCreator;

public class UitTest {

     public static void main(String[] args) throws Exception {

         String querySmiles = "CCC(C)C(C)C(C)C";

String structureOneFromSdFile = "O=C2NC=1C=CC=CC=1C26(N(C)CC(C=3C=CC=CC=3(F))C46(C(=O)C=5C=CC=CC=5(OC4)))"; // first molecule in the sd-file i previously sent

SmilesParser smilesParser = new SmilesParser(DefaultChemObjectBuilder.getInstance());
        IMolecule queryMol = smilesParser.parseSmiles(querySmiles);
AtomContainerManipulator.percieveAtomTypesAndConfigureUnsetProperties(queryMol);
        CDKHueckelAromaticityDetector.detectAromaticity(queryMol);

IQueryAtomContainer query = QueryAtomContainerCreator.createBasicQueryContainer(queryMol); // AtomContainerManipulator.percieveAtomTypesAndConfigureUnsetProperties(query); //// uncommenting has no impact on result./ / // CDKHueckelAromaticityDetector.detectAromaticity(query); // uncommenting has no impact on result.

IMolecule target = smilesParser.parseSmiles(structureOneFromSdFile); AtomContainerManipulator.percieveAtomTypesAndConfigureUnsetProperties(target);
        CDKHueckelAromaticityDetector.detectAromaticity(target);

//System.out.println(UniversalIsomorphismTester.isSubgraph(target, queryMol)); /// false / System.out.println(UniversalIsomorphismTester.isSubgraph(target, query)); // true

     }

}/

So UIT is working correctly.

Best Regards,

Joos

Am 19.12.2011 17:30, schrieb Egon Willighagen:
Joos,

On Mon, Dec 19, 2011 at 5:16 PM, Nina Jeliazkova
<[email protected]>  wrote:
For example "CCC(C)C(C)C(C)C" does not (and should not) match aromatic
carbons, as in http://tinyurl.com/7h7havf  (no highlighted structures in the
CDK depiction at the top right )
The above SMILES/SMARTS should indeed not match aromatic systems. That
leaves the question why the UIT does match them... Joos, what code are
you using for that experiment?

Egon


------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to