Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
PhaseSearchTypes.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
12
13#include <cstdint>
14#include <string_view>
15#include <vector>
16
17namespace correlation::app {
18
37
53
71
97
103 std::vector<float> bin_centers;
104 std::vector<uint32_t> counts;
105 float min_val{0.0F};
106 float max_val{1.0F};
107 float bin_width{0.02F};
109 uint32_t total_atom_count{0};
110};
111
117 static constexpr std::size_t K_GRID_SIZE = 128;
118 std::vector<uint32_t> counts;
119 float min_x{0.0F};
120 float max_x{1.0F};
121 float min_y{0.0F};
122 float max_y{1.0F};
123 float bin_width_x{0.0078125F};
124 float bin_width_y{0.0078125F};
125 uint32_t max_count{0};
127 0,
128 };
129 uint32_t total_atom_count{0};
130};
131
137 std::string_view
139 float x_ratio{0.0F};
140 float y_ratio{0.0F};
141 float width_ratio{0.0F};
142 float height_ratio{0.0F};
143 bool is_area{false};
144};
145
151[[nodiscard]] constexpr std::string_view descriptorToString(PhaseDescriptor descriptor) noexcept {
152 switch (descriptor) {
154 return "q̄₆";
156 return "q̄₄";
158 return "q₆";
160 return "q₄";
162 return "ŵ₆";
164 return "ŵ₄";
166 return "s₂ (LEF)";
168 return "N_conn (TWF)";
170 return "q_tet (Tetrahedral)";
172 return "|Δr| (Disp)";
174 return "D²_min (Strain)";
176 return "N(E_F) (LDOS)";
177 }
178 return "Unknown";
179}
180
186[[nodiscard]] constexpr std::string_view presetToString(CrystalPreset preset) noexcept {
187 switch (preset) {
189 return "Custom";
191 return "Liquid";
193 return "Glass";
195 return "a-Net";
197 return "FCC";
199 return "HCP";
201 return "BCC";
203 return "Icosahedral";
205 return "Diamond";
206 }
207 return "Unknown";
208}
209
215[[nodiscard]] constexpr PhasePresetConfig getPresetConfig(CrystalPreset preset) noexcept {
216 switch (preset) {
218 return {
219 .descriptor = PhaseDescriptor::Q6Bar,
220 .min_threshold = 0.06F,
221 .max_threshold = 0.22F,
222 .is_2d = true,
223 .descriptor_2d_x = PhaseDescriptor::Q6Bar,
224 .min_threshold_2d_x = 0.06F,
225 .max_threshold_2d_x = 0.22F,
226 .descriptor_2d_y = PhaseDescriptor::LocalEntropy,
227 .min_threshold_2d_y = -3.5F,
228 .max_threshold_2d_y = -1.5F,
229 };
231 return {
232 .descriptor = PhaseDescriptor::LocalEntropy,
233 .min_threshold = -5.5F,
234 .max_threshold = -3.5F,
235 .is_2d = true,
236 .descriptor_2d_x = PhaseDescriptor::Q6Bar,
237 .min_threshold_2d_x = 0.10F,
238 .max_threshold_2d_x = 0.26F,
239 .descriptor_2d_y = PhaseDescriptor::LocalEntropy,
240 .min_threshold_2d_y = -5.5F,
241 .max_threshold_2d_y = -3.5F,
242 };
244 return {
245 .descriptor = PhaseDescriptor::QTet,
246 .min_threshold = 0.75F,
247 .max_threshold = 0.95F,
248 .is_2d = true,
249 .descriptor_2d_x = PhaseDescriptor::QTet,
250 .min_threshold_2d_x = 0.75F,
251 .max_threshold_2d_x = 0.95F,
252 .descriptor_2d_y = PhaseDescriptor::LocalEntropy,
253 .min_threshold_2d_y = -5.5F,
254 .max_threshold_2d_y = -3.5F,
255 };
257 return {
258 .descriptor = PhaseDescriptor::Q6Bar,
259 .min_threshold = 0.52F,
260 .max_threshold = 0.62F,
261 .is_2d = true,
262 .descriptor_2d_x = PhaseDescriptor::Q6Bar,
263 .min_threshold_2d_x = 0.52F,
264 .max_threshold_2d_x = 0.62F,
265 .descriptor_2d_y = PhaseDescriptor::Q4Bar,
266 .min_threshold_2d_y = 0.14F,
267 .max_threshold_2d_y = 0.24F,
268 };
270 return {
271 .descriptor = PhaseDescriptor::Q6Bar,
272 .min_threshold = 0.44F,
273 .max_threshold = 0.53F,
274 .is_2d = true,
275 .descriptor_2d_x = PhaseDescriptor::Q6Bar,
276 .min_threshold_2d_x = 0.44F,
277 .max_threshold_2d_x = 0.53F,
278 .descriptor_2d_y = PhaseDescriptor::Q4Bar,
279 .min_threshold_2d_y = 0.05F,
280 .max_threshold_2d_y = 0.14F,
281 };
283 return {
284 .descriptor = PhaseDescriptor::Q6Bar,
285 .min_threshold = 0.47F,
286 .max_threshold = 0.55F,
287 .is_2d = true,
288 .descriptor_2d_x = PhaseDescriptor::Q6Bar,
289 .min_threshold_2d_x = 0.47F,
290 .max_threshold_2d_x = 0.55F,
291 .descriptor_2d_y = PhaseDescriptor::Q4Bar,
292 .min_threshold_2d_y = 0.01F,
293 .max_threshold_2d_y = 0.07F,
294 };
296 return {
297 .descriptor = PhaseDescriptor::W6Hat,
298 .min_threshold = -0.18F,
299 .max_threshold = -0.15F,
300 .is_2d = true,
301 .descriptor_2d_x = PhaseDescriptor::Q6Bar,
302 .min_threshold_2d_x = 0.10F,
303 .max_threshold_2d_x = 0.20F,
304 .descriptor_2d_y = PhaseDescriptor::W6Hat,
305 .min_threshold_2d_y = -0.18F,
306 .max_threshold_2d_y = -0.15F,
307 };
309 return {
310 .descriptor = PhaseDescriptor::QTet,
311 .min_threshold = 0.88F,
312 .max_threshold = 1.05F,
313 .is_2d = true,
314 .descriptor_2d_x = PhaseDescriptor::QTet,
315 .min_threshold_2d_x = 0.88F,
316 .max_threshold_2d_x = 1.05F,
317 .descriptor_2d_y = PhaseDescriptor::Q6Bar,
318 .min_threshold_2d_y = 0.55F,
319 .max_threshold_2d_y = 0.70F,
320 };
322 default:
323 return {.descriptor = PhaseDescriptor::Q6Bar, .min_threshold = 0.0F, .max_threshold = 1.0F};
324 }
325}
326
333[[nodiscard]] constexpr std::pair<float, float>
335 switch (descriptor) {
337 return {-0.26F, 0.12F};
339 return {-0.26F, 0.26F};
341 return {-12.0F, 0.6F};
343 return {0.0F, 20.0F};
345 return {-0.25F, 1.15F};
347 return {0.0F, 5.0F};
349 return {0.0F, 10.0F};
351 return {0.0F, 3.0F};
354 return {0.0F, 0.90F};
357 default:
358 return {-0.05F, 1.05F};
359 }
360}
361
362namespace detail {
363
365 std::string_view label;
366 float x{0.0F};
367 float y{0.0F};
368 float width{0.0F};
369 float height{0.0F};
370 bool is_area{true};
371};
372
373[[nodiscard]] constexpr CrystalMarkerData
374toNormalizedMarker(const PhysicalMarker &marker, std::pair<float, float> domain_x,
375 std::pair<float, float> domain_y) noexcept {
376 const float span_x = std::max(domain_x.second - domain_x.first, 1e-6F);
377 const float span_y = std::max(domain_y.second - domain_y.first, 1e-6F);
378 const float x_ratio = std::clamp((marker.x - domain_x.first) / span_x, 0.0F, 1.0F);
379 const float y_ratio = std::clamp((domain_y.second - marker.y) / span_y, 0.0F, 1.0F);
380 const float width_ratio = std::clamp(marker.width / span_x, 0.0F, 1.0F);
381 const float height_ratio = std::clamp(marker.height / span_y, 0.0F, 1.0F);
382 return CrystalMarkerData{
383 .label = marker.label,
384 .x_ratio = x_ratio,
385 .y_ratio = y_ratio,
386 .width_ratio = width_ratio,
387 .height_ratio = height_ratio,
388 .is_area = marker.is_area,
389 };
390}
391
392[[nodiscard]] constexpr PhysicalMarker swapAxes(const PhysicalMarker &marker) noexcept {
393 return PhysicalMarker{
394 .label = marker.label,
395 .x = marker.y,
396 .y = marker.x,
397 .width = marker.height,
398 .height = marker.width,
399 .is_area = marker.is_area,
400 };
401}
402
403[[nodiscard]] inline std::vector<CrystalMarkerData>
404normalizeMarkers(std::span<const PhysicalMarker> physical_markers, PhaseDescriptor desc_x,
405 PhaseDescriptor desc_y) noexcept {
406 const auto domain_x = getDescriptorDomain(desc_x);
407 const auto domain_y = getDescriptorDomain(desc_y);
408 std::vector<CrystalMarkerData> result;
409 result.reserve(physical_markers.size());
410 for (const auto &phy_marker : physical_markers) {
411 result.push_back(toNormalizedMarker(phy_marker, domain_x, domain_y));
412 }
413 return result;
414}
415
416[[nodiscard]] inline std::vector<CrystalMarkerData>
417normalizeSwappedMarkers(std::span<const PhysicalMarker> physical_markers, PhaseDescriptor desc_x,
418 PhaseDescriptor desc_y) noexcept {
419 const auto domain_x = getDescriptorDomain(desc_x);
420 const auto domain_y = getDescriptorDomain(desc_y);
421 std::vector<CrystalMarkerData> result;
422 result.reserve(physical_markers.size());
423 for (const auto &phy_marker : physical_markers) {
424 result.push_back(toNormalizedMarker(swapAxes(phy_marker), domain_x, domain_y));
425 }
426 return result;
427}
428
429inline constexpr std::array<PhysicalMarker, 8> K_MARKERS_Q6_Q4{{
430 PhysicalMarker{.label = "FCC", .x = 0.575F, .y = 0.191F, .width = 0.10F, .height = 0.10F},
431 PhysicalMarker{.label = "HCP", .x = 0.485F, .y = 0.097F, .width = 0.09F, .height = 0.08F},
432 PhysicalMarker{.label = "BCC", .x = 0.511F, .y = 0.036F, .width = 0.08F, .height = 0.06F},
433 PhysicalMarker{.label = "Dia", .x = 0.628F, .y = 0.509F, .width = 0.10F, .height = 0.10F},
434 PhysicalMarker{.label = "SC", .x = 0.354F, .y = 0.764F, .width = 0.08F, .height = 0.08F},
435 PhysicalMarker{.label = "HD", .x = 0.445F, .y = 0.108F, .width = 0.08F, .height = 0.08F},
436 PhysicalMarker{.label = "Ico", .x = 0.199F, .y = 0.000F, .width = 0.08F, .height = 0.06F},
437 PhysicalMarker{.label = "Liq", .x = 0.120F, .y = 0.025F, .width = 0.14F, .height = 0.08F},
438}};
439
440inline constexpr std::array<PhysicalMarker, 8> K_MARKERS_Q6_W6{{
441 PhysicalMarker{.label = "FCC", .x = 0.575F, .y = -0.013F, .width = 0.10F, .height = 0.03F},
442 PhysicalMarker{.label = "HCP", .x = 0.485F, .y = -0.012F, .width = 0.09F, .height = 0.03F},
443 PhysicalMarker{.label = "BCC", .x = 0.511F, .y = 0.013F, .width = 0.08F, .height = 0.03F},
444 PhysicalMarker{.label = "Dia", .x = 0.628F, .y = -0.013F, .width = 0.10F, .height = 0.03F},
445 PhysicalMarker{.label = "SC", .x = 0.354F, .y = 0.013F, .width = 0.08F, .height = 0.03F},
446 PhysicalMarker{.label = "HD", .x = 0.445F, .y = -0.012F, .width = 0.08F, .height = 0.03F},
447 PhysicalMarker{.label = "Ico", .x = 0.150F, .y = -0.165F, .width = 0.08F, .height = 0.04F},
448 PhysicalMarker{.label = "Liq", .x = 0.120F, .y = 0.000F, .width = 0.14F, .height = 0.04F},
449}};
450
451inline constexpr std::array<PhysicalMarker, 6> K_MARKERS_Q4_W4{{
452 PhysicalMarker{.label = "FCC", .x = 0.191F, .y = -0.159F, .width = 0.10F, .height = 0.05F},
453 PhysicalMarker{.label = "HCP", .x = 0.097F, .y = 0.134F, .width = 0.08F, .height = 0.04F},
454 PhysicalMarker{.label = "BCC", .x = 0.036F, .y = 0.159F, .width = 0.08F, .height = 0.04F},
455 PhysicalMarker{.label = "Dia", .x = 0.509F, .y = -0.159F, .width = 0.10F, .height = 0.05F},
456 PhysicalMarker{.label = "SC", .x = 0.764F, .y = 0.159F, .width = 0.08F, .height = 0.04F},
457 PhysicalMarker{.label = "Ico", .x = 0.000F, .y = 0.000F, .width = 0.08F, .height = 0.05F},
458}};
459
460inline constexpr std::array<PhysicalMarker, 6> K_MARKERS_Q6_LOCAL_ENTROPY{{
461 PhysicalMarker{.label = "FCC", .x = 0.575F, .y = -8.00F, .width = 0.10F, .height = 2.0F},
462 PhysicalMarker{.label = "HCP", .x = 0.485F, .y = -8.00F, .width = 0.09F, .height = 2.0F},
463 PhysicalMarker{.label = "BCC", .x = 0.511F, .y = -7.00F, .width = 0.09F, .height = 2.0F},
464 PhysicalMarker{.label = "Ico", .x = 0.200F, .y = -6.50F, .width = 0.09F, .height = 2.0F},
465 PhysicalMarker{.label = "Gl", .x = 0.178F, .y = -4.50F, .width = 0.16F, .height = 2.0F},
466 PhysicalMarker{.label = "Liq", .x = 0.140F, .y = -2.50F, .width = 0.16F, .height = 2.0F},
467}};
468
469// Calibrated against Errington & Debenedetti (Nature 2001), Martelli et al. (PRB 2017 / PNAS
470// 2018), and Piaggi & Parrinello (JCP 2017) / Gartner et al. (PRL 2020) for (q_tet, s_2):
471// Dia/Ice: q_tet ~ 0.94–1.00, s_2 ~ -9.1 to -6.9 k_B
472// LDA: q_tet ~ 0.80–0.95 (mean ~0.88–0.91), s_2 ~ -7.3 to -5.1 k_B
473// HDA: q_tet ~ 0.62–0.78 (mean ~0.70–0.74), s_2 ~ -6.0 to -4.0 k_B
474// Liq: q_tet ~ 0.45–0.71 (ambient/supercooled water), s_2 ~ -4.1 to -1.9 k_B
475inline constexpr std::array<PhysicalMarker, 4> K_MARKERS_QTET_LOCAL_ENTROPY{{
476 PhysicalMarker{.label = "Dia", .x = 0.965F, .y = -8.00F, .width = 0.14F, .height = 2.2F},
477 PhysicalMarker{.label = "LDA", .x = 0.880F, .y = -6.20F, .width = 0.18F, .height = 2.2F},
478 PhysicalMarker{.label = "HDA", .x = 0.700F, .y = -5.00F, .width = 0.18F, .height = 2.0F},
479 PhysicalMarker{.label = "Liq", .x = 0.580F, .y = -3.00F, .width = 0.26F, .height = 2.2F},
480}};
481
482inline constexpr std::array<PhysicalMarker, 8> K_MARKERS_QTET_Q6{{
483 PhysicalMarker{.label = "Dia", .x = 0.965F, .y = 0.628F, .width = 0.14F, .height = 0.10F},
484 PhysicalMarker{.label = "HD", .x = 0.960F, .y = 0.445F, .width = 0.12F, .height = 0.08F},
485 PhysicalMarker{.label = "a-Net", .x = 0.850F, .y = 0.150F, .width = 0.20F, .height = 0.12F},
486 PhysicalMarker{.label = "FCC", .x = 0.000F, .y = 0.575F, .width = 0.10F, .height = 0.08F},
487 PhysicalMarker{.label = "HCP", .x = 0.000F, .y = 0.485F, .width = 0.10F, .height = 0.08F},
488 PhysicalMarker{.label = "BCC", .x = 0.000F, .y = 0.511F, .width = 0.10F, .height = 0.08F},
489 PhysicalMarker{.label = "SC", .x = 0.000F, .y = 0.354F, .width = 0.10F, .height = 0.08F},
490 PhysicalMarker{.label = "Liq", .x = 0.350F, .y = 0.120F, .width = 0.20F, .height = 0.12F},
491}};
492
493[[nodiscard]] inline std::vector<CrystalMarkerData>
495 const auto is_q6 = [](PhaseDescriptor descriptor) noexcept {
496 return descriptor == PhaseDescriptor::Q6Bar || descriptor == PhaseDescriptor::Q6;
497 };
498 const auto is_q4 = [](PhaseDescriptor descriptor) noexcept {
499 return descriptor == PhaseDescriptor::Q4Bar || descriptor == PhaseDescriptor::Q4;
500 };
501
502 if (is_q4(desc_x) && is_q6(desc_y)) {
503 return normalizeSwappedMarkers(K_MARKERS_Q6_Q4, desc_x, desc_y);
504 }
505 if (is_q6(desc_x) && is_q4(desc_y)) {
506 return normalizeMarkers(K_MARKERS_Q6_Q4, desc_x, desc_y);
507 }
508 if (is_q6(desc_x) && desc_y == PhaseDescriptor::W6Hat) {
509 return normalizeMarkers(K_MARKERS_Q6_W6, desc_x, desc_y);
510 }
511 if (desc_x == PhaseDescriptor::W6Hat && is_q6(desc_y)) {
512 return normalizeSwappedMarkers(K_MARKERS_Q6_W6, desc_x, desc_y);
513 }
514 if (is_q4(desc_x) && desc_y == PhaseDescriptor::W4Hat) {
515 return normalizeMarkers(K_MARKERS_Q4_W4, desc_x, desc_y);
516 }
517 if (desc_x == PhaseDescriptor::W4Hat && is_q4(desc_y)) {
518 return normalizeSwappedMarkers(K_MARKERS_Q4_W4, desc_x, desc_y);
519 }
520 return {};
521}
522
523[[nodiscard]] inline std::vector<CrystalMarkerData>
525 const auto is_q6 = [](PhaseDescriptor descriptor) noexcept {
526 return descriptor == PhaseDescriptor::Q6Bar || descriptor == PhaseDescriptor::Q6;
527 };
528
529 if (is_q6(desc_x) && desc_y == PhaseDescriptor::LocalEntropy) {
530 return normalizeMarkers(K_MARKERS_Q6_LOCAL_ENTROPY, desc_x, desc_y);
531 }
532 if (desc_x == PhaseDescriptor::LocalEntropy && is_q6(desc_y)) {
534 }
535 if (desc_x == PhaseDescriptor::QTet && desc_y == PhaseDescriptor::LocalEntropy) {
536 return normalizeMarkers(K_MARKERS_QTET_LOCAL_ENTROPY, desc_x, desc_y);
537 }
538 if (desc_x == PhaseDescriptor::LocalEntropy && desc_y == PhaseDescriptor::QTet) {
540 }
541 if (desc_x == PhaseDescriptor::QTet && is_q6(desc_y)) {
542 return normalizeMarkers(K_MARKERS_QTET_Q6, desc_x, desc_y);
543 }
544 if (is_q6(desc_x) && desc_y == PhaseDescriptor::QTet) {
545 return normalizeSwappedMarkers(K_MARKERS_QTET_Q6, desc_x, desc_y);
546 }
547 return {};
548}
549
550} // namespace detail
551
558[[nodiscard]] inline std::vector<CrystalMarkerData>
560 auto steinhardt_markers = detail::getSteinhardtPairMarkers(desc_x, desc_y);
561 if (!steinhardt_markers.empty()) {
562 return steinhardt_markers;
563 }
564 return detail::getDisorderedPairMarkers(desc_x, desc_y);
565}
566
567} // namespace correlation::app
High-throughput scientific colormap engine and precomputed LUT service.
Definition PhaseSearchTypes.hpp:362
constexpr std::array< PhysicalMarker, 6 > K_MARKERS_Q6_LOCAL_ENTROPY
Definition PhaseSearchTypes.hpp:460
constexpr PhysicalMarker swapAxes(const PhysicalMarker &marker) noexcept
Definition PhaseSearchTypes.hpp:392
constexpr std::array< PhysicalMarker, 8 > K_MARKERS_QTET_Q6
Definition PhaseSearchTypes.hpp:482
std::vector< CrystalMarkerData > getSteinhardtPairMarkers(PhaseDescriptor desc_x, PhaseDescriptor desc_y) noexcept
Definition PhaseSearchTypes.hpp:494
std::vector< CrystalMarkerData > normalizeMarkers(std::span< const PhysicalMarker > physical_markers, PhaseDescriptor desc_x, PhaseDescriptor desc_y) noexcept
Definition PhaseSearchTypes.hpp:404
constexpr std::array< PhysicalMarker, 8 > K_MARKERS_Q6_W6
Definition PhaseSearchTypes.hpp:440
std::vector< CrystalMarkerData > normalizeSwappedMarkers(std::span< const PhysicalMarker > physical_markers, PhaseDescriptor desc_x, PhaseDescriptor desc_y) noexcept
Definition PhaseSearchTypes.hpp:417
constexpr std::array< PhysicalMarker, 8 > K_MARKERS_Q6_Q4
Definition PhaseSearchTypes.hpp:429
std::vector< CrystalMarkerData > getDisorderedPairMarkers(PhaseDescriptor desc_x, PhaseDescriptor desc_y) noexcept
Definition PhaseSearchTypes.hpp:524
constexpr std::array< PhysicalMarker, 4 > K_MARKERS_QTET_LOCAL_ENTROPY
Definition PhaseSearchTypes.hpp:475
constexpr std::array< PhysicalMarker, 6 > K_MARKERS_Q4_W4
Definition PhaseSearchTypes.hpp:451
constexpr CrystalMarkerData toNormalizedMarker(const PhysicalMarker &marker, std::pair< float, float > domain_x, std::pair< float, float > domain_y) noexcept
Definition PhaseSearchTypes.hpp:374
Definition AppController.hpp:27
constexpr std::string_view descriptorToString(PhaseDescriptor descriptor) noexcept
Converts PhaseDescriptor to human-readable string representation.
Definition PhaseSearchTypes.hpp:151
PhaseDescriptor
Bond-orientational order parameter descriptors available for phase filtering.
Definition PhaseSearchTypes.hpp:23
@ Q6Bar
Lechner-Dellago averaged q̄₆ (primary crystal symmetry descriptor).
Definition PhaseSearchTypes.hpp:24
@ Q4Bar
Lechner-Dellago averaged q̄₄.
Definition PhaseSearchTypes.hpp:25
@ W6Hat
Normalized third-order invariant ŵ₆ (distinguishes icosahedral symmetry).
Definition PhaseSearchTypes.hpp:28
@ Displacement
Cumulative PBC-unwrapped atomic displacement |Δr| relative to frame 0 (Å).
Definition PhaseSearchTypes.hpp:33
@ TwfNconn
Ten Wolde-Frenkel coherent bond count (N_conn).
Definition PhaseSearchTypes.hpp:31
@ Q4
Standard single-atom q₄.
Definition PhaseSearchTypes.hpp:27
@ LocalEntropy
Local Entropic Fingerprint (s_i / k_B).
Definition PhaseSearchTypes.hpp:30
@ FermiLDOS
Site-resolved Fermi-level electronic LDOS N_i(E_F) (states/eV/atom).
Definition PhaseSearchTypes.hpp:35
@ Q6
Standard single-atom q₆.
Definition PhaseSearchTypes.hpp:26
@ QTet
Chau-Hardwick tetrahedral order parameter (q_tet).
Definition PhaseSearchTypes.hpp:32
@ W4Hat
Normalized third-order invariant ŵ₄.
Definition PhaseSearchTypes.hpp:29
@ D2Min
Falk-Langer non-affine squared displacement D²_min relative to frame 0 (Ų).
Definition PhaseSearchTypes.hpp:34
constexpr std::string_view presetToString(CrystalPreset preset) noexcept
Converts CrystalPreset to human-readable string representation.
Definition PhaseSearchTypes.hpp:186
constexpr PhasePresetConfig getPresetConfig(CrystalPreset preset) noexcept
Retrieves nominal descriptor and threshold bounds for canonical crystal presets.
Definition PhaseSearchTypes.hpp:215
CrystalPreset
Canonical crystal structure and disordered state presets.
Definition PhaseSearchTypes.hpp:42
@ BCC
Body-Centered Cubic lattice.
Definition PhaseSearchTypes.hpp:49
@ AmorphousGlass
Dense random-packed metallic / structural glass.
Definition PhaseSearchTypes.hpp:45
@ Liquid
Disordered / equilibrium liquid state.
Definition PhaseSearchTypes.hpp:44
@ Diamond
Diamond / tetrahedral network lattice.
Definition PhaseSearchTypes.hpp:51
@ Custom
User-defined manual threshold boundaries.
Definition PhaseSearchTypes.hpp:43
@ FCC
Face-Centered Cubic lattice.
Definition PhaseSearchTypes.hpp:47
@ AmorphousNetwork
Tetrahedral network glass (e.g., a-Si, a-Ge, LDA water).
Definition PhaseSearchTypes.hpp:46
@ HCP
Hexagonal Close-Packed lattice.
Definition PhaseSearchTypes.hpp:48
@ Icosahedral
Icosahedral quasi-crystalline / cluster symmetry.
Definition PhaseSearchTypes.hpp:50
std::vector< CrystalMarkerData > getCrystalReferenceMarkers(PhaseDescriptor desc_x, PhaseDescriptor desc_y) noexcept
Computes normalized reference coordinates for canonical crystal phases in 2D space.
Definition PhaseSearchTypes.hpp:559
constexpr std::pair< float, float > getDescriptorDomain(PhaseDescriptor descriptor) noexcept
Returns domain bounds [min, max] for a given order descriptor.
Definition PhaseSearchTypes.hpp:334
ColormapType
Supported scientific colormaps for scalar mapping.
Definition ColormapService.hpp:26
@ Viridis
Definition ColormapService.hpp:26
Canonical crystal reference coordinate normalized to [0, 1] on 2D heatmap.
Definition PhaseSearchTypes.hpp:136
float y_ratio
Normalized Y position [0.0, 1.0] (0 = top, 1 = bottom).
Definition PhaseSearchTypes.hpp:140
bool is_area
True if marker represents an extended phase region.
Definition PhaseSearchTypes.hpp:143
float width_ratio
Normalized width extent [0.0, 1.0].
Definition PhaseSearchTypes.hpp:141
std::string_view label
Crystal phase abbreviation (FCC, HCP, BCC, Ico, Liq, Gl, a-Net, LDA, HDA).
Definition PhaseSearchTypes.hpp:138
float x_ratio
Normalized X position [0.0, 1.0].
Definition PhaseSearchTypes.hpp:139
float height_ratio
Normalized height extent [0.0, 1.0].
Definition PhaseSearchTypes.hpp:142
128x128 joint distribution histogram across two order parameters (X and Y).
Definition PhaseSearchTypes.hpp:116
float bin_width_x
Bin width along X.
Definition PhaseSearchTypes.hpp:123
float bin_width_y
Bin width along Y.
Definition PhaseSearchTypes.hpp:124
std::vector< uint32_t > counts
128x128 grid cells (row 0 is max_y, row 127 is min_y).
Definition PhaseSearchTypes.hpp:118
float max_y
Domain maximum on Y-axis.
Definition PhaseSearchTypes.hpp:122
uint32_t matching_atom_count
Atoms falling inside 2D bounding box [Xmin, Xmax] x [Ymin, Ymax].
Definition PhaseSearchTypes.hpp:126
uint32_t total_atom_count
Total atom count.
Definition PhaseSearchTypes.hpp:129
static constexpr std::size_t K_GRID_SIZE
Definition PhaseSearchTypes.hpp:117
float min_y
Domain minimum on Y-axis.
Definition PhaseSearchTypes.hpp:121
uint32_t max_count
Peak bin count across the 128x128 grid.
Definition PhaseSearchTypes.hpp:125
float min_x
Domain minimum on X-axis.
Definition PhaseSearchTypes.hpp:119
float max_x
Domain maximum on X-axis.
Definition PhaseSearchTypes.hpp:120
50-bin distribution histogram of the active descriptor across all atoms in the frame.
Definition PhaseSearchTypes.hpp:102
std::vector< uint32_t > counts
Atom frequency count per bin.
Definition PhaseSearchTypes.hpp:104
float min_val
Nominal domain minimum.
Definition PhaseSearchTypes.hpp:105
uint32_t matching_atom_count
Number of atoms within [min_threshold, max_threshold].
Definition PhaseSearchTypes.hpp:108
float bin_width
Bin delta spacing.
Definition PhaseSearchTypes.hpp:107
std::vector< float > bin_centers
Center scalar value for each of the 50 bins.
Definition PhaseSearchTypes.hpp:103
float max_val
Nominal domain maximum.
Definition PhaseSearchTypes.hpp:106
uint32_t total_atom_count
Total atom count in configuration.
Definition PhaseSearchTypes.hpp:109
Nominal descriptor and threshold window for a canonical crystal structure or disordered preset.
Definition PhaseSearchTypes.hpp:59
bool is_2d
True if preset defines 2D joint bounds.
Definition PhaseSearchTypes.hpp:63
float max_threshold
1D upper scalar bound.
Definition PhaseSearchTypes.hpp:62
float min_threshold_2d_x
2D X-axis lower scalar bound.
Definition PhaseSearchTypes.hpp:65
PhaseDescriptor descriptor_2d_x
2D X-axis order descriptor.
Definition PhaseSearchTypes.hpp:64
float min_threshold
1D lower scalar bound.
Definition PhaseSearchTypes.hpp:61
float min_threshold_2d_y
2D Y-axis lower scalar bound.
Definition PhaseSearchTypes.hpp:68
float max_threshold_2d_x
2D X-axis upper scalar bound.
Definition PhaseSearchTypes.hpp:66
float max_threshold_2d_y
2D Y-axis upper scalar bound.
Definition PhaseSearchTypes.hpp:69
PhaseDescriptor descriptor
1D order descriptor used by preset.
Definition PhaseSearchTypes.hpp:60
PhaseDescriptor descriptor_2d_y
2D Y-axis order descriptor.
Definition PhaseSearchTypes.hpp:67
Comprehensive configuration bundle for real-time 3D phase transition visualization.
Definition PhaseSearchTypes.hpp:76
PhaseDescriptor descriptor_y
Y-axis order descriptor for 2D mode.
Definition PhaseSearchTypes.hpp:93
bool enabled
Master toggle for phase halos.
Definition PhaseSearchTypes.hpp:77
bool is_2d_mode
True if 2D joint distribution filtering is active.
Definition PhaseSearchTypes.hpp:92
float halo_radius_ratio
Outer glow radius multiplier.
Definition PhaseSearchTypes.hpp:87
float halo_intensity
Alpha glow strength [0.1, 1.0].
Definition PhaseSearchTypes.hpp:86
float min_threshold
Active scalar filter lower bound.
Definition PhaseSearchTypes.hpp:80
float max_threshold_y
Y-axis upper scalar bound.
Definition PhaseSearchTypes.hpp:95
float dim_factor
Luminance factor for non-matches.
Definition PhaseSearchTypes.hpp:91
float max_threshold
Active scalar filter upper bound.
Definition PhaseSearchTypes.hpp:81
float atom_scale
Uniform ball radius scaling factor [0.05, 2.0].
Definition PhaseSearchTypes.hpp:88
bool hide_non_matching
Hide/cull core atoms outside threshold.
Definition PhaseSearchTypes.hpp:90
PhaseDescriptor descriptor
Active order descriptor.
Definition PhaseSearchTypes.hpp:78
plotters::ColormapType colormap
Colormap for scalar gradient.
Definition PhaseSearchTypes.hpp:82
bool dim_non_matching
Dim core atoms outside threshold.
Definition PhaseSearchTypes.hpp:89
CrystalPreset preset
Active preset mode.
Definition PhaseSearchTypes.hpp:79
float min_threshold_y
Y-axis lower scalar bound.
Definition PhaseSearchTypes.hpp:94
Definition PhaseSearchTypes.hpp:364
float y
Definition PhaseSearchTypes.hpp:367
float height
Definition PhaseSearchTypes.hpp:369
bool is_area
Definition PhaseSearchTypes.hpp:370
float x
Definition PhaseSearchTypes.hpp:366
std::string_view label
Definition PhaseSearchTypes.hpp:365
float width
Definition PhaseSearchTypes.hpp:368