aiqm / torchani

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

Fix cuaev angular kernel bug when center atom pairs are more than 32 #555

Closed yueyericardo closed 3 years ago

yueyericardo commented 3 years ago

When center atom pairs are more than 32 (never happended at ani1x dataset), angular kernel didn't iterate over kk_start.

Test: Before:

AssertionError: False is not true : Tensors failed to compare as equal! With rtol=5e-05 and atol=5e-05, 
found 3952 element(s) (out of 22272) whose difference(s) exceeded the margin of error (including 0 nan comparisons). 
The greatest difference was 347.97611236572266 (50.77568817138672 vs. 398.7518005371094), which occurred 
at index (0, 38, 97).

The error is gone after this fix.

cc @akkamesh