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

when superposing without defining the chainID, the error 'NameError: name 'warnings' is not defined', instead of printing the warning itself #75

Closed reneejoosten closed 2 years ago

reneejoosten commented 2 years ago

Describe the bug When superposing a structure (e.g. TCR) onto that same structure but then part of a complex (e.g. TCRpMHC), without defining chainID, the error is not printed correctly. In your code (line 54), I see that the warning to be printed should be 'selection have different size, getting intersection'. Instead, what is printed is 'NameError: name 'warnings' is not defined'.

Environment:

To Reproduce Steps/commands to reproduce the behaviour:

from pdb2sql import pdb2sql from pdb2sql import superpose db1 = pdb2sql('2ckb_l_u.pdb') db2 = pdb2sql('2ckb_b_t_aligned') superposed_db1 = superpose(db1, db2)

Expected Results The correct warning message to be printed

Actual Results or Error Info File "/Applications/anaconda3/lib/python3.7/site-packages/pdb2sql/superpose.py", line 53, in superpose warnings.warn(

NameError: name 'warnings' is not defined

2ckb_l_u.pdb.txt 2ckb_b_t_aligned.pdb.txt

CunliangGeng commented 2 years ago

Thanks for reporting the issue. The reason of the error is that warnings package was not imported.

A new pdb2sql version (0.5.2) was just released, please update your pdb2sql to latest version, it should work well then. Let me know if you have further questions.

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.