theochem / fanpy

Projectively-optimized geminal and "fancyCI" wavefunctions
Other
17 stars 2 forks source link

Where to place overlap cache #92

Open kimt33 opened 5 years ago

kimt33 commented 5 years ago

At the moment, the cached functions _olp and _olp_deriv are stored in the _cache_fns attribute. This attribute is created in the __init__ of the class of wavefunctions that will be caching the overlaps (and its derivative). This approach seems to be quite ugly and I think can be cleaned up a bit.

Maybe it'll be better to give the option of caching the overlaps to all wavefunctions and let the user decide accordingly. This would suggest that the _cache_fns be moved to the load_cache method.