seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
cluster.hpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------------
2// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3//
4// Copyright (c) 2018--present d-SEAMS core team
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the MIT License as published by
8// the Open Source Initiative.
9//
10// A copy of the MIT License is included in the LICENSE file of this repository.
11// You should have received a copy of the MIT License along with this program.
12// If not, see <https://opensource.org/licenses/MIT>.
13//-----------------------------------------------------------------------------------
14
15#ifndef SEAMS_CLUSTER_H_
16#define SEAMS_CLUSTER_H_
17
18#include <array>
19#include <bop.hpp>
20#include <cmath>
21#include <complex>
22#include <generic.hpp>
23#include <iostream>
24#include <mol_sys.hpp>
25#include <neighbours.hpp>
26#include <seams_output.hpp>
27
32
37
59
60namespace clump {
61
64struct Domain {
65 int largest = 0;
66 int subset = 0;
67 double percolation = 0.0; // largest/subset
68};
69
70[[nodiscard]] Domain
72 const std::vector<std::vector<int>> &nList,
73 const std::vector<bool> &mask);
74
76[[nodiscard]] int largestIceCluster(
77 std::string path, molSys::PointCloud<molSys::Point<double>, double> &yCloud,
79 const std::vector<std::vector<int>> &nList, std::vector<bool> &isIce,
80 std::vector<int> &clusterID, std::vector<int> &nClusters,
81 std::unordered_map<int, int> &indexNumber, int firstFrame);
82
85[[nodiscard]] int singleClusterLinkedList(
87 const std::vector<std::vector<int>> &nList, std::vector<int> &linkedList);
88
92[[nodiscard]] int clusterAnalysis(std::string path,
95 const std::vector<std::vector<int>> &nList,
96 std::vector<std::vector<int>> &iceNeighbourList,
97 double cutoff, int firstFrame,
98 std::string bopAnalysis = "q6");
99
101[[nodiscard]] int recenterClusterCloud(
102 molSys::PointCloud<molSys::Point<double>, double> &iceCloud,
103 const std::vector<std::vector<int>> &nList);
104
105} // namespace clump
106
108#endif // SEAMS_CLUSTER_H_
File for the bond order parameter analysis.
File for containing generic or common functions.
The main molecular system handler.
Clustering functions. This namespace contains functions that are used in the for clustering ice-like ...
Definition cluster.hpp:60
int singleClusterLinkedList(molSys::PointCloud< molSys::Point< double >, double > &iceCloud, const std::vector< std::vector< int > > &nList, std::vector< int > &linkedList)
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.
Domain largestDomain(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const std::vector< std::vector< int > > &nList, const std::vector< bool > &mask)
int recenterClusterCloud(molSys::PointCloud< molSys::Point< double >, double > &iceCloud, const std::vector< std::vector< int > > &nList)
Recenters the coordinates of a pointCloud.
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")
Header file for neighbour list generation.
double percolation
Definition cluster.hpp:67
This contains a collection of points; contains information for a particular frame.
Definition mol_sys.hpp:173
This contains per-particle information.
Definition mol_sys.hpp:152