Generalized HLDA python script
This code creates a collective variable (defined as a linear combination of input descriptors) that maximizes the separation of two classes (or states) using harmonic linear discriminant analysis. (J. Chem. Phys. 149, 194113 (2018); https://doi.org/10.1063/1.5053566)
A csv file is required with the 2 classses: column labels using the values (l) in the dictionary and 'class'
The code was developed and applied in this paper: One Descriptor to Fold Them All: Harnessing Intuition and MachineLearning to Identify Transferable Lasso Peptide Reaction Coordinates
J. Phys. Chem. B 2024, 128, 4063−4075 https://doi.org/10.1021/acs.jpcb.3c08492