Molara-Lab / Molara

Molara is a Python package for the visualization of chemical structures such as molecules or crystals. It provides a graphical user interface for importing structures from output files of popular computational chemistry software as well as for creating custom structures.
GNU General Public License v3.0
11 stars 0 forks source link

Accelerated bond calculation #310

Closed adrianusler closed 4 months ago

adrianusler commented 4 months ago

See benchmark problem in issue #309. For the 25x25x25 supercell, Molara used to take ~18 seconds only for the calculation of the bonds (longer than the subsequent rendering!). For the same problem, it now takes ~1.85 seconds. This acceleration is achieved by using the query_pairs routine from scipy.spatial.cKDTree. With this, the rendering is the bottleneck again (as it should be, I guess).

Closes #309. Ready to merge!

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 27.28%. Comparing base (e6f0ec7) to head (da13feb).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #310 +/- ## ========================================== + Coverage 27.21% 27.28% +0.06% ========================================== Files 37 37 Lines 3123 3126 +3 ========================================== + Hits 850 853 +3 Misses 2273 2273 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.