Skip to content
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

sascorer.py calls removed RDkit module - ModuleNotFoundError: No module named 'rdkit.six' #11

Open
rsherhod opened this issue Apr 19, 2024 · 1 comment

Comments

@rsherhod
Copy link

rsherhod commented Apr 19, 2024

delinker_utils/sascorer.py is calling a module of RDKit that was removed in Release_2024.03.1
See change log: https://github.com/rdkit/rdkit/blob/master/ReleaseNotes.md#code-removed-in-this-release-1

I encountered this when trying to run one of your case studies:

$ python ./DiffLinker/generate_with_protein.py \
    --fragments 3hz1_modified_fragments_obabel.sdf \
    --protein 3hz1_protein.pdb \
    --output samples \
    --model models/pockets_difflinker_full_given_anchors.ckpt \
    --linker_size models/zinc_size_gnn.ckpt \
    --anchors 12,22 \
    --n_samples 1000 \
    --max_batch_size 16 \
    --random_seed 1
Traceback (most recent call last):
  File "[...]/DiffLinker/generate_with_protein.py", line 14, in <module>
    from src.lightning import DDPM
  File "[...]/DiffLinker/src/lightning.py", line 7, in <module>
    from src import metrics, utils, delinker
  File "[...]/DiffLinker/src/delinker.py", line 7, in <module>
    from src.delinker_utils import sascorer, calc_SC_RDKit
  File "[...]/DiffLinker/src/delinker_utils/sascorer.py", line 22, in <module>
    from rdkit.six.moves import cPickle
ModuleNotFoundError: No module named 'rdkit.six'
@rsherhod rsherhod changed the title sascorer.py calls missing RDkit module - ModuleNotFoundError: No module named 'rdkit.six' sascorer.py calls removed RDkit module - ModuleNotFoundError: No module named 'rdkit.six' Apr 19, 2024
@ydzdfci
Copy link

ydzdfci commented Apr 29, 2024

in sascorer.py
you can change
from rdkit.six.moves import cPickle to import pickle,
then in line 39, change _fscores = cPickle.load(gzip.open('%s.pkl.gz' % name)) to _fscores = pickle.load(gzip.open('%s.pkl.gz' % name))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants