write.pdb print segment left-justified
Issue #402
resolved
Dear developers
We noticed a bug in the write.pdb function when the flag print.segid is TRUE. According to the PDB format guide the segments should be left justified, but in the original function they are right justified.
We fixed the problem by copying the write.pdb function and replacing the following lines (128 to 131):
format <- "%-6s%5s %-3s%1s%-4s%1s%4s%1s%3s%8.3f%8.3f%8.3f%6.2f%6.2f%6s%4s%2s%2s"
if (nchar(elety) > 3) {
format <- "%-6s%5s %-4s%1s%-4s%1s%4s%1s%3s%8.3f%8.3f%8.3f%6.2f%6.2f%6s%4s%2s%2s"
}
by:
format <- "%-6s%5s %-3s%1s%-4s%1s%4s%1s%3s%8.3f%8.3f%8.3f%6.2f%6.2f%6s%-4s%2s%2s"
if (nchar(elety) > 3) {
format <- "%-6s%5s %-4s%1s%-4s%1s%4s%1s%3s%8.3f%8.3f%8.3f%6.2f%6.2f%6s%-4s%2s%2s"
}
We believe this could be easily changed in the next version of bio3d.
cheers
Mauricio Costa and Leo Bastos
Comments (3)
-
-
Great spot guys - thanks!
-
- changed status to resolved
Resolved with commit 2d3a667.
- Log in to comment
Hi Mauricio and Leo,
Thanks for reporting this! We will update the development version soon and include the bugfix in next patched release.