Analysis Module¶
Overview¶
The analysis module provides high-level analysis functions and plotting utilities.
Functions¶
Any()
¶
Internal indicator of special typing constructs. See _doc instance attribute for specific docs.
Dict()
¶
The central part of internal API.
This represents a generic version of type 'origin' with type arguments 'params'.
There are two kind of these aliases: user defined and special. The special ones
are wrappers around builtin collections and ABCs in collections.abc. These must
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
this is used by e.g. typing.List and typing.Dict.
List()
¶
The central part of internal API.
This represents a generic version of type 'origin' with type arguments 'params'.
There are two kind of these aliases: user defined and special. The special ones
are wrappers around builtin collections and ABCs in collections.abc. These must
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
this is used by e.g. typing.List and typing.Dict.
Optional()
¶
Internal indicator of special typing constructs. See _doc instance attribute for specific docs.
Tuple()
¶
Tuple type; Tuple[X, Y] is the cross-product type of X and Y.
Example: Tuple[T1, T2] is a tuple of two elements corresponding
to type variables T1 and T2. Tuple[int, float, str] is a tuple
of an int, a float and a string.
To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].
analyze_trajectory()
¶
Perform multiple analyses on a trajectory.
Args:
trajectory: SMolSAT trajectory
analyses: List of analysis types to perform
particle_type: Particle type for particle-based analyses
molecule_type: Molecule type for molecule-based analyses
**kwargs: Additional arguments for analysis methods
Returns:
Dictionary containing analysis results
create_analysis_report()
¶
Create a comprehensive analysis report.
Args:
trajectory: SMolSAT trajectory to analyze
output_dir: Directory to save results
Returns:
Path to the generated report
estimate_diffusion_coefficient()
¶
Estimate diffusion coefficient from MSD data.
Args:
lag_times: Time lag values
msd_values: MSD values
fit_start_fraction: Start of fitting region as fraction of data
fit_end_fraction: End of fitting region as fraction of data
Returns:
Estimated diffusion coefficient
plot_msd()
¶
Plot MSD results with optional diffusion coefficient fitting.
Args:
lag_times: Time lag values
msd_values: MSD values
title: Plot title
save_path: Path to save plot (None to not save)
show_diffusion_fit: Whether to show linear fit for diffusion coefficient
Returns:
Matplotlib figure object
plot_rg()
¶
Plot radius of gyration results.
Args:
times: Time values
rg_values: RG values
title: Plot title
save_path: Path to save plot (None to not save)
Returns:
Matplotlib figure object
quick_msd()
¶
Quick MSD calculation with automatic setup.
Args:
trajectory: SMolSAT trajectory
particle_type: Particle type to analyze (None for all)
max_lag_frames: Maximum lag frames to compute
frame_skip: Frame skip interval
use_unwrapped: Use unwrapped coordinates
Returns:
Tuple of (lag_times, msd_values)
quick_rg()
¶
Quick radius of gyration calculation.
Args:
trajectory: SMolSAT trajectory
molecule_type: Molecule type to analyze (None for all)
frame_skip: Frame skip interval
use_unwrapped: Use unwrapped coordinates
Returns:
Tuple of (times, rg_values)