d-SEAMS
Install
Output
Methods
Docs
Engine & CLI
Python
Rust
Julia
R
Lua / Fennel
Fortran
PLUMED
linkcell
Wiki
Cite
GitHub
seams-core
v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Toggle main menu visibility
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
41
namespace
science
{
42
44
inline
constexpr
double
kCutoffA
= 3.5;
45
48
inline
constexpr
double
kQ6BarIceCut
= 0.36;
49
50
struct
Front
{
51
double
position
= 0;
52
double
width
= 0;
53
bool
defined
=
false
;
54
};
55
56
struct
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
71
struct
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
89
layersOf
(
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
int
axis = -1,
90
double
binWidth = 1.0);
91
92
struct
SlopeInterval
{
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
105
struct
CriticalSize
{
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
120
struct
ClusterPart
{
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
131
struct
NucleusFrame
{
132
int
frame
= 0;
133
int
nop
= 0;
134
int
chillCubic
= 0;
135
int
chillHex
= 0;
136
int
chillInter
= 0;
137
int
chillLiquid
= 0;
138
int
shellCubic
= 0;
139
int
shellHex
= 0;
140
int
shellStack
= 0;
141
int
shellOther
= 0;
142
int
q6Ice
= 0;
143
double
q6barMean
= 0;
145
int
stackAsCubic
= 0;
146
int
stackAsHex
= 0;
147
int
stackAsInter
= 0;
148
int
stackAsLiquid
= 0;
151
int
polytypeBoth
= 0;
152
int
polytypeAgree
= 0;
153
ClusterPart
core
;
154
ClusterPart
extended
;
155
ClusterPart
shell
;
156
ClusterPart
q6
;
157
};
158
160
[[nodiscard]]
NucleusFrame
161
nucleusOf
(
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
int
frame,
162
double
q6Cut =
kQ6BarIceCut
);
163
164
struct
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>
180
labelAtoms
(
molSys::PointCloud
<
molSys::Point<double>
,
double
> cloud,
181
double
q6Cut =
kQ6BarIceCut
);
182
183
}
// namespace science
184
185
#endif
mol_sys.hpp
The main molecular system handler.
chill
CHILL and CHILL+ structure classification.
Definition
bop.hpp:137
science
Definition
science_front.hpp:41
science::fitSolidFraction
Layers fitSolidFraction(const std::vector< double > &phi, const std::vector< double > &mid, double span)
science::criticalSize
CriticalSize criticalSize(const std::vector< double > &series, int nDraw, std::uint64_t seed)
Critical size of one cluster-size series. See the file comment.
science::bootstrapSlope
SlopeInterval bootstrapSlope(const std::vector< double > &x, const std::vector< double > &y, int nDraw, std::uint64_t seed)
science::kCutoffA
constexpr double kCutoffA
Published CHILL+ cutoff, in angstrom. Not a fitted parameter.
Definition
science_front.hpp:44
science::layersOf
Layers layersOf(const molSys::PointCloud< molSys::Point< double >, double > &cloud, int axis=-1, double binWidth=1.0)
science::kQ6BarIceCut
constexpr double kQ6BarIceCut
Definition
science_front.hpp:48
science::labelAtoms
std::vector< AtomRow > labelAtoms(molSys::PointCloud< molSys::Point< double >, double > cloud, double q6Cut=kQ6BarIceCut)
science::nucleusOf
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.
molSys::PointCloud
This contains a collection of points; contains information for a particular frame.
Definition
mol_sys.hpp:173
molSys::Point
This contains per-particle information.
Definition
mol_sys.hpp:152
science::AtomRow
Definition
science_front.hpp:164
science::AtomRow::y
double y
Definition
science_front.hpp:167
science::AtomRow::x
double x
Definition
science_front.hpp:166
science::AtomRow::inExtended
int inExtended
Definition
science_front.hpp:174
science::AtomRow::q6
double q6
Definition
science_front.hpp:172
science::AtomRow::shell
int shell
Definition
science_front.hpp:171
science::AtomRow::z
double z
Definition
science_front.hpp:168
science::AtomRow::q6bar
double q6bar
Definition
science_front.hpp:173
science::AtomRow::chillOvito
int chillOvito
Definition
science_front.hpp:170
science::ClusterPart
Definition
science_front.hpp:120
science::ClusterPart::shellOther
int shellOther
Definition
science_front.hpp:128
science::ClusterPart::shellHex
int shellHex
Definition
science_front.hpp:126
science::ClusterPart::shellCubic
int shellCubic
Definition
science_front.hpp:125
science::ClusterPart::hexagonal
int hexagonal
Definition
science_front.hpp:123
science::ClusterPart::shellStack
int shellStack
Definition
science_front.hpp:127
science::ClusterPart::interfacial
int interfacial
Definition
science_front.hpp:124
science::ClusterPart::size
int size
Definition
science_front.hpp:121
science::ClusterPart::cubic
int cubic
Definition
science_front.hpp:122
science::CriticalSize
Definition
science_front.hpp:105
science::CriticalSize::window
int window
Definition
science_front.hpp:111
science::CriticalSize::onset
int onset
Definition
science_front.hpp:110
science::CriticalSize::nStar
double nStar
Definition
science_front.hpp:106
science::CriticalSize::sigma
double sigma
Definition
science_front.hpp:107
science::CriticalSize::hi
double hi
Definition
science_front.hpp:109
science::CriticalSize::lo
double lo
sample standard deviation of the window
Definition
science_front.hpp:108
science::CriticalSize::defined
bool defined
Definition
science_front.hpp:113
science::CriticalSize::upperBound
bool upperBound
Definition
science_front.hpp:112
science::Front
Definition
science_front.hpp:50
science::Front::defined
bool defined
10-90 width of that crossing
Definition
science_front.hpp:53
science::Front::position
double position
Definition
science_front.hpp:51
science::Front::width
double width
0.5 crossing along the profile, angstrom
Definition
science_front.hpp:52
science::LayerRow
Definition
science_front.hpp:56
science::LayerRow::liquid
int liquid
Definition
science_front.hpp:62
science::LayerRow::shellOther
int shellOther
Definition
science_front.hpp:66
science::LayerRow::shellCubic
int shellCubic
Definition
science_front.hpp:63
science::LayerRow::mid
double mid
Definition
science_front.hpp:57
science::LayerRow::q6bar
double q6bar
Definition
science_front.hpp:68
science::LayerRow::interfacial
int interfacial
Definition
science_front.hpp:61
science::LayerRow::shellStack
int shellStack
Definition
science_front.hpp:65
science::LayerRow::shellHex
int shellHex
Definition
science_front.hpp:64
science::LayerRow::hexagonal
int hexagonal
Definition
science_front.hpp:60
science::LayerRow::cubic
int cubic
Definition
science_front.hpp:59
science::LayerRow::q6
double q6
Definition
science_front.hpp:67
science::LayerRow::n
int n
Definition
science_front.hpp:58
science::Layers
Definition
science_front.hpp:71
science::Layers::fronts
std::vector< Front > fronts
Definition
science_front.hpp:76
science::Layers::length
double length
Definition
science_front.hpp:73
science::Layers::defined
bool defined
Definition
science_front.hpp:78
science::Layers::rows
std::vector< LayerRow > rows
Definition
science_front.hpp:75
science::Layers::n
int n
Definition
science_front.hpp:74
science::Layers::axis
int axis
Definition
science_front.hpp:72
science::Layers::thickness
double thickness
Definition
science_front.hpp:77
science::NucleusFrame
Definition
science_front.hpp:131
science::NucleusFrame::chillHex
int chillHex
Definition
science_front.hpp:135
science::NucleusFrame::q6
ClusterPart q6
Definition
science_front.hpp:156
science::NucleusFrame::stackAsHex
int stackAsHex
Definition
science_front.hpp:146
science::NucleusFrame::polytypeBoth
int polytypeBoth
Definition
science_front.hpp:151
science::NucleusFrame::shellCubic
int shellCubic
Definition
science_front.hpp:138
science::NucleusFrame::extended
ClusterPart extended
Definition
science_front.hpp:154
science::NucleusFrame::q6Ice
int q6Ice
Definition
science_front.hpp:142
science::NucleusFrame::stackAsInter
int stackAsInter
Definition
science_front.hpp:147
science::NucleusFrame::core
ClusterPart core
Definition
science_front.hpp:153
science::NucleusFrame::stackAsLiquid
int stackAsLiquid
Definition
science_front.hpp:148
science::NucleusFrame::shellStack
int shellStack
Definition
science_front.hpp:140
science::NucleusFrame::shellHex
int shellHex
Definition
science_front.hpp:139
science::NucleusFrame::stackAsCubic
int stackAsCubic
Shell-stacking molecules, split by the published CHILL+ label.
Definition
science_front.hpp:145
science::NucleusFrame::q6barMean
double q6barMean
Definition
science_front.hpp:143
science::NucleusFrame::nop
int nop
Definition
science_front.hpp:133
science::NucleusFrame::shell
ClusterPart shell
Definition
science_front.hpp:155
science::NucleusFrame::shellOther
int shellOther
Definition
science_front.hpp:141
science::NucleusFrame::chillCubic
int chillCubic
Definition
science_front.hpp:134
science::NucleusFrame::chillLiquid
int chillLiquid
Definition
science_front.hpp:137
science::NucleusFrame::chillInter
int chillInter
Definition
science_front.hpp:136
science::NucleusFrame::frame
int frame
Definition
science_front.hpp:132
science::NucleusFrame::polytypeAgree
int polytypeAgree
Definition
science_front.hpp:152
science::SlopeInterval
Definition
science_front.hpp:92
science::SlopeInterval::n
int n
Definition
science_front.hpp:96
science::SlopeInterval::slope
double slope
Definition
science_front.hpp:93
science::SlopeInterval::hi
double hi
Definition
science_front.hpp:95
science::SlopeInterval::lo
double lo
Definition
science_front.hpp:94
src
include
internal
science_front.hpp