The solution to this is that the ExtendedFingerprinter is performing an
aromaticity detection on mol2 and the UniversalIsomorphismTester seems
to have picked this up.
If you run the same test on a non-aromatic molecules, it works fine.

Since we need aromaticity information for the fingerprints, the
fingerprinter should probably run on a clone.
In any case, I'll file a bug.

Cheers,

Chris

Mark Rijnbeek wrote:
> Hi,
> 
> the class UniversalIsomorphismTester kept giving me 'false', even for 
> two of the same molecules.
> After a bit of debugging I found out that the fact that I had made a 
> fingerprint for one of the molecules made the  
> UniversalIsomorphismTester fail.
> 
> I attached an example test below. mol1 and mol2 are both Indole and 
> therefore sub graphs of each other.
> However if you uncomment the fingerprinter line, the sub graph test 
> returns false. So it looks like the ExtendedFingerprinter is actually 
> changing mol2.
> 
> 
> cheers,
> Mark
> 
> _________
> 
> 
> 
> 
> package uk.ac.ebi.cocos.substructure;
> 
> import java.io.FileNotFoundException;
> 
> import org.openscience.cdk.AtomContainer;
> import org.openscience.cdk.exception.CDKException;
> import org.openscience.cdk.isomorphism.UniversalIsomorphismTester;
> import org.openscience.cdk.templates.MoleculeFactory;
> 
> 
> public class TestIsSubgraph {
> 
>     public static void main(String[] args) throws FileNotFoundException, 
> CDKException, Exception {
> 
> 
>         AtomContainer mol1 = MoleculeFactory.makeIndole();
>         AtomContainer mol2 = MoleculeFactory.makeIndole();
> 
>         //toggle this line ..
>         //new 
> org.openscience.cdk.fingerprint.ExtendedFingerprinter().getFingerprint(mol2);
> 
> 
>         if (UniversalIsomorphismTester.isSubgraph(mol1, mol2)) {
>             System.out.println("\n\nisSubgraph() true");
>         }
> 
>     }
> 
> }
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user

-- 
Dr. Christoph Steinbeck
Head of Chemoinformatics and Metabolism
European Bioinformatics Institute (EBI)
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD UK
Phone +44 1223 49 2640

What is man but that lofty spirit - that sense of enterprise.
... Kirk, "I, Mudd," stardate 4513.3..


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to