cersonsky-lab / AniSOAP

Library for computing anisotropy extension to SOAP descriptors
Apache License 2.0
8 stars 1 forks source link

Porting pairwise computation to Rust language + Caching CGR computation #16

Closed YCC-ProjBackups closed 1 year ago

YCC-ProjBackups commented 1 year ago
  1. Ported parts related to pairwise computation to Rust for faster performance
  2. Cache CGR-related matrices with CGRCacheList to prevent unnecessary re-computation

Further testing is required to see how much the performance has improved with these changes.

YCC-ProjBackups commented 1 year ago

Hi @YCC-ProjBackups! In general this looks very, very nice. Only thing I seem to be missing is just an equivalence test, showing that the two forms of moment generation yield the same thing. While programmatically everything looks in order, this is a good check to have to make sure we haven't broken anything. Can you add something to that effect?

There actually is a equivalence test... kind of. In tests/time_results folder, there are two files called res_cmp_python.csv and res_cmp_rust.csv. These two files save the output (the result) after running the original version (Python) and the ported version (Rust). If you do diff res_cmp_python.csv res_cmp_rust.csv in the terminal, nothing should come up in the terminal, meaning two implementations indeed lead to the same result.