Background
Identifying representative configurations from an ensemble is important in many contexts. The representative configurations are typically chosen based on a metric of similarity (usually the root mean square deviation, RMSD) and a method for classifying the configurations into groups.
Due to the labeled representation of atoms in computer memory, calculating the RMSD directly from position arrays can lead to inflated values, especially when solvent molecules are considered. clusttraj introduces algorithms that find the minimum RMSD by relabeling the atoms using a solute-solvent split strategy. Using this minimum RMSD, the package then employs agglomerative clustering to identify representative structures.
Abstract
Clustering techniques are consolidated as a powerful strategy for analyzing the extensive data generated from molecular modeling. In particular, some tools have been developed to cluster configurations from classical simulations with a standard focus on individual units, ranging from small molecules to complex proteins. Since the standard approach includes computing the root mean square deviation (RMSD) of atomic positions, accounting for the permutation between atoms is crucial for optimizing the clustering procedure in the presence of identical molecules.
To address this issue, we present the clusttraj program, a solvent-informed clustering package that fixes inflated RMSD values by finding the optimal pairing between configurations. The program combines reordering schemes with the Kabsch algorithm to minimize the RMSD of molecular configurations before running a hierarchical clustering protocol. By considering evaluation metrics, one can determine the ideal threshold in an automated fashion and compare the different linkage schemes available.
The program capabilities are exemplified by considering solute–solvent systems ranging from pure water clusters to a solvated protein or a small solute in different solvents. As a result, we investigate the dependence on different parameters, such as the system size and reordering method, and also the representativeness of the cluster medoids for the characterization of optical properties. clusttraj is implemented as a Python library and can be employed to cluster generic ensembles of molecular configurations that go beyond solute–solvent systems.
Publication
July, 3rd, 2025. https://pubs.acs.org/doi/10.1021/acs.jctc.5c00634