Property

zenowrapper.main.Property

class zenowrapper.main.Property(name: str, shape: tuple[int, ...], unit: str | None)[source]

Bases: object

Container for ZENO computed property with values and statistical uncertainties.

Each property stores per-frame values and variances from Monte Carlo calculations. Uncertainties are rigorously estimated via variance propagation.

Parameters:
  • name (str) – Property name (e.g., ‘capacitance’, ‘diffusion_coefficient’)

  • shape (tuple) – Shape of values array, typically (n_frames,) for scalars or (n_frames, 3, 3) for tensors

  • unit (str or None) – Physical unit string for documentation (e.g., ‘Å’, ‘ų’, ‘cm²/s’)

Variables:
  • name (str) – Property identifier

  • values (numpy.ndarray) – Computed values for each analyzed frame

  • variance (numpy.ndarray) – Statistical variance (uncertainty²) for each frame value

  • unit (str or None) – Physical units

  • overall_value (float) – Mean across all frames (computed by compute_total_values())

  • overall_variance (float) – Total variance across frames (computed by compute_total_values())

Notes

Statistical uncertainties from Monte Carlo sampling decrease as ~1/sqrt(N) where N is the number of random walks or interior samples.

Property.add_value(index, value)

Store computed value for a specific frame.

Property.add_variance(index, value)

Store variance (uncertainty²) for a specific frame.

Property.compute_total_values()

Compute overall statistics across all analyzed frames.

add_value(index: int, value: float | NDArray[np.floating]) None[source]

Store computed value for a specific frame.

Parameters:
  • index (int) – Frame index

  • value (float or numpy.ndarray) – Computed property value

add_variance(index: int, value: float | NDArray[np.floating]) None[source]

Store variance (uncertainty²) for a specific frame.

Parameters:
  • index (int) – Frame index

  • value (float or numpy.ndarray) – Statistical variance of the property

compute_total_values() None[source]

Compute overall statistics across all analyzed frames.

Calculates mean value and total variance from per-frame results.

Raises:

ValueError – If any frame values are NaN (indicating incomplete analysis)