Skip to content

compute_lrmsd_pdb2sql works only if there is no missing backbone atom #85

Description

@FarzanehParizi

Describe the bug
If a backbone atom is missing in the Ligand part of one of the two PDBs, compute_lrmsd_pdb2sql does not report it and leads to an error

Environment:

  • OS system: Ubuntu
  • Branch commit ID: fix_lrmsd

To Reproduce

  1. Input these two PDBs:

BL00190001_decoy.txt
BL00190001_ref.txt

sim = StructureSimilarity(decoy_path, ref_path)
lrmsd = sim.compute_lrmsd_pdb2sql(exportpath=None, method='svd')

Expected Results
calculates the LRMSD value even if one (or more) of the backbone atoms is missing
or
prints a proper error message to report the mismatched backbone atom(s)

Actual Results or Error Info

624         # compute the RMSD
625         lrmsd = self.get_rmsd(xyz_decoy_short, xyz_ref_short)
626 
627         # export the pdb for verifiactions

             ..../pdb2sql/pdb2sql/StructureSimilarity.py in get_rmsd(P, Q)
1280         """
1281         n = len(P)
1282         return round(np.sqrt(1. / n * np.sum((P - Q)**2)), 3)

Additional Context
The compute_lrmsd_fast does not have this problem and prints the backbone LRMSD value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions