xnn.common.models.base#

The contract every model obeys.

A model is an nn.Module that maps an AtomicGraph to a dict with at least:

{“node_energy”: (N,), “energy”: (B,)}

Models do not compute forces/stress themselves – that is added uniformly by xnn.common.models.outputs.ForceStressOutput via autograd, so every model gets correct, conservative forces for free and the code lives in exactly one place.

Classes

InteratomicPotential(*args, **kwargs)

Abstract base class every interatomic-potential model must subclass.