ChemBioHTP / EnzyHTP

EnzyHTP is a python library that automates the complete life-cycle of enzyme modeling
https://enzyhtp-doc.readthedocs.io
Other
8 stars 1 forks source link

Fix PyMOL Saving Issues #120

Closed seb124 closed 10 months ago

seb124 commented 11 months ago

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).

shaoqx commented 11 months ago

Great job fixing the 2 issues! I pointed out some design that we can improve.