Skip to content

Commit 4d9fc76

Browse files
committed
check residue numbering
1 parent d4b2989 commit 4d9fc76

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pdb2sql/StructureSimilarity.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,17 @@ def compute_irmsd_fast(self, izone=None, method='svd',
288288

289289
if check:
290290

291+
self.check_residues()
292+
291293
data_decoy = self.get_data_zone_backbone(
292294
self.decoy, resData, return_not_in_zone=False)
293295
data_ref = self.get_data_zone_backbone(
294296
self.ref, resData, return_not_in_zone=False)
295297

298+
if data_ref.symmetric_difference(data_decoy) != set():
299+
raise ValueError(
300+
'Issue in the calculation of the i-rmsd')
301+
296302
atom_common = data_ref.intersection(data_decoy)
297303
xyz_contact_decoy = self._get_xyz(self.decoy, atom_common)
298304
xyz_contact_ref = self._get_xyz(self.ref, atom_common)
@@ -306,7 +312,8 @@ def compute_irmsd_fast(self, izone=None, method='svd',
306312

307313
# superpose the fragments
308314
xyz_contact_decoy = superpose_selection(xyz_contact_decoy,
309-
xyz_contact_decoy, xyz_contact_ref, method)
315+
xyz_contact_decoy,
316+
xyz_contact_ref, method)
310317

311318
# return the RMSD
312319
return self.get_rmsd(xyz_contact_decoy, xyz_contact_ref)

0 commit comments

Comments
 (0)