Closed brianjimenez closed 2 years ago
Also happening when using pdbtbx::StrictnessLevel::Strict
That is very interesting I will take a look, thanks for raising the issue!
Okay I found it, in the parsing code the conformer ID (Residue Name) was not properly trimmed. This meant that for each atom in the residue there was a separate conformer. This in the end made it so that the library duplicated the last atom so that it would be present in all conformers.
I added your PDB and example code to the tests to make sure this bug cannot ever surface again. Thanks again for raising the issue.
That was fast! Thank you @douweschulte for your quick reply and fix. Any plans to release a new version on crates.io any time soon?
I will create a new patch version later today. But if you need it for use in a rust project it is also possible to link to a git repo directly instead of a package on crates.io.
Awesome, just seen it on crates.io 📦 Thanks a lot! 🍻
When trying to parse a nucleic structure in PDB format, it seems than the number of atoms found is bigger than the number of the actual atoms in the PDB file. It seems from a few tests that hydrogen atoms are added multiple times to the internal PDB object.
Here it is a code showing the problem:
And these are the last 10 lines of the output:
I've prepared the full test ready to be executed: test_pdbtbx.tar.gz
Thank you in advance for your support, congratulations on the great work coding this library!