main

zenowrapper.main

Description

Hydrodynamic Property Calculations Using ZENO Monte Carlo Methods

This module provides the ZenoWrapper class for computing hydrodynamic, electronic, and geometric properties of molecular systems via Monte Carlo integration.

The implementation wraps the NIST ZENO C++ library and integrates with MDAnalysis for seamless analysis of molecular dynamics trajectories.

Computed Properties

Electrical Properties (via exterior calculation):
  • Capacitance

  • Electric polarizability tensor and eigenvalues

  • Mean electric polarizability

  • Intrinsic conductivity

Geometric Properties (via interior calculation):
  • Volume

  • Gyration tensor and eigenvalues

Hydrodynamic Properties (derived via electrostatic-hydrodynamic analogy):
  • Hydrodynamic radius

  • Friction coefficient (requires viscosity)

  • Diffusion coefficient (requires temperature, viscosity)

  • Sedimentation coefficient (requires mass, buoyancy factor, viscosity)

  • Intrinsic viscosity

  • Viscometric radius

Monte Carlo Algorithms

  1. Walk-on-Spheres (exterior): Random walks launched from a sphere enclosing the molecule determine electrical properties by solving Laplace’s equation. Each walk either hits the object or escapes to infinity, analogous to Zeno’s paradox of Achilles and the Tortoise.

  2. Interior Sampling: Random points sampled within the launch sphere determine volume and gyration properties based on whether points fall inside the molecule.

Both methods provide rigorous statistical uncertainties via variance estimation and propagation of uncertainties.

Usage Example

import MDAnalysis as mda
from zenowrapper import ZenoWrapper

# Load system
u = mda.Universe('protein.pdb', 'trajectory.dcd')

# Define VdW radii by atom type
type_radii = {
    'C': 1.70, 'N': 1.55, 'O': 1.52, 'S': 1.80,
    'H': 1.20, 'P': 1.80
}

# Initialize analysis
zeno = ZenoWrapper(
    u.select_atoms('protein'),
    type_radii=type_radii,
    n_walks=1000000,           # exterior calculation
    n_interior_samples=100000,  # interior calculation
    temperature=298.15,         # K, for diffusion coefficient
    viscosity=0.01,            # poise (water at 20°C)
    mass=50000.0,              # Da
    buoyancy_factor=0.73,      # typical for proteins in water
    length_units='A'           # Angstroms
)

# Run over trajectory frames
zeno.run(start=0, stop=100, step=1, verbose=True)

# Access results (each is a Property object with .values and .variance arrays)
print(f"Hydrodynamic radius: {zeno.results["hydrodynamic_radius"].values.mean():.2f} Å")
print(f"Diffusion coefficient: {zeno.results["diffusion_coefficient"].values.mean():.2e}")
print(f"Volume: {zeno.results["volume"]values.mean():.2f} ų")

Notes

  • All results are stored as Property objects with .values and .variance arrays indexed by frame number

  • Computational cost scales with n_walks and n_interior_samples; adjust for accuracy vs. speed tradeoff

  • Statistical uncertainties decrease as ~1/sqrt(N) for N samples

  • The seed parameter ensures reproducibility when set to a fixed value

See also

MDAnalysis.analysis.base.AnalysisBase

Base class documentation

https

//docs.mdanalysis.org/stable/documentation_pages/analysis/base.html

ZENO

https

//zeno.nist.gov/

References

Classes

Property

Container for ZENO computed property with values and statistical uncertainties.

ZenoWrapper

Compute hydrodynamic and geometric properties via ZENO Monte Carlo methods.