-
Notifications
You must be signed in to change notification settings - Fork 845
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
Calling MurckoScaffold on molecule causes bug in pickling #6036
Comments
@dangthatsright I cannot reproduce the error from your script Also this isn't directly a problem with the pickling code, at least not for me:
Are you sure that there's not something else going on in the script that's causing the problem? |
@greglandrum yes you are right, I had some other imports in my script that I thought were unrelated but I was able to fully reproduce after including |
@dangthatsright that updated version still runs fine for me. |
Yes I get the error when I run the exact script. Are you testing on ubuntu or mac? I know multiprocessing recently changed for mac vs ubuntu so perhaps the issue is there? |
Yeah, I ran it on ubuntu 22.04. |
One possible difference is that I'm using the conda version of the RDKit. |
Ah maybe that's it? In any case, it doesn't matter too much for me since I just make copies of the molecule before calling MurckoScaffold. It seems like this is probably less of an issue than it's worth to fix so I'm just going to close it. Thanks for looking into it though! |
Just joining in to report the same issue with the pip version of RDKit on RHL (2022.9.4) I can share the code if needed, but it is indeed very similar to @dangthatsright code |
This looks pretty nasty, but I think it's worth investigating so I'm going to keep it open. Here is a non-multiprocessing reproducible:
|
@greglandrum this was fun, I have a solution and it wasn't really related to the BitVector. I'll put in a PR tonight. |
Describe the bug
Calling MurckoScaffold on an rdkit mol mutates it in a way that probably has bad downstream effects. I am not entirely sure what is wrong but seems like the mol is unable to be pickled.
To Reproduce
The above code should work, but once you uncomment the MurckoScaffold section, there is a lot of pickling errors.
which looks like
Expected behavior
MurckoScaffold.GetScaffoldForMol should have no affect on the underly mol
Screenshots
If applicable, add screenshots to help explain your problem.
Configuration (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: