Skip to content

Commit f666e52

Browse files
committed
Fixed filter when restraints are active
1 parent d98e7c1 commit f666e52

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bin/post/lgd_filter_restraints.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def get_restraints(restraints_file):
4141
line = line.rstrip(os.linesep)
4242
if line:
4343
if line.startswith('R'):
44-
restraints_receptor.add(line)
44+
restraints_receptor.add(line.split[1])
4545
if line.startswith('L'):
46-
restraints_ligand.add(line)
46+
restraints_ligand.add(line.split[1])
4747
return restraints_receptor, restraints_ligand
4848

4949

@@ -110,14 +110,14 @@ def parse_command_line():
110110
contacts = protein_contacts.select(args.cutoff, ligand)
111111
if contacts:
112112
for contact in contacts:
113-
contacts_receptor.add("R {}.{}.{}".format(contact.getChid(), contact.getResname(), contact.getResnum()))
113+
contacts_receptor.add("{}.{}.{}".format(contact.getChid(), contact.getResname(), contact.getResnum()))
114114

115115
# Contacts on ligand side
116116
protein_contacts = Contacts(ligand)
117117
contacts = protein_contacts.select(args.cutoff, receptor)
118118
if contacts:
119119
for contact in contacts:
120-
contacts_ligand.add("L {}.{}.{}".format(contact.getChid(), contact.getResname(), contact.getResnum()))
120+
contacts_ligand.add("{}.{}.{}".format(contact.getChid(), contact.getResname(), contact.getResnum()))
121121

122122
# Calculate percentage of satisfied restraints
123123
perc = (len(contacts_receptor & restraints_receptor) + len(contacts_ligand & restraints_ligand)) / total

bin/post/lgd_rank_swarm.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)