The old RWBROOK (Fortran) interface to PDB I/O seems to strip leading white space from the atom name field while reading ATOM records, but does not put it back when writing ATOM records. As a result, applications that read and write PDB files using this interface--mainly Fortran programs in sci-chemistry/ccp4-apps I guess--produce broken results. Reproducible: Always Steps to Reproduce: 1. echo "chain A X\nend\n" | pdbset XYZIN has-chain-A.pdb XYZOUT has-chain-X.pdb 2. diff has-chain-A.pdb has-chain-X.pdb Actual Results: The atom name field of the output file is shifted one column to the left. Expected Results: All chains except chain A unchanged. The proposed patch was generated by a diff of the CCP4 mmdb source and the sources from the ebuild, and also addresses other issues not covered in this bug. While the patch does change the behaviour of the library without changing its interface, all ebuilds that depend on sci-libs/mmdb seem to be related to CCP4 in one way or another so its application should be safe. I'm not sure though how to deal with upstream, in this particular case? While developed by Eugene Krissinel, he says the official version is distributed by CCP4, but the autotooled distribution in the ebuild comes from Paul Emsley. Furthermore, the CCP4 mmdb sources include what seems to be half a SWIG-generated Python interface to mmdb (only the C++, not the Python part). Since I'm pretty sure this is useless on it's own, maybe the issue should be raised with CCP4 upstream as well?
Created attachment 227843 [details, diff] CCP4 patches to sci-libs/mmdb.
Thanks for the patch, included.