ENH: support GMX linear angle potential#5372
Conversation
* 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.
| ( | ||
| TPR_linear_angle, | ||
| [1.250, 1.250, 1.250], | ||
| [1.250, 1.260, 1.136], |
There was a problem hiding this comment.
I think we may have a problem here with the TPR coordinate parsing using nm instead of MDA A units. The correponding .gro file has nm units which match our parse here, but I don't think we want to match nm?
CO2 hydrate + Mix(CO2 + H2O)
3
1CO2 C 1 1.250 1.250 1.250
1CO2 O1 2 1.250 1.239 1.365
1CO2 O2 3 1.250 1.260 1.136
2.50000 2.50000 2.50000
There was a problem hiding this comment.
That's a separate matter if I'm right though..
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
orbeckst
left a comment
There was a problem hiding this comment.
Please add CHANGELOG entry. Otherwise all looks perfect.
| ( | ||
| TPR_linear_angle, | ||
| [1.250, 1.250, 1.250], | ||
| [1.250, 1.260, 1.136], |
| * Read Linear Angle bonded interaction entries from GROMACS TPR files and | ||
| add the angles to the topology (Issue #5361, PR #5372) |
There was a problem hiding this comment.
@tylerjereddy please check that you're happy with the entry
|
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 |
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
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)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/