Loading...
Searching...
No Matches
structure_desc.hpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------------
2// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3// SPDX-License-Identifier: MIT
4//-----------------------------------------------------------------------------------
5
6#ifndef SEAMS_STRUCTURE_DESC_H_
7#define SEAMS_STRUCTURE_DESC_H_
8
9#include <mol_sys.hpp>
10
11#include <string>
12#include <vector>
13
18
19namespace chill {
20
21enum class CrystalKind { other = 0, sc, fcc, hcp, bcc };
22
25 double rmsd = 1e300;
26 const char *name = "other";
27};
28
32[[nodiscard]] std::vector<TemplateHit> classifyTemplates(
33 const molSys::PointCloud<molSys::Point<double>, double> &yCloud,
34 const std::vector<std::vector<int>> &nList, int kNeigh = 12);
35
38[[nodiscard]] std::vector<double> soapSpectrum(
39 const molSys::PointCloud<molSys::Point<double>, double> &yCloud, int iatom,
40 const std::vector<std::vector<int>> &nList, int nMax, int lMax,
41 double rcut);
42
45[[nodiscard]] std::vector<std::vector<double>> soapSpectrumAll(
46 const molSys::PointCloud<molSys::Point<double>, double> &yCloud,
47 const std::vector<std::vector<int>> &nList, int nMax, int lMax,
48 double rcut);
49
52 int nClasses = 0;
53 int nFeat = 0;
54 double ridge = 1e-6;
55 std::vector<double> weights; // nClasses * nFeat, row-major
56 std::vector<std::string> labels;
57
58 void fit(const std::vector<std::vector<double>> &X,
59 const std::vector<int> &y);
60 [[nodiscard]] int predict(const std::vector<double> &x) const;
61};
62
64[[nodiscard]] std::vector<double> voronoiFeature(
65 const molSys::PointCloud<molSys::Point<double>, double> &yCloud, int iatom,
66 double candidateCutoff);
67
69[[nodiscard]] std::vector<std::vector<double>> voronoiFeatures(
70 const molSys::PointCloud<molSys::Point<double>, double> &yCloud,
71 double candidateCutoff);
72
73} // namespace chill
74
75#endif // SEAMS_STRUCTURE_DESC_H_
The main molecular system handler.
CHILL and CHILL+ structure classification.
Definition bop.hpp:136
std::vector< std::vector< double > > voronoiFeatures(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double candidateCutoff)
[q4, q6, q8] for every particle. One tessellation per order (l = 4, 6, 8).
std::vector< std::vector< double > > soapSpectrumAll(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int nMax, int lMax, double rcut)
std::vector< TemplateHit > classifyTemplates(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int kNeigh=12)
std::vector< double > soapSpectrum(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, const std::vector< std::vector< int > > &nList, int nMax, int lMax, double rcut)
std::vector< double > voronoiFeature(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, double candidateCutoff)
[q4, q6, q8] from the Voronoi-weighted Steinhardt path (Mickel).
One-versus-rest ridge classifier on a dense feature matrix.
std::vector< double > weights
void fit(const std::vector< std::vector< double > > &X, const std::vector< int > &y)
int predict(const std::vector< double > &x) const
std::vector< std::string > labels
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