Skip to content

Commit e16bddb

Browse files
committed
raise error if more than 2 chains are found
1 parent 65b2b8f commit e16bddb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pdb2sql/StructureSimilarity.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ def compute_izone(self, cutoff=10.0, save_file=True, filename=None):
298298

299299
sql_ref = interface(self.ref)
300300
chains = list(sql_ref.get_chains())
301+
if len(chains) != 2:
302+
raise ValueError(
303+
'exactly two chains are needed for irmsd calculation but we found %d' % len(chains), chains)
304+
301305
contact_ref = sql_ref.get_contact_atoms(
302306
cutoff=cutoff, extend_to_residue=True, chain1=chains[0], chain2=chains[1])
303307

0 commit comments

Comments
 (0)