mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

feat: add `zone` selection to support a box like selection from given selection

Open Cloudac7 opened this issue 2 years ago • 7 comments

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


:books: Documentation preview :books:: https://mdanalysis--4324.org.readthedocs.build/en/4324/

Cloudac7 avatar Oct 25 '23 08:10 Cloudac7

Hello @Cloudac7! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

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

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

pep8speaks avatar Oct 25 '23 08:10 pep8speaks

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!

github-actions[bot] avatar Oct 25 '23 08:10 github-actions[bot]

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.

codecov[bot] avatar Oct 25 '23 09:10 codecov[bot]

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

orbeckst avatar Dec 15 '23 17:12 orbeckst

@richardjgowers could you have a look if @Cloudac7 addressed the reviewers' comments? Thanks!

orbeckst avatar Mar 25 '24 19:03 orbeckst

@richardjgowers could you please have another look?

today on discord someone asked for this feature so I was reminded of this PR…

orbeckst avatar Jul 19 '24 14:07 orbeckst

@Cloudac7 could you please resolve the conflicts?

Sorry that this has been very slow from our end.

orbeckst avatar Jul 19 '24 14:07 orbeckst