The default implementation of calls like energy_forces or calculate((Energy(), Forces()) do not allow us to make use of a state in DFTK to reduce the computational burden on the second call (force computation). This should be done in the default implementation automatically. Essentially I suggest:
- Calls like
energy_forces should dispatch to the low-level interface (calculate((Energy(), Forces()) )
- The implementation of
calculate(::Tuple ) should transfer the state when dealing with one tuple element to the calculate call when dealing with the next.
The default implementation of calls like
energy_forcesorcalculate((Energy(), Forces())do not allow us to make use of astatein DFTK to reduce the computational burden on the second call (force computation). This should be done in the default implementation automatically. Essentially I suggest:energy_forcesshould dispatch to the low-level interface (calculate((Energy(), Forces()))calculate(::Tuple )should transfer the state when dealing with one tuple element to thecalculatecall when dealing with the next.