xnn.common.models.registry#
Name -> class registry so new models are added without touching the core.
For example:
from xnn.common.models.registry import register_model, build_model
@register_model("mymodel")
class MyModel(InteratomicPotential):
@classmethod
def from_config(cls, cfg): ...
A model becomes usable from any config (YAML/Hydra/argparse) the moment it is imported and registered. This is the extension point referenced in the README.
Module Attributes
|
Functions
|
Wrap |
List the names of all currently registered models. |
|
|
Instantiate a registered model from a configuration dataclass. |
|
The innermost potential under the force, dispersion, LES and multi-head wrappers. |
|
A copy of |
|
Whether a model adds the Coulomb energy of charges it predicts itself. |
|
Build a model and the config that rebuilds it. |
|
The |
|
Return a class decorator that registers a model under |
|
Replace |
|
The dispersion a deployment adds to a checkpoint's model. |