plumed / plumed2

Development version of plumed 2
https://www.plumed.org
GNU Lesser General Public License v3.0
323 stars 269 forks source link

Optimized EMST setup #1053

Closed GiovanniBussi closed 2 months ago

GiovanniBussi commented 3 months ago

Avoid doing searches by atom number in the PDB for every distance calculation.

Only relevant for startup, not for the following calculation, but given the scaling of the EMST calculation with the number of atoms I think it's relevant. I didn't make precise timings, but my understanding is that:

The additional *log(N_PDB) comes from the need to search the index of each atoms in the PDB in the inner loop.

I tested on this input:

MOLINFO STRUCTURE=1s72.pdb WHOLE # big PDB with ~ 90k atoms
WHOLEMOLECULES ENTITY0=1-100000 EMST

Startup time decreases from ~ 12 minutes to ~ 25 seconds.

@maxbonomi let me know if you have any concerns with merging this

Target release

I would like my code to appear in release v2.10

codecov-commenter commented 3 months ago

Codecov Report

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

Project coverage is 83.33%. Comparing base (103d111) to head (2458078).

:exclamation: Current head 2458078 differs from pull request most recent head 028767e. Consider uploading reports for the commit 028767e to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1053 +/- ## ========================================== + Coverage 83.30% 83.33% +0.02% ========================================== Files 628 628 Lines 59990 59995 +5 ========================================== + Hits 49976 49996 +20 + Misses 10014 9999 -15 ```

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