seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
science_front.hpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------------
2// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3//
4// Copyright (c) d-SEAMS developers
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
11#ifndef SEAMS_SCIENCE_FRONT_H_
12#define SEAMS_SCIENCE_FRONT_H_
13
14#include <mol_sys.hpp>
15
16#include <cstdint>
17#include <string>
18#include <vector>
19
40
41namespace science {
42
44inline constexpr double kCutoffA = 3.5;
45
48inline constexpr double kQ6BarIceCut = 0.36;
49
50struct Front {
51 double position = 0;
52 double width = 0;
53 bool defined = false;
54};
55
56struct LayerRow {
57 double mid = 0;
58 int n = 0;
59 int cubic = 0;
60 int hexagonal = 0;
61 int interfacial = 0;
62 int liquid = 0;
63 int shellCubic = 0;
64 int shellHex = 0;
65 int shellStack = 0;
66 int shellOther = 0;
67 double q6 = 0;
68 double q6bar = 0;
69};
70
71struct Layers {
72 int axis = 2;
73 double length = 0;
74 int n = 0;
75 std::vector<LayerRow> rows;
76 std::vector<Front> fronts;
77 double thickness = 0;
78 bool defined = false;
79};
80
83[[nodiscard]] Layers fitSolidFraction(const std::vector<double> &phi,
84 const std::vector<double> &mid, double span);
85
88[[nodiscard]] Layers
89layersOf(const molSys::PointCloud<molSys::Point<double>, double> &cloud, int axis = -1,
90 double binWidth = 1.0);
91
93 double slope = 0;
94 double lo = 0;
95 double hi = 0;
96 int n = 0;
97};
98
101[[nodiscard]] SlopeInterval bootstrapSlope(const std::vector<double> &x,
102 const std::vector<double> &y, int nDraw,
103 std::uint64_t seed);
104
106 double nStar = 0;
107 double sigma = 0;
108 double lo = 0;
109 double hi = 0;
110 int onset = -1;
111 int window = 0;
112 bool upperBound = false;
113 bool defined = false;
114};
115
117[[nodiscard]] CriticalSize criticalSize(const std::vector<double> &series, int nDraw,
118 std::uint64_t seed);
119
121 int size = 0;
122 int cubic = 0;
123 int hexagonal = 0;
124 int interfacial = 0;
125 int shellCubic = 0;
126 int shellHex = 0;
127 int shellStack = 0;
128 int shellOther = 0;
129};
130
158
160[[nodiscard]] NucleusFrame
162 double q6Cut = kQ6BarIceCut);
163
164struct AtomRow {
165 int id = 0;
166 double x = 0;
167 double y = 0;
168 double z = 0;
169 int chill = 2;
170 int chillOvito = 2;
171 int shell = -1;
172 double q6 = 0;
173 double q6bar = 0;
174 int inExtended = 0;
175};
176
179[[nodiscard]] std::vector<AtomRow>
181 double q6Cut = kQ6BarIceCut);
182
183} // namespace science
184
185#endif
The main molecular system handler.
CHILL and CHILL+ structure classification.
Definition bop.hpp:137
Layers fitSolidFraction(const std::vector< double > &phi, const std::vector< double > &mid, double span)
CriticalSize criticalSize(const std::vector< double > &series, int nDraw, std::uint64_t seed)
Critical size of one cluster-size series. See the file comment.
SlopeInterval bootstrapSlope(const std::vector< double > &x, const std::vector< double > &y, int nDraw, std::uint64_t seed)
constexpr double kCutoffA
Published CHILL+ cutoff, in angstrom. Not a fitted parameter.
Layers layersOf(const molSys::PointCloud< molSys::Point< double >, double > &cloud, int axis=-1, double binWidth=1.0)
constexpr double kQ6BarIceCut
std::vector< AtomRow > labelAtoms(molSys::PointCloud< molSys::Point< double >, double > cloud, double q6Cut=kQ6BarIceCut)
NucleusFrame nucleusOf(molSys::PointCloud< molSys::Point< double >, double > &cloud, int frame, double q6Cut=kQ6BarIceCut)
One frame. The published CHILL+ label is left on the cloud.
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
double lo
sample standard deviation of the window
bool defined
10-90 width of that crossing
double width
0.5 crossing along the profile, angstrom
std::vector< Front > fronts
std::vector< LayerRow > rows
int stackAsCubic
Shell-stacking molecules, split by the published CHILL+ label.