@@ -41,9 +41,9 @@ def get_restraints(restraints_file):
41
41
line = line .rstrip (os .linesep )
42
42
if line :
43
43
if line .startswith ('R' ):
44
- restraints_receptor .add (line )
44
+ restraints_receptor .add (line . split [ 1 ] )
45
45
if line .startswith ('L' ):
46
- restraints_ligand .add (line )
46
+ restraints_ligand .add (line . split [ 1 ] )
47
47
return restraints_receptor , restraints_ligand
48
48
49
49
@@ -110,14 +110,14 @@ def parse_command_line():
110
110
contacts = protein_contacts .select (args .cutoff , ligand )
111
111
if contacts :
112
112
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 ()))
114
114
115
115
# Contacts on ligand side
116
116
protein_contacts = Contacts (ligand )
117
117
contacts = protein_contacts .select (args .cutoff , receptor )
118
118
if contacts :
119
119
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 ()))
121
121
122
122
# Calculate percentage of satisfied restraints
123
123
perc = (len (contacts_receptor & restraints_receptor ) + len (contacts_ligand & restraints_ligand )) / total
0 commit comments