namespace clump#
Overview#
Clustering functions. This namespace contains functions that are used in the for clustering ice-like particles. More…
namespace clump {
// structs
struct Domain;
// global functions
Domain largestDomain(const molSys::PointCloud<molSys::Point<double>, double>& cloud, const std::vector<std::vector<int>>& nList, const std::vector<bool>& mask);
int largestIceCluster(std::string path, molSys::PointCloud<molSys::Point<double>, double>& yCloud, molSys::PointCloud<molSys::Point<double>, double>& iceCloud, const std::vector<std::vector<int>>& nList, std::vector<bool>& isIce, std::vector<int>& clusterID, std::vector<int>& nClusters, std::unordered_map<int, int>& indexNumber, int firstFrame);
int singleClusterLinkedList(molSys::PointCloud<molSys::Point<double>, double>& iceCloud, const std::vector<std::vector<int>>& nList, std::vector<int>& linkedList);
int clusterAnalysis(std::string path, molSys::PointCloud<molSys::Point<double>, double>& iceCloud, molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, std::vector<std::vector<int>>& iceNeighbourList, double cutoff, int firstFrame, std::string bopAnalysis = “q6”);
int recenterClusterCloud(molSys::PointCloud<molSys::Point<double>, double>& iceCloud, const std::vector<std::vector<int>>& nList);
} // namespace clump
Detailed Documentation#
Clustering functions. This namespace contains functions that are used in the for clustering ice-like particles.
Particles are clustered according to Stoddard’s algorithm (Stoddard J. Comp. Phys., 27, 291, 1977).
The largest ice cluster determines the largest cluster of ice-like particles, using a “linked list” created by the clustering algorithm. The determination of ice-like molecules can be done using the \(q_6\) parameter, CHILL or CHILL+ parameters.
The largest ice cluster thus determined can be re-centered for ease of visualization.
Changelog#
Amrita Goswami [amrita16thaug646@gmail.com]; date modified: Nov 13, 2019
Rohit Goswami [rog32@hi.is]; date modified: Mar 20, 2021
Global Functions#
int largestIceCluster(std::string path, molSys::PointCloud<molSys::Point<double>, double>& yCloud, molSys::PointCloud<molSys::Point<double>, double>& iceCloud, const std::vector<std::vector<int>>& nList, std::vector<bool>& isIce, std::vector<int>& clusterID, std::vector<int>& nClusters, std::unordered_map<int, int>& indexNumber, int firstFrame)
Finds the largest ice cluster.
int singleClusterLinkedList(molSys::PointCloud<molSys::Point<double>, double>& iceCloud, const std::vector<std::vector<int>>& nList, std::vector<int>& linkedList)
Get the linked list of a cluster, given by iceCloud, for a single cluster. Required for cluster re-centering
int clusterAnalysis(std::string path, molSys::PointCloud<molSys::Point<double>, double>& iceCloud, molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, std::vector<std::vector<int>>& iceNeighbourList, double cutoff, int firstFrame, std::string bopAnalysis = “q6”)
Does the cluster analysis of ice particles in the system. Returns a pointCloud of the largest ice cluster. The neighbour list returned is BY INDEX of the largest ice cluster pointCloud.
int recenterClusterCloud(molSys::PointCloud<molSys::Point<double>, double>& iceCloud, const std::vector<std::vector<int>>& nList)
Recenters the coordinates of a pointCloud.