PDB information lost with trjconv
If one gives a PDB file as input to trjconv, PDB-specific information such as insertion codes, occupancies and beta factors are not written to the output. Instead, the output always contains 1.0 occupancy and 0.0 beta factor. This is because the pdbinfo field in the t_atoms structure is not initialized/propagated properly.
Enable 4-letter resname in PDB output, keeps more pdbinfo.
This still fully adheres to the PDB standard since column 21
is not used by the standard. All common programs (PyMol, VMD, etc)
understand the 4-letter format, and programs that only read three
letters will still read the same filename as they used to. In
particular, this conserves most residue names during pdb<->gro
format conversions. We have also killed the non-standard
wide pdb format to avoid writing broken PDB files.
Improve PDB I/O (keep occupancy, b-factor, element)
Retain the extra PDB info such as occupancy, b-factors,
and element name columns with trjconv when providing a
PDB structure file. If you use a TPR file, we still
write the (given atomnumbers being present).
However, we deliberately don't store the pdbinfo in the
TPR file since that is a specification for a particular
experiment, rather than something that's valid in the
#2 Updated by Erik Lindahl over 5 years ago
- Status changed from New to Fix uploaded
- Affected version set to 5.0
Mostly fixed by https://gerrit.gromacs.org/#/c/3481/ .
This now works fine if we use a PDB file for the -s argument to trjconv (and always with PDB input to editconf).
However, after some deliberation I decided we do not want to embed the pdbinfo in the binary topology (so it can be extracted and used when we use a TPR file for the -s argument to trjconv). To a smaller part this was lazyness (it would require a new TPR version and recreating all reference files), but the main reason is that it would be a misrepresentation: In particular the occupancy and b-factors represent properties in the experiment, but not the simulation we are doing - there the occupancy is always 1.0, and the b-factor is a varying property we can calculate. If we embed this in the TPR file we would later generate PDB output that had completely incorrect occupancy and b-factors, and I think that is worse than the minor inconvenience of having to use a PDB file as -s argument reference for the handful of cases where we absolutely want it.