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

first draft of solution to selaltloc bug #154

Closed mgiulini closed 1 year ago

mgiulini commented 1 year ago

Closes #153 by adding an if-clause on the ' ' key in flush_resloc_occ function.

mgiulini commented 1 year ago

Two tests do not pass, namely:

pdb_selaltloc data/dummy_altloc.pdb
pdb_selaltloc data/dummy_altloc2.pdb

@joaomcteixeira could you please check them?

according to the old implementation the residue ILE 25 should be excluded, but in my opinion that's wrong.

Please check this PR carefully, as I didn't fully understand the quite complicated logic of the algorithm.

joaomcteixeira commented 1 year ago

Thanks Marco,

Sorry to ask, but could you please add the test cases for the example we are trying to solve, along with some testing PDBs? Otherwise will be very difficult to review and test the code. pdb-tools is one of those projects we really need to go along with test-driven development; otherwise, we are lost because there are so many cases.

I will look into the detail of those tests you referred to, but those have been so inspected in the past, yet a bug could have gone along.

Cheers,

mgiulini commented 1 year ago

hi Joao, a reference case is already present in #153, I copied part of that file in the tests/data folder and implemented a new test.

Cheers, Marco

joaomcteixeira commented 1 year ago

Thanks, I will look at it asap.

mgiulini commented 1 year ago

hi @joaomcteixeira , do you have updates on this?

joaomcteixeira commented 1 year ago

Not yet, sorry. Will try doing it asap.

joaomcteixeira commented 1 year ago

Closing in favor of #156