Overall, LASSIS does not have good memory management, because of the ad hoc way it was put together.
In LASSIS, the same fragment basis functions appears at multiple rootspace addresses, and to save memory one can just make a view instead of a copy. However, right at the end of lassis.prepare_states, this line
https://github.com/MatthewRHermes/mrh/blob/ab148b28e24f2722f0fc86225f24f84e4ac88c05/my_pyscf/lassi/lassis.py#L328
throws it all away because spaces._spin_shuffle_ci_ was written conservatively to combine multiple possibly non-orthogonal spin-shuffle references, which requires making copies and not references.
Overall, LASSIS does not have good memory management, because of the ad hoc way it was put together.
In LASSIS, the same fragment basis functions appears at multiple rootspace addresses, and to save memory one can just make a view instead of a copy. However, right at the end of
lassis.prepare_states
, this line https://github.com/MatthewRHermes/mrh/blob/ab148b28e24f2722f0fc86225f24f84e4ac88c05/my_pyscf/lassi/lassis.py#L328 throws it all away becausespaces._spin_shuffle_ci_
was written conservatively to combine multiple possibly non-orthogonal spin-shuffle references, which requires making copies and not references.