The DIIS class is crudely constructed and could be drastically improved:
- Make error vectors the residuals/energies rather than differences between consecutive amplitude arrays.
- Combine and flatten arrays so that explicit cluster categories need not appear in the DIIS code.
- Remove redundant code between Pytorch and non-Pytorch versions.
The DIIS class is crudely constructed and could be drastically improved: