haddocking / pdb-tools

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

pdb_selres should allow for selecting a unique residue #28

Closed mtrellet closed 5 years ago

mtrellet commented 5 years ago

Describe the bug When using the same residue ID as an argument, pdb_selres script returns the following error: ERROR!! Start (11) cannot be larger than end (11)

To Reproduce

pdb_fetch.py 4G6K | pdb_selres -11:11
ERROR!! Start (11) cannot be larger than end (11)

Expected behavior Residue(s) with ID 11 should be selected and returned

Desktop (please complete the following information):

mtrellet commented 5 years ago

I'd suggest we allow pdb_selres to select a unique residue since, as far as I know, we do not have similar script to do so.

JoaoRodrigues commented 5 years ago

Good catch. Could you add a test for that as well to test_pdb_selres? Your commit (why not PR?) looks good!