longlongman / DESERT

Zero-Shot 3D Drug Design by Sketching and Generating (NeurIPS 2022)
32 stars 9 forks source link

Some issues during installing and using #8

Open xy127 opened 1 year ago

xy127 commented 1 year ago

Hello longlongman, I'm new to deep learning. Please bear with me for some dump questions.

  1. Could you provide more details of installation? ex. Which python version and which pip version to choose for installing? I used python 3.7.1 and at the last step of installing ' pip install pybel scikit-image pebble meeko==0.1.dev1 vina pytransform3d' an error message prints:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.4.0 requires typing-extensions~=3.7.4, but you have typing-extensions 4.7.1 which is incompatible.
  1. at the pretraining stage after I executed the 'python get_training_data.py' an error occurred:
File "get_training_data.py", line 31, in <module>
    with open(vocab_path, 'rb') as fr:
IsADirectoryError: [Errno 21] Is a directory: '/home/ubuntu/user_space/DESERT/preparation/vocab'

The vocab directory contains two files produced by 'get_fragment_vocab.py' : 'BRICS_RING_R.vocab.pkl' and 'BRICS_RING_R.494789.pkl'

  1. Since I was stuck on step 2, I tried to use the training data and vocab upload online to train the shape2mol. What's the difference between 0.pkl and 1.pkl? Do I need to use both pretrained model? I'm a bit confused about how to fill out the blanks in training.yaml
class: ShapePretrainingDatasetShard
      path: ---TRAINING DATA PATH---
      vocab_path: ---VOCAB PATH---
      sample_each_shard: 500000
      shuffle: True
    valid:
      class: ShapePretrainingDataset
      path: 
        samples: ---VALID DATA PATH---
        vocab: ---VOCAB PATH---
    test:
      class: ShapePretrainingDataset
      path: 
        samples: ---TEST DATA PATH---
        vocab: ---VOCAB PATH---

The ---TRAINING DATA PATH--- is simply the path to get 0.pkl and 1.pkl
But what about valid data path and test data path? ( I just put it same as training data path)

When executing train.sh another error occured pkg_resources.DistributionNotFound: The 'typing-extensions~=3.7.4' distribution was not found and is required by tensorflow And I believe it is related with the first error during installing.

  1. For the sketching process, where to fill in the path for input ligand sdf in sketch.py? When sketching the pocket by sketch.py , the following error occurred:
    File "sketching.py", line 2, in <module>
    from shape_utils import get_atom_stamp
    File "/home/ubuntu/user_space/DESERT/sketch/shape_utils.py", line 3, in <module>
    from common import ATOM_RADIUS, ATOMIC_NUMBER, ATOMIC_NUMBER_REVERSE
    ImportError: cannot import name 'ATOM_RADIUS' from 'common' (/home/ubuntu/miniconda3/envs/DESERT/lib/python3.7/site-packages/common/__init__.py)
    1. For generating process
      
      bycha-run \
      --config configs/generating.yaml \
      --lib shape_pretraining \
      --task.mode evaluate \
      --task.data.train.path data \
      --task.data.valid.path.samples ❗❗❗FILL_THIS(MOLECULE SHAPES SAMPLED FROM CAVITY)❗❗❗ \
      --task.data.test.path.samples  ❗❗❗FILL_THIS❗❗❗ \
      --task.dataloader.train.max_samples 1 \
      --task.dataloader.valid.sampler.max_samples 1 \
      --task.dataloader.test.sampler.max_samples 1 \
      --task.model.path ❗❗❗FILL_THIS❗❗❗ \
      --task.evaluator.save_hypo_dir ❗❗❗FILL_THIS❗❗❗

What should the path for task.data.test.path.samples ?
Is task.model.path  the path to 1WW_30W_5048064.pt ?

Sorry for bothering
longlongman commented 1 year ago

Of course, I am willing to give some advice about your issues.

  1. Python version
  1. Vocab file
  1. What's the difference between 0.pkl and 1.pkl?
  1. How to fill out the blanks in training.yaml?
  1. Where to fill in the path for input ligand sdf in sketch.py?
  1. ImportError: cannot import name 'ATOM_RADIUS' from 'common'

    • I believe that chage from common import ATOM_RADIUS, ATOMIC_NUMBER, ATOMIC_NUMBER_REVERSE to from ..shape_pretraining.common import ATOM_RADIUS, ATOMIC_NUMBER, ATOMIC_NUMBER_REVERSE can fix the problem.
  2. What should the path for task.data.test.path.samples?

    • You can just fill the same path as you do in task.data.valid.path.samples.
  3. Is task.model.path the path to 1WW_30W_5048064.pt ?

    • Yes.