OUnke / SpookyNet

Reference implementation of "SpookyNet: Learning force fields with electronic degrees of freedom and nonlocal effects"
MIT License
66 stars 13 forks source link

Periodic situation #2

Open jiabinchen99 opened 2 years ago

jiabinchen99 commented 2 years ago

I want to know if this net satisfy the Periodic situation? When I did 222 expansion of CH2 in the example, the energy is not 8 times that before expansion.

Sangwon91 commented 2 years ago

I'm not the author, but I think it is because of the use of FAVOR (attention part of the paper).

In FAVOR part, attentions are calculated for real atoms but not for periodic images of atoms. it doesn't take into account minimum image convention (I'm not check the source code but the equation in the paper shows that).

This means if you have 5 atoms in unit cell the possible number of attention is 5 5 = 25. when you expand the unit cell by 2 x 2 x 2, the possible number of attentions becomes to 40 40 = 1600 != 25 8. For other interactions, the number of interaction after expansion is 8 (# of interaction original) because of the use of minimum image convention.

For that reason, it seems spooky-net isn't invariant for selection of unit cell.