Skip to content

Change residue level MOI calculation to all atom - #445

Open
ioanaapapa wants to merge 4 commits into
mainfrom
441-all-atom-MOI-refactored
Open

ioanaapapa wants to merge 4 commits into
mainfrom
441-all-atom-MOI-refactored

Conversation

@ioanaapapa

Copy link
Copy Markdown
Collaborator

Summary

This PR closes #441 and changes the MOI calculation at the residue level to use all atoms masses and positions, rather than heavy atom positions and UA (heavy atom + hydrogens) masses. This corresponds to what we discussed in the CodeEntropy catch up meeting on 8 October 2026.

Changes

  • When the residue level is the highest level of hierarchy, rotation axes correspond to vanilla principal axes and moment of inertia corresponds to vanilla all-atom moment of inertia from diagonals of MOI tensor.
  • When the residue level is below the polymer level, the get_custom_residue_moment_of_inertia function uses all atom positions and masses.
  • Regression tests have been updated to match the changes.

Impact

  • Moment of inertia calculation is consistent between levels and is consistent with torque calculation at all levels of hierarchy.
  • Entropy values are slightly higher, as below for one benzene molecule and 1 protein.
    benzene_MOIs.txt
    thioredoxin.txt

This branch has not been deployed

No deployments
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]: Consistent all atom moments of inertia (MOI) and torques

1 participant