Skip to content

Change customised_axes arg to str axes arg - #489

Merged
ioanaapapa merged 16 commits into
mainfrom
426-axis-argument
Nov 12, 2026
Merged

ioanaapapa merged 16 commits into
mainfrom
426-axis-argument

Conversation

@ioanaapapa

@ioanaapapa ioanaapapa commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR changes the boolean customised_axes argument to the string axes argument that can take the values "local", "principal" and "topology". This closes issue #426.

Changes

  • Local axes (introduced in PR Introduce Bonded Residue Rotation Axes / UA Translation Axes #397 for non-terminal residues and PR [Feature]: Axes for terminal residues #399 for terminal residues) are the default. Previously, customised_axes True was the default and this defaulted to cached topology axes.
  • Axes from the cached topology are used with the "topology" argument. This entails principal axes for polymer translation + rotation, principal axes of polymer for residue translation, principal axes of residue for residue rotation, principal axes of residue for UA translation, bond derived axes for UA rotation. Axes are derived from cached topology rather than MDAnalysis selections at each frame.
  • Locally defined axes are used with the "local" argument. This entails principal axes for polymer translation + rotation, principal axes of polymer for residue translation, local residue axes for residue rotation, local residue axes for UA translation, bond derived axes for UA rotation.
  • Principal axes of the appropriate bead are used with the "principal" argument. This entails principal axes for polymer translation + rotation, principal axes of polymer for residue translation, principal axes of residue for residue rotation, principal axes of residue for UA translation, principal axes of UA for UA rotation.
  • Docstrings were changed to match changes.

Testing

  • Regression tests were updated and passing.
  • Unit tests were updated and passing.
  • Checked manually that the appropriate functions were called.

Impact

  • Local axes are now accessible to users.

Checklist

  • [ x] Tests added or updated
  • [ x] Documentation updated
  • [ x] If dependencies in pyproject.toml changed, the lower bounds were reviewed deliberately

@harryswift01 harryswift01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great addition to ensure that users are able to choose their own axes when running a CodeEntropy calculation. It looks like everything has now been accounted for and the unit and regression tests as well as the docs have been updated so I'm happy to see this merge, thanks for this!

@harryswift01 harryswift01 added documentation Improvements or additions to documentation feature request New feature or request labels Nov 12, 2026
@ioanaapapa
ioanaapapa merged commit 62f638a into main Nov 12, 2026
23 checks passed
@ioanaapapa
ioanaapapa deleted the 426-axis-argument branch November 12, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants