forked from rdkit/rdkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve PDB formatting with incomplete Monomer info (rdkit#7286)
* 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>
- Loading branch information
Showing
2 changed files
with
96 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters