DeepRank / pdb2sql

Fast and versatile biomolecular structure PDB file parser using SQL queries
https://pdb2sql.readthedocs.io
Apache License 2.0
24 stars 12 forks source link

enable missing residues at the interface in the rmsd calc #66

Closed manonreau closed 3 years ago

manonreau commented 3 years ago

Computes the irmsd and lrmsd despite missing atoms/residues at the interface. A warning is raised instead of an error.

NicoRenaud commented 3 years ago

I'm afraid one test is failing :(

manonreau commented 3 years ago

I'm afraid one test is failing :(

This is the test that checks if an error is raised if 2 interfaces are not strictly identical. Pretty logical !

NicoRenaud commented 3 years ago

Well I'm thinking those tests were here for a reason. We do use pdb2sql in a few projects so I don't really want to modify the default behavior of the methods. What we could do is to make the error raising optional. For example with a keyword argument of the routines or an attribute of the class.

Class StructureSimilarity(self, decoy, ref, verbose=False, enforce_residue_matching=True):
           ...
          self.enforce_residue_matching = enfore_residue_matching

and in the methods

if self.enforce_residue_mathcing:
    raise ValueError(....)

That way you can in your case turn the residue matching option off but the default behaviour doesn't change. Of course we introduce one argument in a bit of a adhoc fashion but I would prefer that at the moment

manonreau commented 3 years ago

now:

I would delete the check, is that dangerous ?