Merge pull request #5157 from RosettaCommons/vmullig/improve_d_aa_import
Improve import of D- and L-amino acids that cannot be distringuished by 3-letter code
D-amino acids that are mirror images of canonical L-amino acids have unique three-letter codes in Rosetta, and certain noncanonicals have also been given distinct three-letter codes. With only three letters to play with, though, it's not possible to ensure that omitting the third letter and prepending "D" would generate a unique three-letter code. (Even with the canonical amino acids, this would create name conflicts: "DAS" would be the code for both D-Asp and D-Asn, if we hadn't manually specified that the latter would be "DAN".) For this reason, Rosetta doesn't even try to assign unique three-letter codes when it auto-generates D-amino acid versions of canonical L-amino acids; it just keeps the same three-letter code for both. This creates problems on read-in.
This pull request ensures that if a structure is read in containing an alpha-, beta-, or gamma-amino acid for which the L- and D-amino acid three-letter codes are the same, the chirality is auto-determined by calling Andy's detect_ld_chirality_from_polymer_residue() function.
@everyday847 @dougrenfrew @JackMaguire