Upgrade Morgan Fingerprint Generation to Use Modern RDKit API #323
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear Global-Chem developers,
I'd like to propose an update to the Morgan fingerprint generation method used in the project. This change is necessary to address a deprecation warning and to align with RDKit's modern best practices.
Current Implementation
The current implementation uses the deprecated
GetMorganFingerprintAsBitVect
function:Proposed Change
I suggest updating the code to use the modern
MorganGenerator
class:Rationale
Deprecation Warning: The current method triggers a deprecation warning, indicating that it will be removed in future versions of RDKit.
Performance: The new
MorganGenerator
class is optimized for better performance, especially when generating multiple fingerprints.Consistency: This change will make the codebase consistent with modern RDKit practices and easier to maintain in the future.
Flexibility: The new API offers more flexibility and options for fingerprint generation, which could be beneficial for future enhancements.
Scope of Changes
I've identified several instances where this change should be applied throughout the codebase. A comprehensive search and replace operation would be necessary to update all occurrences.
Verification
I've tested this change on a small scale and found it to produce equivalent results to the current implementation. However, I recommend a thorough verification process across all use cases in the Global-Chem project to ensure full compatibility.
References
I'm happy to assist with implementing and testing these changes if needed. Please let me know if you need any further information or clarification.
Thank you for considering this proposal.
Best regards,
Akihiro Kuroiwa