nvalchemi.models.gen.demo.DemoDiffusionModel#

class nvalchemi.models.gen.demo.DemoDiffusionModel(num_atoms=3, hidden=32)[source]#

Minimal diffusion-side demo: an x0-predictor over point clouds.

forward follows the PhysicsNeMo calling convention — forward(x, sigma) predicts clean positions from noisy ones — so the model slots directly into physicsnemo.diffusion preconditioners and samplers (see the generative user guide).

Parameters:
  • num_atoms (int)

  • hidden (int)

extra_repr()#

Format the generative config for nn.Module.__repr__.

Parameters:

self (Any) – The wrapper instance (injected onto concrete subclasses).

Returns:

A short summary of the declared batch-field contracts.

Return type:

str

forward(x, sigma, class_labels=None)[source]#

Predict clean positions from noisy ones.

Flattens x from (B, N, 3), appends the noise level sigma as a per-draw feature, and maps back to (B, N, 3) through the MLP. class_labels is accepted for the PhysicsNeMo calling convention and unused here.

Parameters:
Return type:

Tensor

to_batch(sample, cond_batch=None)[source]#

Materialize the sample: one point-cloud graph per draw.

Parameters:
  • sample (TensorDict)

  • cond_batch (Batch | None)

Return type:

Batch