feat: add `zone` selection to support a box like selection from given selection
Description:
It introduces a new geometry selection, as described in #4323. A new selection language is defined in format:
box dimension(s) d1_min d1_max (d2_min d2_max) (d3_min d3_max) selection
It could pick a zone from the center of geometry from selection.
Changes made in this Pull Request:
- Add new geometry selection: box
PR Checklist
- [x] Tests?
- [x] Docs?
- [x] CHANGELOG updated?
- [x] Issue raised/referenced?
Developers certificate of origin
- [x] I certify that this contribution is covered by the LGPLv2.1+ license as defined in our LICENSE and adheres to the Developer Certificate of Origin.
:books: Documentation preview :books:: https://mdanalysis--4324.org.readthedocs.build/en/4324/
Hello @Cloudac7! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file
package/MDAnalysis/core/groups.py:
Line 3274:80: E501 line too long (99 > 79 characters) Line 3275:80: E501 line too long (84 > 79 characters) Line 3278:75: W291 trailing whitespace Line 3279:78: W291 trailing whitespace
- In the file
package/MDAnalysis/core/selection.py:
Line 562:80: E501 line too long (83 > 79 characters) Line 567:80: E501 line too long (83 > 79 characters) Line 572:80: E501 line too long (83 > 79 characters)
Line 823:80: E501 line too long (82 > 79 characters) Line 836:40: W291 trailing whitespace Line 837:32: W291 trailing whitespace Line 841:40: W291 trailing whitespace Line 842:32: W291 trailing whitespace Line 846:39: W291 trailing whitespace Line 847:32: W291 trailing whitespace Line 851:39: W291 trailing whitespace Line 852:32: W291 trailing whitespace
Comment last updated at 2024-07-25 04:03:36 UTC
Linter Bot Results:
Hi @Cloudac7! Thanks for making this PR. We linted your code and found the following:
Some issues were found with the formatting of your code.
| Code Location | Outcome |
|---|---|
| main package | ⚠️ Possible failure |
| testsuite | ⚠️ Possible failure |
Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/10087944018/job/27892893090
Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!
Codecov Report
Attention: Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.
Project coverage is 93.60%. Comparing base (
1bf58cc) to head (3f4f619). Report is 3 commits behind head on develop.
| Files | Patch % | Lines |
|---|---|---|
| package/MDAnalysis/core/selection.py | 97.95% | 0 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #4324 +/- ##
===========================================
- Coverage 93.61% 93.60% -0.02%
===========================================
Files 171 183 +12
Lines 21250 22369 +1119
Branches 3936 3951 +15
===========================================
+ Hits 19893 20938 +1045
- Misses 898 971 +73
- Partials 459 460 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@richardjgowers I am tentatively assigning the PR to you for shepherding it through. If it's too much then please unassign yourself and ping me. Thanks.
@richardjgowers could you have a look if @Cloudac7 addressed the reviewers' comments? Thanks!
@richardjgowers could you please have another look?
today on discord someone asked for this feature so I was reminded of this PR…
@Cloudac7 could you please resolve the conflicts?
Sorry that this has been very slow from our end.