-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use rdFingerprinGenerator #99
Conversation
@isty2e tests are failing (the fingerprints have changed), also needs to run black and ruff. |
Upon fixing the
The attempt to deepcopy the default params in |
You can try to update For the test set, it's very likely that you might need to modify the If you do have another approach in mind, would be happy to discuss it. Also let me know if you are stuck and need help. |
Since
|
I was thinking of some simple custom class loading so in set state, you define a serializable proxy representation of the C++ object that cannot be pickled, then in getstate, you map that back into the rdkit object. I like 2, as I am not sure what sharing the same object would implies on the long term. Overall only 3 is a no go IMO. |
Considering extensibility, I just implemented a wrapper for |
Awesome, please run |
I thought I've run them but somehow the CI has been blocked by linting issues. Maybe some configuration or version mismatch here? A pre-commit hook would be appreciated. |
@isty2e Thank you for your suggestion. We address the code-check issue in a separate PR to ensure this one stays focused on the primary changes. |
Merged main and pushed the changes. |
@maclandrol Could you take a final look and resolve the remaining conversations? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changelogs
This PR addresses the deprecation warning when
rdkit>=2014
is installed. See #98 and datamol-io/datamol#225 for more details.Checklist:
feature
,fix
ortest
(or ask a maintainer to do it for you).Mostly copy-pasted from datamol-io/datamol#226. However, the radii for ECFP and ECFP-count remains unchanged unlike the original PR.
Update:
copy.deepcopy(FP_DEF_PARAMS[method])
does not work due tordkit.Chem.rdFingerprintGenerator.AtomInvariantsGenerator
not being serializable, The class is wrapped withSerializableMorganFeatureAtomInvGen
inmolfeat/calc/_serializable_classes.py
.molfeat.calc._serializable_classes.SERIALIZABLE_CLASSES
.FPCalculator
instances will have distinctAtomInvariantsGenerator
instances.FPCalculator
instances is affected by this,__gestate__
,__setstate__
, andto_state_dict()
methods inFPCalculator
have been changed.