xnn.gnn.models.megnet_foundation.swap_bond_atoms#

xnn.gnn.models.megnet_foundation.swap_bond_atoms(model)[source]#

Swap the receiving and sending atom blocks of the first layer of every bond update, in place.

For weights trained with the other bond direction (each bond’s update averaged at the atom it comes from); the model then computes what it was trained to.

Returns:

model.

Return type:

MEGNet

Parameters:

model (MEGNet)