From a9b9fd17c005007e606b50ae798b6f40b629b959 Mon Sep 17 00:00:00 2001 From: xiangyan93 Date: Fri, 8 Dec 2023 21:27:32 -0500 Subject: [PATCH] Update to 0.2.1: bugfix for circular fingerprints. --- mgktools/__init__.py | 2 +- mgktools/features_mol/features_generators.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mgktools/__init__.py b/mgktools/__init__.py index 27d06a8..f22e5b7 100644 --- a/mgktools/__init__.py +++ b/mgktools/__init__.py @@ -2,4 +2,4 @@ # -*- coding: utf-8 -*- -__version__ = '0.2.0' +__version__ = '0.2.1' diff --git a/mgktools/features_mol/features_generators.py b/mgktools/features_mol/features_generators.py index a4594f2..075b815 100644 --- a/mgktools/features_mol/features_generators.py +++ b/mgktools/features_mol/features_generators.py @@ -70,9 +70,8 @@ def morgan_counts_features_generator(self, mol: Union[str, Chem.Mol]) -> np.ndar return features - @staticmethod - def circular_features_generator(mol: Union[str, Chem.Mol]) -> np.ndarray: - circular_fp_featurizer = deepchem.feat.CircularFingerprint(size=2048, radius=8, + def circular_features_generator(self, mol: Union[str, Chem.Mol]) -> np.ndarray: + circular_fp_featurizer = deepchem.feat.CircularFingerprint(size=self.num_bits, radius=self.radius, sparse=False, smiles=True) features = circular_fp_featurizer.featurize([mol]).ravel() return features