VelocityAutoCorrelation¶
- class torch_sim.properties.correlations.VelocityAutoCorrelation(*, window_size, device, use_running_average=True, normalize=True)[source]¶
Bases:
objectCalculator for velocity autocorrelation function (VACF).
Computes the VACF of each system by averaging over its atoms and dimensions, with optional running average across correlation windows. Systems in a batched state are kept separate:
vacfhas shape(n_systems, window_size), or(window_size,)if the state holds a single system.Using
VelocityAutoCorrelationwithTrajectoryReporter:# Create VACF calculator vacf_calc = VelocityAutoCorrelation( window_size=100, device=device, use_running_average=True, ) # Set up trajectory reporter reporter = TrajectoryReporter( "simulation_vacf.h5", state_frequency=100, prop_calculators={10: {"vacf": vacf_calc}}, )