aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-08-08 16:14:58 +0530
committerGitHub <noreply@github.com>2020-08-08 16:14:58 +0530
commit17307d8351c504323f527dcc91395f54188343ec (patch)
tree1b9f3625e7b88958120ed782f371ab70ccf3d072
parent9293e1b17b6a727f6e743883dab3cc94e6828c6c (diff)
parent247e697f2b3152de4ffbe9e477e9df7704aaec36 (diff)
Merge pull request #5 from navanchauhan/navanchauhan-patch-1
Update makeReport.py
-rw-r--r--scripts/makeReport.py162
1 files changed, 86 insertions, 76 deletions
diff --git a/scripts/makeReport.py b/scripts/makeReport.py
index 2a32d29..c83928d 100644
--- a/scripts/makeReport.py
+++ b/scripts/makeReport.py
@@ -77,13 +77,14 @@ for ligand in natural_ligands:
for x in doc.report.bindingsite[
ligand
].interactions.hydrophobic_interactions.hydrophobic_interaction:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.ligcarbonidx.cdata)
- l.append(x.protcarbonidx.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.ligcarbonidx.cdata,
+ x.protcarbonidx.cdata,
+ ]
i += 1
tableBody.append(l)
print(tabulate(tableBody, headers=tableHeaders), end="\n\n")
@@ -108,15 +109,16 @@ for ligand in natural_ligands:
for x in doc.report.bindingsite[
ligand
].interactions.hydrogen_bonds.hydrogen_bond:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist_h_a.cdata)
- l.append(x.dist_d_a.cdata)
- l.append(x.don_angle.cdata)
- l.append(x.protisdon.cdata)
- l.append(x.sidechain.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist_h_a.cdata,
+ x.dist_d_a.cdata,
+ x.don_angle.cdata,
+ x.protisdon.cdata,
+ x.sidechain.cdata,
+ ]
l.append((x.donoridx.cdata + "[" + x.donortype.cdata + "]"))
l.append((x.acceptoridx.cdata + "[" + x.acceptortype.cdata + "]"))
i += 1
@@ -237,13 +239,14 @@ if fallback == 0:
for x in doc.report.bindingsite[
indexForUNL
].interactions.hydrophobic_interactions.hydrophobic_interaction:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.ligcarbonidx.cdata)
- l.append(x.protcarbonidx.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.ligcarbonidx.cdata,
+ x.protcarbonidx.cdata,
+ ]
i += 1
tableBody.append(l)
print(tabulate(tableBody, headers=tableHeaders), end="\n\n")
@@ -267,15 +270,16 @@ if fallback == 0:
for x in doc.report.bindingsite[
indexForUNL
].interactions.hydrogen_bonds.hydrogen_bond:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist_h_a.cdata)
- l.append(x.dist_d_a.cdata)
- l.append(x.don_angle.cdata)
- l.append(x.protisdon.cdata)
- l.append(x.sidechain.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist_h_a.cdata,
+ x.dist_d_a.cdata,
+ x.don_angle.cdata,
+ x.protisdon.cdata,
+ x.sidechain.cdata,
+ ]
l.append((x.donoridx.cdata + "[" + x.donortype.cdata + "]"))
l.append((x.acceptoridx.cdata + "[" + x.acceptortype.cdata + "]"))
i += 1
@@ -299,13 +303,14 @@ if fallback == 0:
for x in doc.report.bindingsite[
indexForUNL
].interactions.salt_bridges.salt_bridge:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.protispos.cdata)
- l.append(x.lig_group.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.protispos.cdata,
+ x.lig_group.cdata,
+ ]
atoms = []
for y in x.lig_idx_list.idx:
atoms.append(y.cdata)
@@ -322,13 +327,14 @@ if fallback == 0:
for x in doc.report.bindingsite[
indexForUNL
].interactions.pi_cation_interactions.pi_cation_interaction:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.offset.cdata)
- l.append(x.protcharged.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.offset.cdata,
+ x.protcharged.cdata,
+ ]
atoms = []
for y in x.lig_idx_list.idx:
atoms.append(y.cdata)
@@ -347,13 +353,14 @@ elif fallback == 1:
) in (
doc.report.bindingsite.interactions.hydrophobic_interactions.hydrophobic_interaction
):
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.ligcarbonidx.cdata)
- l.append(x.protcarbonidx.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.ligcarbonidx.cdata,
+ x.protcarbonidx.cdata,
+ ]
i += 1
tableBody.append(l)
print(tabulate(tableBody, headers=tableHeaders), end="\n\n")
@@ -375,15 +382,16 @@ elif fallback == 1:
]
i = 1
for x in doc.report.bindingsite.interactions.hydrogen_bonds.hydrogen_bond:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist_h_a.cdata)
- l.append(x.dist_d_a.cdata)
- l.append(x.don_angle.cdata)
- l.append(x.protisdon.cdata)
- l.append(x.sidechain.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist_h_a.cdata,
+ x.dist_d_a.cdata,
+ x.don_angle.cdata,
+ x.protisdon.cdata,
+ x.sidechain.cdata,
+ ]
l.append((x.donoridx.cdata + "[" + x.donortype.cdata + "]"))
l.append((x.acceptoridx.cdata + "[" + x.acceptortype.cdata + "]"))
i += 1
@@ -405,13 +413,14 @@ elif fallback == 1:
]
i = 1
for x in doc.report.bindingsite.interactions.salt_bridges.salt_bridge:
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.protispos.cdata)
- l.append(x.lig_group.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.protispos.cdata,
+ x.lig_group.cdata,
+ ]
atoms = []
for y in x.lig_idx_list.idx:
atoms.append(y.cdata)
@@ -430,13 +439,14 @@ elif fallback == 1:
) in (
doc.report.bindingsite.interactions.pi_cation_interactions.pi_cation_interaction
):
- l = []
- l.append(i)
- l.append(x.resnr.cdata)
- l.append(x.restype.cdata)
- l.append(x.dist.cdata)
- l.append(x.offset.cdata)
- l.append(x.protcharged.cdata)
+ l = [
+ i,
+ x.resnr.cdata,
+ x.restype.cdata,
+ x.dist.cdata,
+ x.offset.cdata,
+ x.protcharged.cdata,
+ ]
atoms = []
for y in x.lig_idx_list.idx:
atoms.append(y.cdata)