HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
482 stars 109 forks source link

Inference should be able to be run from any directory? #34

Closed jadolfbr closed 2 years ago

jadolfbr commented 2 years ago

Running inference.py from a different project directory, gives this error. Would it be possible to add code to allow this to be run from anywhere?

Traceback (most recent call last):
  File "/home/jadolfbr/EquiBind/inference.py", line 460, in <module>
    with open(os.path.join(os.path.dirname(args.checkpoint), 'train_arguments.yaml'), 'r') as arg_file:
FileNotFoundError: [Errno 2] No such file or directory: 'runs/flexible_self_docking/train_arguments.yaml'
Traceback (most recent call last):
  File "/home/jadolfbr/EquiBind/inference.py", line 460, in <module>
    with open(os.path.join(os.path.dirname(args.checkpoint), 'train_arguments.yaml'), 'r') as arg_file:
FileNotFoundError: [Errno 2] No such file or directory: 'runs/flexible_self_docking/train_arguments.yaml'
Traceback (most recent call last):
  File "/home/jadolfbr/EquiBind/inference.py", line 460, in <module>
    with open(os.path.join(os.path.dirname(args.checkpoint), 'train_arguments.yaml'), 'r') as arg_file:
FileNotFoundError: [Errno 2] No such file or directory: 'runs/flexible_self_docking/train_arguments.yaml'
HannesStark commented 2 years ago

Feel free to modify your own code to do that!

jadolfbr commented 2 years ago

Sure, I might fork and open a PR for this. Should be fairly simple to just get the root dir and go from there.