aboutsummaryrefslogtreecommitdiff
path: root/scripts/get_dock_score.py
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2020-07-07 14:55:17 +0000
committerGitHub <noreply@github.com>2020-07-07 14:55:17 +0000
commit0d135d611506e81d322596c7827b08bbfd3b7c08 (patch)
treea281b8e1f140ad3de77d818747fce03bcfa5b77b /scripts/get_dock_score.py
parent7059ee2a4ced23e467741cc846eb185886ffca38 (diff)
Format code with Blackdeepsource-transform-b65b5545
Diffstat (limited to 'scripts/get_dock_score.py')
-rw-r--r--scripts/get_dock_score.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/get_dock_score.py b/scripts/get_dock_score.py
index c8b87d5..1cc0412 100644
--- a/scripts/get_dock_score.py
+++ b/scripts/get_dock_score.py
@@ -3,8 +3,8 @@
import argparse
parser = argparse.ArgumentParser(description="Get Docking Score")
-parser.add_argument("-p","--protein",help="Path to protein file")
-parser.add_argument("-l","--ligand",help="Path to ligand_out file")
+parser.add_argument("-p", "--protein", help="Path to protein file")
+parser.add_argument("-l", "--ligand", help="Path to ligand_out file")
args = parser.parse_args()
@@ -21,7 +21,13 @@ ligand = args.ligand
from os.path import basename
-print("# " + str(basename(protein)).replace(".pdbqt","") + "-" + str(basename(ligand)).replace("_out.pdbqt",""), end="\n\n")
+print(
+ "# "
+ + str(basename(protein)).replace(".pdbqt", "")
+ + "-"
+ + str(basename(ligand)).replace("_out.pdbqt", ""),
+ end="\n\n",
+)
from tabulate import tabulate
@@ -31,7 +37,7 @@ results = []
i = 1
for line in lines:
ta = []
- if line.find('REMARK VINA') == 0 and line.split()[3] != "":
+ if line.find("REMARK VINA") == 0 and line.split()[3] != "":
l = line.split()
ta.append(i)
ta.append(l[3])
@@ -41,6 +47,6 @@ for line in lines:
if ta != []:
results.append(ta)
-print("## Docking Scores",end="\n\n")
-print(tabulate(results,headers=["No.","Affinity","rmsd l.b","rmsd u.b"]))
-print("",end="\n\n")
+print("## Docking Scores", end="\n\n")
+print(tabulate(results, headers=["No.", "Affinity", "rmsd l.b", "rmsd u.b"]))
+print("", end="\n\n")