Spaces:
Sleeping
Sleeping
Download utils/process.py from Zaixi/Pocket-Gen: direct link, hf CLI and curl.
- Browser
- Download file 792 Bytes
-
https://huggingface.co/spaces/Zaixi/Pocket-Gen/resolve/main/utils/process.py
- Command line
-
hf download hf://spaces/Zaixi/Pocket-Gen/utils/process.py
-
curl -L -o process.py https://huggingface.co/spaces/Zaixi/Pocket-Gen/resolve/main/utils/process.py
792 Bytes
| import numpy as np | |
| import pickle | |
| import random | |
| import shutil | |
| import os | |
| from shutil import copyfile | |
| import argparse | |
| if __name__ == '__main__': | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--id', type=int, default=0) | |
| args = parser.parse_args() | |
| pocket_score={} | |
| with open('../ICML23/data/crossdocked_pocket10/index.pkl', 'rb') as f: | |
| index = pickle.load(f) | |
| if os.path.exists('./cabbage-file_maker/match'): | |
| shutil.rmtree('./cabbage-file_maker/match') | |
| os.mkdir('./cabbage-file_maker/match') | |
| for (pocket_fn, ligand_fn, _, rmsd_str) in index[args.id*100:args.id*100+100]: | |
| if pocket_fn is None: continue | |
| copyfile('../ICML23/data/crossdocked_pocket10/'+pocket_fn, './cabbage-file_maker/match/'+os.path.split(pocket_fn)[1]) | |