aiqm / torchani

Accurate Neural Network Potential on PyTorch
https://aiqm.github.io/torchani/
MIT License
446 stars 125 forks source link

Re-apply reference energies in ASE Calculator #647

Closed WardLT closed 3 weeks ago

WardLT commented 3 weeks ago

I have an on-the-fly learning application where it would be best to maintain the energy scale between ANI and the original DFT data. As a result, I'd like to add the atomic reference energy I subtracted off during training back before returning the energy from the Calculator.

A few ways I'm considering doing this include:

  1. Adding a layer type which re-adds the reference energy to a calculator.
  2. Modifying ANIModel to take the reference energies
  3. Allowing the calculator to add the energies back. <- I think I'm going to do it this way, and make the "conversion from Ha -> eV optional as well"

Any advice? I plan to make these changes and offer a PR back to the repository.

WardLT commented 3 weeks ago

Right after I write this, I notice that you have EnergyShifter 🤦🏼 I'll test it out then close if that works

WardLT commented 3 weeks ago

Yup, worked as advertised!