xnn.dnn.common.runner#

Load RuNNer models (input.nn, weights and scaling files) into HDNNP.

RuNNer (Behler group) stores a high-dimensional neural network potential as a directory with:

  • input.nn: the settings (elements, generation, cutoff functions, symmetry functions, network architectures, scaling flags, free-atom energies, Gaussian widths, screening);

  • scaling.data (or scaling_<suffix>.data per network type): element feature min max avg per line, the elements numbered in ascending atomic number;

  • weights_<suffix>.<ZZZ>.data: one value per line, layer by layer, each layer’s weight matrix (input index outer, output index inner) followed by its biases; weights_hardness.data for element hardnesses, one per element in ascending atomic number;

  • qeq_scaling.data (4G): the statistics of the charge input of the short-range networks.

RuNNer orders the symmetry functions of every element not by their order in input.nn but by type, cutoff radius, cutoff kind and parameters (rounded to five decimals), then the neighbour elements; runner_feature_key() reproduces that order so the weights and scaling rows line up. Everything is converted to the xnn units (Angstrom, eV); the networks keep their atomic-unit outputs, scaled by energy_scale, chi_scale and hardness_scale.

Example:

from xnn.dnn.common.runner import load_runner_model

model = load_runner_model("path/to/runner_model")   # an HDNNP, eV and Angstrom

Module Attributes

ACTIVATIONS

RuNNer activation codes -> make_activation() names

CUTOFFS

RuNNer cutoff keywords -> CUTOFF_KINDS

Functions

load_runner_model(directory[, input_nn, dtype])

Build an HDNNP from a RuNNer model directory.

parse_input_nn(path)

The settings of a RuNNer input.nn that define the model (RuNNer units).

runner_feature_key(row, cutoff)

The sort key RuNNer orders the features of an element by.