Closed cortner closed 1 month ago
AtomsCalculatorsUtilities now uses
E = init_energy(sys, V)
frc = init_forces(sys, V)
vir = init_virial(sys, V)
which addresses this issue for now. Once we implemente the low-level parameterized variants the params can be added in.
The initialization in the implementation of site potentials
assumes that
V
can by itself know what the output of a calculation is. This cannot always be the case. The output type will be a combination of the number types in the atoms object, the calculator object, and the parameters object.E.g. I might run an energy calculation with parameters or positions being dual numbers. But the calculator
V
cannot know this.The way this was handled in older versions of JuLIP and ACE was to have initiatlizations that depend on the inputs. Here, I think this could take the form
The alternative - and maybe preferrable - would be to enforce that E, F, V are of a very specific structure, namely.
If we do this, then we the calculators would need to provide
or a similar name.