dynsight.trajectory.OnionSmoothInsight¶
- class dynsight.trajectory.OnionSmoothInsight(labels, state_list, meta=<factory>)[source]¶
Contains a smooth onion-clustering analysis.
- Parameters:
- labels¶
The labels assigned by the clustering algorithm.
Methods
Save an .xyz file with the clustering labels for each atom.
Save the OnionSmoothInsight object to JSON and .npy for labels.
Load the OnionSmoothInsight from JSON and associated .npy file.
Plot one particle's trajectory colored according to clustering.
Plot the overall onion clustering result.
Plot the Sankey diagram of the onion clustering.
Plot each state's population along the trajectory.
Attributes
- dump_colored_trj(trj, file_path)[source]¶
Save an .xyz file with the clustering labels for each atom.
- Parameters:
trj (Trj)
file_path (Path)
- Return type:
None
- dump_to_json(file_path)[source]¶
Save the OnionSmoothInsight object to JSON and .npy for labels.
- Parameters:
file_path (Path)
- Return type:
None
- classmethod load_from_json(file_path, mmap_mode=None)[source]¶
Load the OnionSmoothInsight from JSON and associated .npy file.
- Parameters:
file_path (Path) – Path to the .json file.
mmap_mode (Literal['r', 'r+', 'w+', 'c'] | None) – If given, used as np.load(…, mmap_mode=mmap_mode) for memory mapping.
- Raises:
ValueError – if required keys are missing.
- Return type:
- plot_one_trj(file_path, data_insight, particle_id)[source]¶
Plot one particle’s trajectory colored according to clustering.
- plot_output(file_path, data_insight)[source]¶
Plot the overall onion clustering result.
- Parameters:
file_path (Path)
data_insight (Insight)
- Return type:
None