Device3DPropertyResult#

class nvmolkit.descriptors3d.Device3DPropertyResult(
properties: dict[str, AsyncGpuResult],
mol_indices: AsyncGpuResult,
conf_indices: AsyncGpuResult,
gpu_id: int,
n_mols: int,
)#

Per-conformer 3D properties on the GPU, labeled by molecule and conformer.

Behaves as a read-only mapping from property name to an AsyncGpuResult whose first dimension is n_conformers, in request order. Scalar properties have shape (n_conformers,) and vector properties (n_conformers, width), with widths listed on Property3D. Values are float32 for SINGLE and float64 for FULL. Keys may be given as names or Property3D members.

Row i of every property belongs to conformer conf_indices[i] of input molecule mol_indices[i]. conf_indices is the conformer’s position within its molecule, not its RDKit conformer ID. When the properties were calculated from a Device3DResult, rows follow that result and the label buffers are shared with it, so rows align with its energies and converged.

mol_indices#

int32 (n_conformers,) input-molecule index of each row.

conf_indices#

int32 (n_conformers,) per-molecule conformer position of each row.

gpu_id#

GPU holding every buffer.

n_mols#

Number of input molecules, including those without conformers.

__init__(
properties: dict[str, AsyncGpuResult],
mol_indices: AsyncGpuResult,
conf_indices: AsyncGpuResult,
gpu_id: int,
n_mols: int,
) → None#

Create a result from per-property device buffers and their row labels.

property n_conformers: int#

Number of rows (conformers) in every property buffer.

dense(
pad_value: float = nan,
) → Dense3DPropertyResult#

Materialize padded molecule/conformer tensors for every property.

Molecules with fewer than max_confs conformers (including none) receive pad_value. Reading the index tensors synchronizes implicitly.

get(
k[,
d,]
) → D[k] if k in D, else d.  d defaults to None.#
items() → a set-like object providing a view on D's items#
keys() → a set-like object providing a view on D's keys#
values() → an object providing a view on D's values#