-
Notifications
You must be signed in to change notification settings - Fork 768
feat: Add support for reading unit cell dimensions from MOL2 CRYSIN records #5187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: Add support for reading unit cell dimensions from MOL2 CRYSIN records #5187
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5187 +/- ##
===========================================
- Coverage 92.72% 92.72% -0.01%
===========================================
Files 180 180
Lines 22475 22482 +7
Branches 3190 3191 +1
===========================================
+ Hits 20841 20846 +5
- Misses 1177 1179 +2
Partials 457 457 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Dreamstick9 can you link to the document that describes the That may help with reviewing. Also make sure that you address all points in the checklist (eg, add a note to the docs, add an entry to CHANGELOG). Reviewing PRs takes a lot of time and time is really precious so show reviewers that you've done all the necessary work. |
|
I implemented this based on the official Tripos mol2 file format specification, the @crysin record is defined the the standard manual in page 17 of the pdf(https://github.com/UnixJunkie/mol2-file-format-spec/blob/master/mol2.pdf). the test case added in mol2_crysin was for this specification. this record is the standard method for defining periodic boundary conditions in the format (see "Data Record Format" in the spec). Thanks for the review @orbeckst |
378627a to
edfa9c3
Compare
Fixes #3341
Changes made in this Pull Request:
Implemented logic in MOL2Parser (package/MDAnalysis/coordinates/MOL2.py) to parse @CRYSIN records.
Extracted unit cell dimensions (lengths and angles) from the CRYSIN block and assigned them to ts.dimensions.
Added a new test data file with a CRYSIN record: testsuite/MDAnalysisTests/data/mol2/test_crysin.mol2.
Registered the new test file in testsuite/MDAnalysisTests/datafiles.py.
Added a regression test test_mol2_crysin_dimensions in testsuite/MDAnalysisTests/coordinates/test_mol2.py to verify dimensions are loaded correctly.
PR Checklist
[x] Issue raised/referenced?
[x] Tests updated/added?
[ ] Documentation updated/added?
[ ] package/CHANGELOG file updated?
[ ] Is your name in 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--5187.org.readthedocs.build/en/5187/