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

compute_lrmsd_fast() does not report proper error message on pdb files with non-amino acids in ATOM section #44

Closed LilySnow closed 2 years ago

LilySnow commented 4 years ago

When a pdb file has a non-amino acid in the ATOM section instead of the HETATM section, compute_lrmsd_fast() reports the following error messages:

Traceback (most recent call last): File "lrmsd.py", line 12, in lrmsd_fast = sim.compute_lrmsd_fast() File "/home/lixue1/tools/pdb2sql/pdb2sql/StructureSimilarity.py", line 140, in compute_lrmsd_fast xyz_decoy_short, xyz_decoy_long, xyz_ref_long, method) File "/home/lixue1/tools/pdb2sql/pdb2sql/superpose.py", line 94, in superpose_selection rmat = get_rotation_matrix(sel_mob, sel_tar, method=method) File "/home/lixue1/tools/pdb2sql/pdb2sql/superpose.py", line 136, in get_rotation_matrix mat = get_rotation_matrix_Kabsh(p, q) File "/home/lixue1/tools/pdb2sql/pdb2sql/superpose.py", line 173, in get_rotation_matrix_Kabsh P.shape, Q.shape) ValueError: ("Matrix don't have the same number of points", (1827, 3), (1824, 3))

The pdb file (1DFJ_refb-it1_33.pdb) has these lines (HETATM instead ATOM should have been used):

ATOM 5393 CA ACE 1A 15.175 -17.763 -20.935 1.00 10.00 B ATOM 5394 C ACE 1A 15.311 -16.206 -21.022 1.00 10.00 B ATOM 5395 O ACE 1A 15.783 -15.774 -22.071 1.00 10.00 B

Data and code are here: /projects/0/deeprank/BM5/issue44

Can we report a proper error message for such issue, for example, "xxx.pdb has non-supported amino acids XXX in ATOM"?

NicoRenaud commented 4 years ago

we could also use only the common part of the two structure to align.

NicoRenaud commented 4 years ago

i've set up a many2sql class that allows to have multiple pdb in on data base under different table. We can then use the intersection of the table to extract the common part of the structures. The superpose does exactly that if the selection based only on keywords leads to different number of atoms. This is in #46

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 7 days since being marked as stale.