mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-07 22:44:25 +08:00
* Fix PDB formatting if residue name is set but atom name is not. * additionally, sets the width of the atom name to 4. If the name is set to something shorter than 4 letters, fill up with whitespace. This avoids bad column alignment. If the name is set to something with more than 4 characters, the PDB will still be invalid. * Add a test for missing residue name and short atom names * Fix atom name alignment in unit test * Small updates to PDB line formatting, add a unit test * Truncate residue names to 3 letters, and atom names to 4 * Add a unit test to ensure that atom and residue names are truncated. * Switch from std::array<char, 2> to std::string for the atom number. * Use name.empty() instead of name.size() == 0 --------- Co-authored-by: Franz Waibl <waiblfranz@gmail.com>