Skip to content
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

Remove global search flag #1039

Merged
merged 9 commits into from Jan 25, 2023
Merged

Remove global search flag #1039

merged 9 commits into from Jan 25, 2023

Conversation

tommy-waltmann
Copy link
Collaborator

Description

This PR removes the global_search flag in EnvironmentCluster, in favor of having users just give a neighborlist where every particle is a neighbor of every other particle.

Motivation and Context

This PR makes the API more intuitive and less confusing.

Resolves: #984

How Has This Been Tested?

I have converted a previous test that used the global_search=True option.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds or improves functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation improvement (updates to user guides, docstrings, or developer docs)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • I have updated the documentation (if relevant).
  • I have added tests that cover my changes (if relevant).
  • All new and existing tests passed.
  • I have updated the credits.
  • I have updated the Changelog.

@vyasr
Copy link
Collaborator

vyasr commented Nov 26, 2022

@tommy-waltmann I didn't remember to mention this in earlier PRs, but one thing that might be helpful to maintain continuously on the next branch is some sort of migration guide. We can expand on it when it's actually time for the 3.0 release, but it would be helpful during each PR to maintain some minimal notes for how users should adapt to the change. In the case of removing global_search, it can be emulated by constructing a NeighborList of all pairs of particles as neighbors.

@tommy-waltmann
Copy link
Collaborator Author

tommy-waltmann commented Nov 28, 2022

@tommy-waltmann I didn't remember to mention this in earlier PRs, but one thing that might be helpful to maintain continuously on the next branch is some sort of migration guide. We can expand on it when it's actually time for the 3.0 release, but it would be helpful during each PR to maintain some minimal notes for how users should adapt to the change. In the case of removing global_search, it can be emulated by constructing a NeighborList of all pairs of particles as neighbors.

@vyasr That already exists, it's in doc/source/gettingstarted/migration.rst.

@vyasr
Copy link
Collaborator

vyasr commented Nov 29, 2022

Right sorry I forgot that we added that in #1013. In that case the action item would be to update migration.rst for this change as well (but I also see that this PR is a draft so no rush, I just did a batch review this weekend).

@tommy-waltmann tommy-waltmann marked this pull request as ready for review January 9, 2023 15:08
@tommy-waltmann tommy-waltmann requested a review from a team as a code owner January 9, 2023 15:08
@tommy-waltmann tommy-waltmann requested review from vyasr and removed request for a team January 9, 2023 15:08
@tommy-waltmann tommy-waltmann added this to the v3.0.0 milestone Jan 9, 2023
@tommy-waltmann tommy-waltmann mentioned this pull request Jan 18, 2023
11 tasks
Copy link
Collaborator

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor comments but otherwise LGTM.

@@ -32,3 +32,6 @@ Overview of API Changes
* - Create a custom neighborlist from arrays.
- ``freud.locality.NeighborList.from_arrays(..., distances=...)``
- ``freud.locality.NeighborList.from_arrays(..., vectors=...)``
* - Compare environments of all particle pairs with ``EnvironmentCluster``.
- ``env_cluster.compute(..., global_search=True)``
- ``env_cluster.compute(..., neighbors=all_pairs_nlist, ...)``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth showing how to construct all_pairs_nlist. Depends on #1051's new feature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. However, I'd like to wait until we have an official release out with the changes from #1051 on it before adding the utility method in the example.

tests/test_environment_MatchEnv.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants