random#

Random atomic data source for testing and examples.

Generates synthetic AtomicData objects with random positions, forces, and energies. Useful for unit tests, example pipelines, and quick prototyping without needing real DFT data.

Classes#

RandomAtomicSource

Generate random atomic structures with configurable properties.

Module Contents#

class physicsnemo_curator.domains.atm.sources.random.RandomAtomicSource(
n_samples: int = 10,
n_atoms: int = 20,
seed: int = 42,
)#

Bases: physicsnemo_curator.core.base.Source[nvalchemi.data.AtomicData]

Generate random atomic structures with configurable properties.

Each index yields a single AtomicData with random positions, atomic numbers, forces, and energies.

Parameters:
  • n_samples (int) – Number of structures this source provides (i.e. len(source)).

  • n_atoms (int) – Number of atoms per structure.

  • seed (int) – Base random seed. Each index uses seed + index for reproducibility.

Examples

>>> from physicsnemo_curator.domains.atm.sources import RandomAtomicSource
>>> source = RandomAtomicSource(n_samples=10, n_atoms=20)
>>> len(source)
10
>>> atoms = next(source[0])
>>> atoms.positions.shape
torch.Size([20, 3])

Initialize the random atomic source.

classmethod params() list[physicsnemo_curator.core.base.Param]#

Declare configurable parameters.

description: ClassVar[str] = 'Generate random atomic structures with positions, forces, and energies for testing and prototyping'#

Short description shown in the interactive CLI.

name: ClassVar[str] = 'Random Atomic'#

Human-readable display name for the interactive CLI.