xnn.dnn.featurizers.acsf.AtomCenteredSymmetryFunctions#
- class xnn.dnn.featurizers.acsf.AtomCenteredSymmetryFunctions(species, cutoffs, functions, mode='none', scale_range=(0.0, 1.0))[source]#
Bases:
FeaturizerBehler atom-centered symmetry functions, a separate list per element.
- Parameters:
species (sequence of int or str) – The elements; the descriptor rows of atoms of other elements are zero.
cutoffs (sequence of dict) – The cutoff functions, each
{"kind", "r_cut"}plusr_inner(cosine,tanh,tanh_approx) orexponent(polynomial); functions refer to them by position.functions (sequence of dict) – The symmetry functions, each with
element,type(1, 2, 3, 8 or 9),neighbors(one element for types 1 and 2, two for the angular types, in any order),cutoff(index intocutoffs, default 0) and the parameters of its type:etaandrs(2),eta,lambdaandzeta(3 and 9),theta_sandetain degrees (8),n_features(1). An element’s features keep the order of the list.mode (str, optional) – Scaling mode, one of
SCALING_MODES, by default"none".scale_range (tuple of float, optional) –
(s_min, s_max)of the"range"mode, by default(0, 1).
- Variables:
- property output_dim: int#
Length of the (zero-padded) descriptor, the largest feature count of an element.
- Type:
- raw(data)[source]#
The unscaled descriptor
(N, output_dim)(zero beyond each element’s features).- Parameters:
data (AtomicGraph)
- Return type:
- forward(data)[source]#
The scaled descriptor
(N, output_dim); columns beyond an element’s features are zero.- Parameters:
data (AtomicGraph) – Atomic graph providing atomic numbers, edge index and edge vectors.
- Returns:
Per-atom descriptors.
- Return type:
Tensor
- fit_scaling(graphs, mode=None)[source]#
Set
stat_min,stat_maxandstat_avgfrom the atoms ofgraphs.- Parameters:
graphs (iterable of AtomicGraph) – Training structures (single graphs or batches).
mode (str, optional) – Also switch the scaling mode.
- Return type:
None