JuLIP.jl
JuLIP.jl copied to clipboard
Missing methods for ASEAtoms compatibility
Would you be happy to add the following method:
energy(calc::ASE.ASECalculator, at::JuLIP.Atoms) = energy(calc, ASE.ASEAtoms(at))
and the same for forces, stress etc? It would make code which has to call ASECalculators more convenient. Should it go in ASE.jl
or JuLIP.jl
?
cc. @SMakri
Should go into ASE.jl
And the analogue with a non-ASE calculator and ASEAtoms
I can donut later or Stela can make a PR?
Sounds good. minimise!()
is a bit more difficult as it modifies the atoms object in place, so copying the input won't work - do you have an idea for that?
This is probably silly, but what does "PR" stand for?
Pull request
I suppose this would work:
function minimise!(at::ASEAtoms, ...)
jat = JuLIP.Atoms(at)
minimise!(jat, ...)
set_dofs!(at, dofs(jat))
end function
I need to look at minimise!. Let’s see