@@ -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
0 commit comments