ECFP class

User a0ee4512d1

17-09-2012 18:03:10

 


I am trying to use ECFP class and generate fingerprint. The codes are very simple:



  String smiles = "COC1=CC(C=NN2CCN(CC2)C2C3=CC=CC=C3C3=CC=CC=C23)=CC(OC)=C1OC";


 


        Molecule mol = MolImporter.importMol(smiles);


 


        ECFPParameters para = new ECFPParameters();


        para.setDiameter(4);


        para.setLength(1024);


        para.setKeepCounts(false);


 


        ECFP ecfp = new ECFP(para);


 


        ecfp.generate(mol);


 


        int[] ids = ecfp.toIntArray();


Compiling is fine with 5.10.4. But when I ran it, I got:



 



Exception in thread "main" java.lang.NoSuchMethodError: chemaxon.util.iterator.IteratorFactory$AtomIterator.next()Lchemaxon/struc/MolAtom;


at chemaxon.descriptors.ECFPGenerator.generateInitialIdentifiers(ECFPGenerator.java:399)


at chemaxon.descriptors.ECFPGenerator.generateECFP(ECFPGenerator.java:572)


at chemaxon.descriptors.ECFPGenerator.generate(ECFPGenerator.java:140)


at chemaxon.descriptors.ECFPParameters.generate(ECFPParameters.java:319)


at chemaxon.descriptors.ECFP.generate(ECFP.java:532)



 


Could you help me on this?


 


Thanks,


 


Yuhong Wang

ChemAxon 1b9e90b2e7

18-09-2012 08:05:29

Hi Yuhong Wang,


I could not reproduce this issue by launching your code with jchem 5.10.4.  in the classpath.


I suspect a previous version of jchem in your classpath preceeding 5.10.4.


Could you please add these lines to your code for debugging purposes?


        System.err.println(chemaxon.jchem.VersionInfo.JCHEM_VERSION);
        System.err.println(chemaxon.marvin.VersionInfo.MARVIN_VERSION);
        
        ClassLoader cl = ClassLoader.getSystemClassLoader();
 
        URL[] urls = ((URLClassLoader)cl).getURLs();
 
        for(URL url: urls){
                System.err.println(url.getFile());
        }

Kind regards,


Adrian