forked from xfcui/egGNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_egGNN.py
More file actions
executable file
·36 lines (26 loc) · 991 Bytes
/
Copy pathrun_egGNN.py
File metadata and controls
executable file
·36 lines (26 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env -S python3 -Bu
# coding: utf-8
# @Auth: Jor<qhjiao@mail.sdu.edu.cn>
# @Date: Tue 07 Jun 2022 09:10:48 AM HKT
# @Desc: ligand protein binding affinity prediction
import os
import argparse
from egGNN.model import *
from egGNN.egGNN_pipeline import run_egGNN
def get_parser():
parser = argparse.ArgumentParser()
parser.add_argument('--ligand', type=str, help='the ligand path (absolute)')
parser.add_argument('--protein', type=str, help='the protein path (absolute)')
parser.add_argument('--gpu', type=int, default=0, help='the gpu num you use')
args = parser.parse_args()
return args
def run(args):
affinity = run_egGNN(args)
# delete
with open('eggnn', 'a') as f:
f.write(f"{args.ligand_name.split('_')[0]},{affinity}\n")
if __name__ == '__main__':
args = get_parser()
args.ligand_name = os.path.basename(args.ligand).split('.')[0]
args.protein_name = os.path.basename(args.protein).split('.')[0]
run(args)