Skip to content

CorrelationAnalysis

Overview

Correlation analysis computes time correlation functions for various molecular properties.

Constructor

CorrelationAnalysis(system, particles, ...)

Creates a new analysis instance.

Parameters: - system (System): The molecular system to analyze - particles (List[Particle]): List of particles to include in analysis

Methods

compute()

Performs the analysis calculation.

is_computed() → bool

Returns whether the analysis has been computed.

Usage Example

import smolsat

# Create trajectory and system
trajectory = smolsat.create_example_trajectory(num_particles=100, num_frames=1000)
system = smolsat.System(trajectory, periodic_boundaries=True)

# Select particles for analysis
particles = [trajectory.particle(i) for i in range(50)]

# Create and run analysis
analysis = smolsat.CorrelationAnalysis(system, particles)
analysis.compute()