I am implementing some computational chemistry labs that we were previously running with a commercial code using psi4 and jupyter. It seems almost all steps we used to follow can be adapted properly, however, the memory usage seems to be too large and never released. Namely, after running and SCF calculation, the orbitals are printed to cube files. This actually takes a big amount of memory for each file generated.
It seems this is a known issue related to the fact that CPython is not able to release memory while running (rather than a problem on Psi4 side) and I think I can solve it by running the writing step on a child process using the
multiprocessing module as suggested here. Anyway, I was wondering if anyone has a better alternative to reduce memory usage.