Skip to content

Residue Bonded Axes#319

Open
ioanaapapa wants to merge 17 commits intomainfrom
26-residue-bonded-axes
Open

Residue Bonded Axes#319
ioanaapapa wants to merge 17 commits intomainfrom
26-residue-bonded-axes

Conversation

@ioanaapapa
Copy link
Copy Markdown
Collaborator

Summary

This PR addresses issues #26 and #279 and introduces custom axes for residue level rotations/UA level translations.

Changes

  • DataContainer at the residue level now consists of the residue of interest alongside its neighbours. The residue_group data container contains two residues for the first and last residue (residue + the one neighbours), or three residues otherwise (residue + 2 neighbours).

  • Translation axes at UA level for molecules with multiple residues, are calculated the same way as residue level rotation axes.

  • New function get_chain in axes.py that identifies the shortest heavy-atom path between two heavy atoms in a given residue. This is used to define the backbone of a residue as the shortest path between heavy atoms bonded to neighbouring residues. For the first residue, it uses the first atom in the residue as the starting point, and for the last residue, it uses the last heavy atom with only one bond to another heavy atom as the ending point.
    For a protein, it finds the N,CA,C atoms. (+ O in the case of the last residue.)
    For a DNA molecule, it finds the chain shown in purple.

Screenshot 2026-04-13 092733 protein_backbone_output DNA_backbone_output DNA_backbone_structure
  • New function get_custom_residue_moment_of_inertia to calculate residue MOI in the coordinate frame of the custom rotation axes.

  • New function get_residue_custom_axes which computes the coordinate frame for a residue based on the two edge atoms (heavy atoms linearly bonded to neighbouring atoms) and centre.

resid_bonded_axes

Impact

  • Closes united atom translational axes #26 and [Feature]: Bonded Axes for residues #279
  • UA translation axes always match residue rotation axes. This should mean that translations and rotations at the residue level are correctly discarded when calculating UA transvibrational entropy.
  • Center of residue is now centre of mass of the backbone. The backbone can be identified for any molecule with bonded residues. This leads to higher entropy values than using the residue centre of mass.
  • Entropy values are close to values obtained using the NCC axes. NCC values presented for lysozyme, when calculated without force scaling and without coarse graining, match previous values obtained by Jas using Argo's older code. (https://doi.org/10.1002/prot.26411)
image image
  • The coordinate system is general and suitable for molecules such as DNA.

@ioanaapapa ioanaapapa linked an issue Apr 23, 2026 that may be closed by this pull request
@skfegan
Copy link
Copy Markdown
Member

skfegan commented Apr 23, 2026

Good work on getting the custom bonded axes to work for the residues!

Before it can be accepted, the tests will need fixing so that the CI passes. If you need help with the tests, please email me and we can arrange a meeting.

@ioanaapapa
Copy link
Copy Markdown
Collaborator Author

@skfegan Thank you! I think that would be good as I didn't want to change anything for the tests on my own. I will send you an email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Bonded Axes for residues united atom translational axes

2 participants