ECFPFeatureLookup Fails to find Feature for ID

User 2347372188

20-11-2014 18:00:26

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);


        int[] ints = ecfp.toIntArray();


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

            Integer key = ints;

            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.



ChemAxon 8b644e6bf4

05-12-2014 12:28:57

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 ), 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 ( ).