ORNL / HydraGNN

Distributed PyTorch implementation of multi-headed graph convolutional neural networks
BSD 3-Clause "New" or "Revised" License
68 stars 29 forks source link

Fix pbc conv args Final Draft #306

Closed RylieWeaver closed 1 week ago

RylieWeaver commented 2 weeks ago

Fix pbc conv args final draft

Main points:

(1) I create edge_shifts in preprocessing with ASE, then apply those shifts in conv_args.

------The edge shifts adjust the relative vector for a connection. After additional research, I believe this to be the best way for fewer lines of code and being streamlined. It is also the approach of top competitors and does not disrupt gradient flow------

(2) Correctly applying PBC in models that update the position is currently not supported (SchNet / EGNN).

------At the core level, we have the problem that the positional update could make a node cross the supercell, even if we were to recalculate the shifts after each layer. I still allow the models to run, but simply continue to use the naive relative vectors------

(3) data.pbc is now a requirement for periodic boundary conditions

------I make an effort to include it in any examples that use PBC------

@allaffa Assuming this passes the tests I'll schedule a meeting to go over the PR.

allaffa commented 2 weeks ago

@RylieWeaver After merging the PR for MACE. conflicts popped up on this PR