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

Bond assignment is not fast enough #163

Open
4 tasks
eahenle opened this issue Jul 13, 2022 · 1 comment
Open
4 tasks

Bond assignment is not fast enough #163

eahenle opened this issue Jul 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@eahenle
Copy link
Collaborator

eahenle commented Jul 13, 2022

Bonding needs to be faster. To bond a 6*6*7 UiO-66, for example, takes about 90 minutes. Bonding the 1*1*1 cell takes 18 seconds.

Four ways to increase speed:

  • Parallelism. Find adjacency lists for subsets of atoms on different processes and build the graph for the complete crystal by combining them (map-reduce).
  • Less branching. Using Boolean algebra instead of conditional logic can probably give a speed boost in the nearest-image distance calculation.
  • Fewer calculations. If any one coordinate's nearest-image distance is too large, there is no need to calculate the 3D vector displacement. Pro: would avoid many square-root operations. Con: may be incompatible with previous point about branching.
  • Implement replication of bonded cells. Doesn't solve the problem directly, but enables avoidance of the problem. Replicating the 111 cell's graph to 667 should be possible in much less time than calculating the 667 graph directly.
@eahenle
Copy link
Collaborator Author

eahenle commented Feb 7, 2023

Also, can bonding rules be handled via a matrix, instead of a huge list of structs? Deciding if two atoms are bonded currently means searching over 4k rules. Instead, the bond rule matrix could be constructed ahead of time, and then it would just be a matter of looking up the value at the correct indices.

@eahenle eahenle added the enhancement New feature or request label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant