Repository navigation
Conversation
harryswift01
left a comment
There was a problem hiding this comment.
Thanks for adding this in, I think this will be a great addition to see all conf_type options in, and the dihedral methods are much easier to follow now that they're in their own module. I've left a few comments. The main one is on line 265: I'm not sure get_chain is doing what we intended there, so it'd be good to get your thoughts on that one. The other two are just small tidy-ups and not blockers.
| if len(edges) == 1: | ||
| backbone += edges | ||
| elif len(edges) == 2: | ||
| chain = self._axes.get_chain(residue, edges[0], edges[1]) |
There was a problem hiding this comment.
I've just had a check of get_chain and I'm not sure this is doing what we intended. It returns only the intermediate atoms and leaves out the edges (chain[1:-1] at axes.py:1173), so the edge atoms never get added to the backbone here.
There was a problem hiding this comment.
Good spot. The get_chain function is acting as it should. I have fixed dihedral_finder so that the dihedrals are what was intended for ua_backbone method.
| """ | ||
| atom_groups: list[Any] = [] | ||
|
|
||
| if level == "united_atom": |
There was a problem hiding this comment.
This united-atom block looks identical in all four methods (also 121, 184 and 240). Since conf_type only changes the residue level, could it just live once in topology._get_dihedrals?
| List of AtomGroups, each representing a dihedral definition. | ||
| """ | ||
| atom_groups: list[Any] = [] | ||
| self._dihedral_definitions = DihedralDefinitions() |
There was a problem hiding this comment.
This creates a new DihedralDefinitions (and an AxesCalculator) on every call. Could it be set up once in __init__ instead?
Summary
This pull request adds different options for ways to define residue level dihedrals for the conformational entropy calculation. Residue level dihedrals are lacking a standard definition unlike atomistic dihedrals.
Changes
Testing
Impact
Checklist
pyproject.tomlchanged, the lower bounds were reviewed deliberately