Reinvent icon indicating copy to clipboard operation
Reinvent copied to clipboard

Can't use non-count ECFP with useFeatures = True

Open JanoschMenke opened this issue 1 year ago • 1 comments

Hi I think there is an error when calculating the ECFP when setting use_counts = False and use_features = True, which leads to ECFP being used that does not use useFeatures=True in the generation of the fingerprint. Could that be due to a different function being used when use_counts=False

I assume this function then is called, which does not appear to use the useFeaturesparameter:

def molecules_to_fingerprints(self, molecules: List[Mol], parameters: {}) -> List[np.ndarray]:
    radius = parameters.get('radius', 3)
    size = parameters.get('size', 2048)
    fp_bits = [AllChem.GetMorganFingerprintAsBitVect(mol, radius, size) for mol in molecules]
    fingerprints = [self._numpy_fingerprint(fp, dtype=np.int32) for fp in fp_bits]
    return fingerprints

JanoschMenke avatar May 26 '23 08:05 JanoschMenke

Many thanks for pointing this out. I will take a look but this may take a while.

halx avatar May 30 '23 12:05 halx