Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
ECFPFeatureLookup Fails to find Feature for ID
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
Steven

Joined: 02 Nov 2001
Posts: 52

View user's profile

Back to top
Link to postPosted: Thu Nov 20, 2014 7:00 pmPost subject: ECFPFeatureLookup Fails to find Feature for ID Reply with quote

Hello.  I am unable to lookup features for many feature keys.  It is my understanding that, for a given molecule, each feature ID should correspond to a ECFPFeature object.  In particular, in the following code:

        ECFPFeatureLookup lookup = new ECFPFeatureLookup();

        ECFP ecfp = new ECFP(params);

        ecfp.generate(mol);

        int[] ints = ecfp.toIntArray();

        lookup.processMolecule(mol);

        for (Integer i = 0; i < ints.length; i++) {

            Integer key = ints[i];

            List<ECFPFeature> fs = lookup.getFeaturesFromIdentifier(key);

            if (fs.size() == 0) {

                log.debug("DID NOT FIND FEATURES FOR KEY: " + key);

            }

        }

I should never see the message "DID NOT FIND FEATURES FOR KEY: ".  However, I see it quite often (which causes an Exception later on in my code).  Please let me know if this is a bug or if I'm doing something wrong.  Thanks.

 

-&

Gabor
ChemAxon personnel
Joined: 29 May 2005
Posts: 317

View user's profile

Back to top
Link to postPosted: Fri Dec 05, 2014 1:28 pmPost subject: Reply with quote

Dear Steven,

 

Apologies for the late answer. In the attached i see a possible problem. This call

ECFPFeatureLookup lookup = new ECFPFeatureLookup();

initialize lookup with the default configuration (see http://www.chemaxon.com/jchem/doc/dev/java/api/chemaxon/descriptors/ECFPFeatureLookup.html#ECFPFeatureLookup() ), while this call

ECFP ecfp = new ECFP(params);

initialize fingerprint generation with the given parameters. If the given parameters differ from the default, the two fingerprint generation (the one wrapped by the lookup versus the direct one) will represent different features.

I would recommend to use the parametrized constructor for the feature lookup too (http://www.chemaxon.com/jchem/doc/dev/java/api/chemaxon/descriptors/ECFPFeatureLookup.html#ECFPFeatureLookup(java.lang.String) ).

Regards,

Gabor


This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum