-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speeding up
get_nn_info
in local_env.py (#3635)
* Checks if image and index attributes exist before recomputing `_get_image` and `_get_original_site` do not need to recompute site and index when `site` is a `PeriodicNeighbor` which has them as attributes. * pre-commit auto-fixes * Removed np.mod of fractional coordinates before call to get_points_in_sphere If the modulo is present the image returned by get_points_in_sphere does not point to the original site. * change "Site not found" exception to ValueError * Fixed site variable used twice --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Janosh Riebesell <[email protected]>
- Loading branch information
1 parent
bd88e0d
commit 38b9b58
Showing
2 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters