luost26 / 3D-Generative-SBDD

💊 A 3D Generative Model for Structure-Based Drug Design (NeurIPS 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not run the sample.py

waitma opened this issue · comments

Hi
excuse me, I can't run the script sample.py
the error is No such file or directory: './data/crossdocked_pocket10_name2id.pt', i have no idea, could you tell how can i solve this problem? thank you!

Have you downloaded split_by_name.pt from here and put it into the data folder ?

yes, I have done that. but the error still exists.

Are you using the latest version of the code?

The code has been updated several times, it seems that crossdocked_pocket10_name2id.pt only appears in older versions.

I checked, the version of the code is lastest,
I found the line 167 of the sample.py calls the get_data function,eventually the code on line 19 of utils/datasets/pl.py is called. And the content is self.name2id_path = os.path.join(os.path.dirname(self.raw_path), os.path.basename(self.raw_path) + '_name2id.pt'),

I've solved it,thank you

That's great! I wonder what happened. Can you share with us? Thanks!

ok, I guess that I didn't download the crossdocked_pocket10.tar.gz at first, but I ran the sample.py. Then the crossdocked_pocket10_processed.lmdb was created, but the crossdocked_pocket10_name2id.pt was not created. see code.
` self.processed_path = os.path.join(os.path.dirname(self.raw_path), os.path.basename(self.raw_path) + '_processed.lmdb')
self.name2id_path = os.path.join(os.path.dirname(self.raw_path), os.path.basename(self.raw_path) + '_name2id.pt')
self.transform = transform
self.db = None

    self.keys = None

    if not os.path.exists(self.processed_path):
        self._process()
        self._precompute_name2id()`

The 'lmdb' and 'pt' must be created at the same time, and the 'pt' will not be created when there is 'lmdb' in the data file. Therefore, after extracting the TAR package, this error happened.

Thank you! This is very helpful!