aenet.geometry.transformations.RandomDisplacementTransformation

class aenet.geometry.transformations.RandomDisplacementTransformation(rms: float = 0.1, max_structures: int | None = None, random_state: int | Generator | None = None, orthonormalize: bool = True, remove_translations: bool = True)[source]

Generate random atomic displacement vectors.

This stochastic transformation creates structures with random atomic displacements. It supports two modes:

  1. orthonormalize=True (default): generates an orthonormal basis of displacement directions in the full 3N space (optionally with the 3 translational modes removed). This is often useful to generate a compact, non-redundant set of perturbations.

  2. orthonormalize=False: draws independent random displacement patterns. This is useful when you want many samples, without imposing orthogonality constraints.

Purpose

This transformation is mainly intended for structure-space sampling (e.g., active learning) and for generating training data for interatomic potentials.

param rms:

Target RMS displacement in Angstroms (default: 0.1)

type rms:

float, optional

param max_structures:

Maximum number of structures to generate. If None, defaults to 3N-3 when remove_translations=True and to 3N otherwise.

type max_structures:

int, optional

param random_state:

Random seed or generator for reproducibility.

type random_state:

int or numpy.random.Generator, optional

param orthonormalize:

If True, generate orthonormal displacement vectors using QR.

type orthonormalize:

bool, optional

param remove_translations:

If True, remove the 3 translational modes (fixed center of mass).

type remove_translations:

bool, optional

__init__(rms: float = 0.1, max_structures: int | None = None, random_state: int | Generator | None = None, orthonormalize: bool = True, remove_translations: bool = True)[source]

Methods

__init__([rms, max_structures, ...])

apply_transformation(structure, **kwargs)

Apply random displacement transformation to structure.

Attributes

RMS_TOLERANCE