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
nucleation_pathway.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
// 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_NUCLEATION_PATHWAY_HPP_
16
#define SEAMS_NUCLEATION_PATHWAY_HPP_
17
18
#include <
mol_sys.hpp
>
19
20
#include <vector>
21
42
43
namespace
nucleation
{
44
46
inline
constexpr
double
kCutoffA
= 3.5;
47
49
inline
constexpr
int
kRingDepth
= 7;
50
54
inline
constexpr
double
kQ6BarIceCut
= 0.36;
55
64
inline
constexpr
double
kQ6SolidCutoffA
= 3.2;
65
inline
constexpr
double
kQ6SolidCut
= 0.5;
66
67
struct
FrameRecord
{
68
int
frame
= 0;
69
long
long
timestep
= 0;
70
int
nop
= 0;
72
long
long
ringCount
[8] = {};
73
int
chillCubic
= 0;
74
int
chillHex
= 0;
75
int
chillInter
= 0;
76
int
chillClath
= 0;
77
int
chillInterClath
= 0;
78
int
chillWater
= 0;
79
int
ovitoCubic
= 0;
80
int
ovitoHex
= 0;
81
int
ovitoInter
= 0;
82
int
ovitoClath
= 0;
83
int
ovitoInterClath
= 0;
84
int
ovitoWater
= 0;
85
int
symCubic
= 0;
86
int
symHex
= 0;
87
double
q6barMean
= 0;
88
double
q6barP50
= 0;
89
int
q6barIce
= 0;
93
int
nChillCore
= 0;
94
int
cChillCore
= 0;
95
int
hChillCore
= 0;
96
int
nChillExt
= 0;
97
int
cChillExt
= 0;
98
int
hChillExt
= 0;
99
int
nOvitoCore
= 0;
100
int
cOvitoCore
= 0;
101
int
hOvitoCore
= 0;
102
int
nOvitoExt
= 0;
103
int
cOvitoExt
= 0;
104
int
hOvitoExt
= 0;
105
int
nQ6
= 0;
106
int
cQ6
= 0;
107
int
hQ6
= 0;
108
int
nSym
= 0;
109
int
cSym
= 0;
110
int
hSym
= 0;
113
int
nQ6Solid
= 0;
114
int
cQ6Solid
= 0;
115
int
hQ6Solid
= 0;
116
};
117
121
[[nodiscard]] std::vector<double>
122
q6DotScore
(
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
123
const
std::vector<int> &offsets,
const
std::vector<int> &cols);
124
128
[[nodiscard]]
FrameRecord
129
analyzeFrame
(
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
130
double
cutoff,
int
ringDepth,
int
typeI,
double
q6Cut,
int
frame);
131
133
[[nodiscard]]
double
stackFraction
(
int
cubic,
int
hexagonal);
134
137
struct
Ascent
{
138
int
index
= 0;
139
int
maxIndex
= 0;
140
double
baseline
= 0;
141
double
maximum
= 0;
142
bool
climbed
=
false
;
143
};
144
145
[[nodiscard]]
Ascent
finalAscent
(
const
std::vector<double> &series);
146
151
struct
GrowBasin
{
152
bool
occupied
=
false
;
153
double
barrier
= 0;
154
int
index
= -1;
155
};
156
157
[[nodiscard]]
GrowBasin
growBasin
(
const
std::vector<double> &series);
158
163
enum class
CommittorFate
{
uncommitted
,
committed
,
truncated
};
164
165
struct
CommittorCall
{
166
CommittorFate
fate
=
CommittorFate::uncommitted
;
167
GrowBasin
basin
;
168
bool
cutAtTwiceN
=
false
;
169
};
170
171
[[nodiscard]]
CommittorCall
committorOf
(
const
std::vector<double> &series,
int
molecules);
172
177
struct
HalfRise
{
178
bool
ok
=
false
;
179
int
index
= -1;
180
double
start
= 0;
181
double
level
= 0;
182
double
maximum
= 0;
183
};
184
185
[[nodiscard]]
HalfRise
halfRise
(
const
std::vector<double> &series);
186
189
struct
Lead
{
190
bool
ok
=
false
;
191
int
ascentFrames
= 0;
192
int
halfFrames
= 0;
193
int
corrLag
= 0;
194
double
corr
= 0;
195
};
196
199
[[nodiscard]]
Lead
ringLead
(
const
std::vector<double> &ringFraction,
200
const
std::vector<double> &iceFraction);
201
202
struct
Shift
{
203
int
dSize
= 0;
204
int
dFrame
= 0;
205
};
206
209
[[nodiscard]]
Shift
definitionShift
(
int
sizeA,
int
frameA,
int
sizeB,
int
frameB);
210
211
}
// namespace nucleation
212
213
#endif
mol_sys.hpp
The main molecular system handler.
nucleation
Definition
nucleation_pathway.hpp:43
nucleation::q6DotScore
std::vector< double > q6DotScore(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const std::vector< int > &offsets, const std::vector< int > &cols)
nucleation::ringLead
Lead ringLead(const std::vector< double > &ringFraction, const std::vector< double > &iceFraction)
nucleation::finalAscent
Ascent finalAscent(const std::vector< double > &series)
nucleation::kCutoffA
constexpr double kCutoffA
Published CHILL+ cutoff. Not a fitted parameter.
Definition
nucleation_pathway.hpp:46
nucleation::stackFraction
double stackFraction(int cubic, int hexagonal)
Cubic / (cubic + hexagonal). Quiet NaN when the denominator is 0.
nucleation::definitionShift
Shift definitionShift(int sizeA, int frameA, int sizeB, int frameB)
nucleation::analyzeFrame
FrameRecord analyzeFrame(molSys::PointCloud< molSys::Point< double >, double > &cloud, double cutoff, int ringDepth, int typeI, double q6Cut, int frame)
nucleation::kRingDepth
constexpr int kRingDepth
Primitive rings through this size. Depth 7 is the adjacency-row search.
Definition
nucleation_pathway.hpp:49
nucleation::committorOf
CommittorCall committorOf(const std::vector< double > &series, int molecules)
nucleation::halfRise
HalfRise halfRise(const std::vector< double > &series)
nucleation::CommittorFate
CommittorFate
Definition
nucleation_pathway.hpp:163
nucleation::CommittorFate::uncommitted
@ uncommitted
Definition
nucleation_pathway.hpp:163
nucleation::CommittorFate::truncated
@ truncated
Definition
nucleation_pathway.hpp:163
nucleation::CommittorFate::committed
@ committed
Definition
nucleation_pathway.hpp:163
nucleation::kQ6SolidCutoffA
constexpr double kQ6SolidCutoffA
Definition
nucleation_pathway.hpp:64
nucleation::growBasin
GrowBasin growBasin(const std::vector< double > &series)
nucleation::kQ6BarIceCut
constexpr double kQ6BarIceCut
Definition
nucleation_pathway.hpp:54
nucleation::kQ6SolidCut
constexpr double kQ6SolidCut
Definition
nucleation_pathway.hpp:65
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
nucleation::Ascent
Definition
nucleation_pathway.hpp:137
nucleation::Ascent::index
int index
Definition
nucleation_pathway.hpp:138
nucleation::Ascent::baseline
double baseline
Definition
nucleation_pathway.hpp:140
nucleation::Ascent::climbed
bool climbed
Definition
nucleation_pathway.hpp:142
nucleation::Ascent::maxIndex
int maxIndex
Definition
nucleation_pathway.hpp:139
nucleation::Ascent::maximum
double maximum
Definition
nucleation_pathway.hpp:141
nucleation::CommittorCall
Definition
nucleation_pathway.hpp:165
nucleation::CommittorCall::basin
GrowBasin basin
Definition
nucleation_pathway.hpp:167
nucleation::CommittorCall::fate
CommittorFate fate
Definition
nucleation_pathway.hpp:166
nucleation::CommittorCall::cutAtTwiceN
bool cutAtTwiceN
Definition
nucleation_pathway.hpp:168
nucleation::FrameRecord
Definition
nucleation_pathway.hpp:67
nucleation::FrameRecord::cOvitoExt
int cOvitoExt
Definition
nucleation_pathway.hpp:103
nucleation::FrameRecord::nSym
int nSym
Definition
nucleation_pathway.hpp:108
nucleation::FrameRecord::hQ6
int hQ6
Definition
nucleation_pathway.hpp:107
nucleation::FrameRecord::timestep
long long timestep
Definition
nucleation_pathway.hpp:69
nucleation::FrameRecord::cOvitoCore
int cOvitoCore
Definition
nucleation_pathway.hpp:100
nucleation::FrameRecord::cQ6
int cQ6
Definition
nucleation_pathway.hpp:106
nucleation::FrameRecord::nChillExt
int nChillExt
Definition
nucleation_pathway.hpp:96
nucleation::FrameRecord::chillClath
int chillClath
Definition
nucleation_pathway.hpp:76
nucleation::FrameRecord::nQ6
int nQ6
Definition
nucleation_pathway.hpp:105
nucleation::FrameRecord::nOvitoExt
int nOvitoExt
Definition
nucleation_pathway.hpp:102
nucleation::FrameRecord::frame
int frame
Definition
nucleation_pathway.hpp:68
nucleation::FrameRecord::ovitoHex
int ovitoHex
Definition
nucleation_pathway.hpp:80
nucleation::FrameRecord::cQ6Solid
int cQ6Solid
Definition
nucleation_pathway.hpp:114
nucleation::FrameRecord::ovitoInterClath
int ovitoInterClath
Definition
nucleation_pathway.hpp:83
nucleation::FrameRecord::nQ6Solid
int nQ6Solid
Definition
nucleation_pathway.hpp:113
nucleation::FrameRecord::q6barMean
double q6barMean
Definition
nucleation_pathway.hpp:87
nucleation::FrameRecord::cChillCore
int cChillCore
Definition
nucleation_pathway.hpp:94
nucleation::FrameRecord::hOvitoCore
int hOvitoCore
Definition
nucleation_pathway.hpp:101
nucleation::FrameRecord::nOvitoCore
int nOvitoCore
Definition
nucleation_pathway.hpp:99
nucleation::FrameRecord::nChillCore
int nChillCore
Definition
nucleation_pathway.hpp:93
nucleation::FrameRecord::hChillCore
int hChillCore
Definition
nucleation_pathway.hpp:95
nucleation::FrameRecord::nop
int nop
Definition
nucleation_pathway.hpp:70
nucleation::FrameRecord::hSym
int hSym
Definition
nucleation_pathway.hpp:110
nucleation::FrameRecord::ovitoCubic
int ovitoCubic
Definition
nucleation_pathway.hpp:79
nucleation::FrameRecord::ovitoInter
int ovitoInter
Definition
nucleation_pathway.hpp:81
nucleation::FrameRecord::symCubic
int symCubic
Definition
nucleation_pathway.hpp:85
nucleation::FrameRecord::hChillExt
int hChillExt
Definition
nucleation_pathway.hpp:98
nucleation::FrameRecord::symHex
int symHex
Definition
nucleation_pathway.hpp:86
nucleation::FrameRecord::ringCount
long long ringCount[8]
Primitive rings of each size. Index is the ring size. 0 and 1 stay 0.
Definition
nucleation_pathway.hpp:72
nucleation::FrameRecord::q6barIce
int q6barIce
Definition
nucleation_pathway.hpp:89
nucleation::FrameRecord::chillInterClath
int chillInterClath
Definition
nucleation_pathway.hpp:77
nucleation::FrameRecord::hOvitoExt
int hOvitoExt
Definition
nucleation_pathway.hpp:104
nucleation::FrameRecord::chillHex
int chillHex
Definition
nucleation_pathway.hpp:74
nucleation::FrameRecord::chillCubic
int chillCubic
Definition
nucleation_pathway.hpp:73
nucleation::FrameRecord::chillInter
int chillInter
Definition
nucleation_pathway.hpp:75
nucleation::FrameRecord::chillWater
int chillWater
Definition
nucleation_pathway.hpp:78
nucleation::FrameRecord::cChillExt
int cChillExt
Definition
nucleation_pathway.hpp:97
nucleation::FrameRecord::ovitoClath
int ovitoClath
Definition
nucleation_pathway.hpp:82
nucleation::FrameRecord::hQ6Solid
int hQ6Solid
Definition
nucleation_pathway.hpp:115
nucleation::FrameRecord::ovitoWater
int ovitoWater
Definition
nucleation_pathway.hpp:84
nucleation::FrameRecord::q6barP50
double q6barP50
Definition
nucleation_pathway.hpp:88
nucleation::FrameRecord::cSym
int cSym
Definition
nucleation_pathway.hpp:109
nucleation::GrowBasin
Definition
nucleation_pathway.hpp:151
nucleation::GrowBasin::occupied
bool occupied
Definition
nucleation_pathway.hpp:152
nucleation::GrowBasin::index
int index
Definition
nucleation_pathway.hpp:154
nucleation::GrowBasin::barrier
double barrier
Definition
nucleation_pathway.hpp:153
nucleation::HalfRise
Definition
nucleation_pathway.hpp:177
nucleation::HalfRise::maximum
double maximum
Definition
nucleation_pathway.hpp:182
nucleation::HalfRise::ok
bool ok
Definition
nucleation_pathway.hpp:178
nucleation::HalfRise::level
double level
Definition
nucleation_pathway.hpp:181
nucleation::HalfRise::index
int index
Definition
nucleation_pathway.hpp:179
nucleation::HalfRise::start
double start
Definition
nucleation_pathway.hpp:180
nucleation::Lead
Definition
nucleation_pathway.hpp:189
nucleation::Lead::ok
bool ok
Definition
nucleation_pathway.hpp:190
nucleation::Lead::halfFrames
int halfFrames
Definition
nucleation_pathway.hpp:192
nucleation::Lead::ascentFrames
int ascentFrames
Definition
nucleation_pathway.hpp:191
nucleation::Lead::corr
double corr
Definition
nucleation_pathway.hpp:194
nucleation::Lead::corrLag
int corrLag
Definition
nucleation_pathway.hpp:193
nucleation::Shift
Definition
nucleation_pathway.hpp:202
nucleation::Shift::dSize
int dSize
Definition
nucleation_pathway.hpp:203
nucleation::Shift::dFrame
int dFrame
Definition
nucleation_pathway.hpp:204
src
include
internal
nucleation_pathway.hpp