We have a workflow that uses an ASE calculator to explore a potential energy surface. When we swapped out the xTB ASE calculator that we were using to try the AIMNet2ASE calculator, we noticed that the calculator seemed to compute the energy correctly in the first invocation but then continue returning the same energy repeatedly even after updating the atomic positions. We dug around and it looks like AIMNet2ASE.set_atoms() is changing the atom positions but the cache doesn't get cleared so the next time the energy is requested it uses the value from the cache instead of recalculating at the new positions. We added a self.reset() call at the end of the AIMNet2ASE.do_reset() function. This at least superficially seems to resolve the issue such that the energy seems to be recalculated when the atomic positions change but use the cached value when called on the same atomic positions. Our workflow also seems to be operating as expected again. I'm not sure if this is a correct or general solution though.
We have a workflow that uses an ASE calculator to explore a potential energy surface. When we swapped out the xTB ASE calculator that we were using to try the AIMNet2ASE calculator, we noticed that the calculator seemed to compute the energy correctly in the first invocation but then continue returning the same energy repeatedly even after updating the atomic positions. We dug around and it looks like
AIMNet2ASE.set_atoms()
is changing the atom positions but the cache doesn't get cleared so the next time the energy is requested it uses the value from the cache instead of recalculating at the new positions. We added aself.reset()
call at the end of theAIMNet2ASE.do_reset()
function. This at least superficially seems to resolve the issue such that the energy seems to be recalculated when the atomic positions change but use the cached value when called on the same atomic positions. Our workflow also seems to be operating as expected again. I'm not sure if this is a correct or general solution though.