We finally have C++ versions of some MDANCE functionality (NANI and HELM for now, DIVINE coming soon). Maybe this could be a good starting point to get some of these clustering methods in CPPTRAJ? This is the current repo: https://github.com/mqcomplab/CPP-MDANCE