Skip to content

ENH: support GMX linear angle potential#5372

Open
tylerjereddy wants to merge 3 commits into
MDAnalysis:developfrom
tylerjereddy:treddy_issue_5361
Open

ENH: support GMX linear angle potential#5372
tylerjereddy wants to merge 3 commits into
MDAnalysis:developfrom
tylerjereddy:treddy_issue_5361

Conversation

@tylerjereddy

@tylerjereddy tylerjereddy commented May 3, 2026

Copy link
Copy Markdown
Member
  • Fixes Should support Linear Angle parse #5361.

  • Add support for parsing linear angle potentials in GMX TPR files. As described in the GMX docs linked in the matching issue, these are useful for planar molecules like CO2.

  • TPR position and angle data-related regression tests have been added. I did check that the angle data test fails before the patch applied here.

  • I believe there may be a serious unit/scaling issue in the TPR coordinate parser, but I'll open a separate ticket about that since it is not directly related.

LLM / AI generated code disclosure

No AI usage here.

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS? (If it is not, add it!)
  • LLM/AI disclosure was updated.

Developers Certificate of Origin

I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.


📚 Documentation preview 📚: https://mdanalysis--5372.org.readthedocs.build/en/5372/

* Fixes MDAnalysisgh-5361.

* Add support for parsing linear angle potentials in GMX
TPR files. As described in the GMX docs linked in the matching
issue, these are useful for planar molecules like CO2.

* TPR position and angle data-related regression tests have been added.
I did check that the angle data test fails before the patch applied
here.

* I believe there may be a serious unit/scaling issue in the TPR
coordinate parser, but I'll open a separate ticket about that since
it is not directly related.
Comment thread testsuite/MDAnalysisTests/coordinates/test_tpr.py
@codecov

codecov Bot commented May 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.86%. Comparing base (523c853) to head (42c7425).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5372   +/-   ##
========================================
  Coverage    93.85%   93.86%           
========================================
  Files          182      182           
  Lines        22509    22509           
  Branches      3202     3202           
========================================
+ Hits         21125    21127    +2     
+ Misses         922      921    -1     
+ Partials       462      461    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@orbeckst orbeckst 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.

Please add CHANGELOG entry. Otherwise all looks perfect.

Comment thread testsuite/MDAnalysisTests/coordinates/test_tpr.py
@orbeckst orbeckst mentioned this pull request May 30, 2026
8 tasks
Comment thread package/CHANGELOG
Comment on lines +63 to +64
* Read Linear Angle bonded interaction entries from GROMACS TPR files and
add the angles to the topology (Issue #5361, PR #5372)

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.

@tylerjereddy please check that you're happy with the entry

@orbeckst

Copy link
Copy Markdown
Member

black is not happy but I think it really just wants to completely reformat tpr/util.py so I am happy to ignore the linter here

@tylerjereddy

Copy link
Copy Markdown
Member Author

@tylerjereddy please check that you're happy with the entry

@orbeckst yeah, the CHANGELOG adjustment seems "ok," thanks. One concern I had when working on this was the addition of a binary file asset from someone that I don't think we know. We'd have to do some work to avoid that--hard to judge the balance of supply chain security and our time. I suppose we could start asking for minimal text files/incantations to regenerate the desired .tpr files in the future (then we could confirm the hashes, etc.).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should support Linear Angle parse

2 participants