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
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to