haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
369 stars 112 forks source link

`pdb_fetch` could return `.cif` if the `.pdb` is not available #124

Closed rvhonorato closed 2 years ago

rvhonorato commented 2 years ago

Describe the bug pdb_fetch uses https://files.rcsb.org/download/ as the base URL, however not all structures are available via this interface.

Example: 6olf

To Reproduce

$ pdb_fetch 6olf    
[!] Error fetching structure: (404) Not Found

Expected behavior Ideally you would run pdb_fetch 6olf and get 6olf.pdb but yhis one is a bit tricky since these large structures are only available as .cif. Making pdb_fetch download the .cif and convert it to .pdb probably breaks the one tool paradigm.

But it could also download the .cif and display a warning that the output is not .pdb

Desktop (please complete the following information): Version: 2.4.1

joaomcteixeira commented 2 years ago

Yes. pdb_fecth could try to download the PDB and if not available download the CIF. But not convert it to PDB.

joaomcteixeira commented 2 years ago

I was reviewing this issue. The idea is good. However, we are using Semantic Version 2.0, which means that if we implement .cif download in pdb_fecth it would be a break in compatibility because something that was throwing an error before now would not - which would require bumping to version v3. :scream:

What about pdb_fetchcif ?

Or is this cif downloading feature beyond pdb-tools scope? @JoaoRodrigues

rvhonorato commented 2 years ago

Thanks for your review, I'll close this once since my initial description was for a behavior and the issue is now become a discussion.

Thanks again for your time :)