Fixes issues #117 and #118 by adding 2 functions under structure.py:
fix_pymol_naming: loops through every Atom in the Structure and updates names of atoms if they are in the PYMOL_TO_STRU dictionary, which was added under chemical/residue.py.
order_to_stru: takes two Structures (stru and ordered_stru). Compares residues between both, and if they are the same, updates the order of stru to match ordered_stru.
Also added/updated tests for both of these functions and implemented the two functions into export_pdb and export_enzy_htp_stru, respectively. Now, when a Structure is saved from PyMOL, it will have the same order and naming as the original Structure passed in (excluding mutated regions, where only the naming will be consistent with that of the Structure class).
Fixes issues #117 and #118 by adding 2 functions under structure.py:
fix_pymol_naming
: loops through every Atom in the Structure and updates names of atoms if they are in thePYMOL_TO_STRU
dictionary, which was added under chemical/residue.py.order_to_stru
: takes two Structures (stru
andordered_stru
). Compares residues between both, and if they are the same, updates the order ofstru
to matchordered_stru
.Also added/updated tests for both of these functions and implemented the two functions into
export_pdb
andexport_enzy_htp_stru
, respectively. Now, when a Structure is saved from PyMOL, it will have the same order and naming as the original Structure passed in (excluding mutated regions, where only the naming will be consistent with that of the Structure class).