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

Improve distance calculation speed for small systems #307

Open
dnlbauer opened this issue Apr 16, 2021 · 2 comments
Open

Improve distance calculation speed for small systems #307

dnlbauer opened this issue Apr 16, 2021 · 2 comments
Assignees

Comments

@dnlbauer
Copy link
Collaborator

The current implementation of various functions (i.e. RDF) uses a cell list approach to calculate distances between two selections. However, this approach tends to be very slow for some edge cases such as:

  • systems with low number of particles
  • if one of the two selections is very small

In these cases, a bruteforce based approach is usually faster. It would be nice if biotite had some heuristic to switch between the two methods based on the given problem.

@padix-key
Copy link
Member

To find a good heuristic might be quite challenging, but I will start with an optional use_cell_list parameter.

@padix-key
Copy link
Member

padix-key commented May 18, 2021

This PR should fix the issue for the rdf() function. All other currently implemented functions, that use a CellList always need a large number of pairwise distances, so a brute-force witch is not required in those cases, in my opinion. Furthermore, PR #311 also increases the performance of the cell list based approach.

@padix-key padix-key self-assigned this Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants