152 switch (descriptor) {
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)";
203 return "Icosahedral";
220 .min_threshold = 0.06F,
221 .max_threshold = 0.22F,
224 .min_threshold_2d_x = 0.06F,
225 .max_threshold_2d_x = 0.22F,
227 .min_threshold_2d_y = -3.5F,
228 .max_threshold_2d_y = -1.5F,
233 .min_threshold = -5.5F,
234 .max_threshold = -3.5F,
237 .min_threshold_2d_x = 0.10F,
238 .max_threshold_2d_x = 0.26F,
240 .min_threshold_2d_y = -5.5F,
241 .max_threshold_2d_y = -3.5F,
246 .min_threshold = 0.75F,
247 .max_threshold = 0.95F,
250 .min_threshold_2d_x = 0.75F,
251 .max_threshold_2d_x = 0.95F,
253 .min_threshold_2d_y = -5.5F,
254 .max_threshold_2d_y = -3.5F,
259 .min_threshold = 0.52F,
260 .max_threshold = 0.62F,
263 .min_threshold_2d_x = 0.52F,
264 .max_threshold_2d_x = 0.62F,
266 .min_threshold_2d_y = 0.14F,
267 .max_threshold_2d_y = 0.24F,
272 .min_threshold = 0.44F,
273 .max_threshold = 0.53F,
276 .min_threshold_2d_x = 0.44F,
277 .max_threshold_2d_x = 0.53F,
279 .min_threshold_2d_y = 0.05F,
280 .max_threshold_2d_y = 0.14F,
285 .min_threshold = 0.47F,
286 .max_threshold = 0.55F,
289 .min_threshold_2d_x = 0.47F,
290 .max_threshold_2d_x = 0.55F,
292 .min_threshold_2d_y = 0.01F,
293 .max_threshold_2d_y = 0.07F,
298 .min_threshold = -0.18F,
299 .max_threshold = -0.15F,
302 .min_threshold_2d_x = 0.10F,
303 .max_threshold_2d_x = 0.20F,
305 .min_threshold_2d_y = -0.18F,
306 .max_threshold_2d_y = -0.15F,
311 .min_threshold = 0.88F,
312 .max_threshold = 1.05F,
315 .min_threshold_2d_x = 0.88F,
316 .max_threshold_2d_x = 1.05F,
318 .min_threshold_2d_y = 0.55F,
319 .max_threshold_2d_y = 0.70F,
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};
349 return {0.0F, 10.0F};
354 return {0.0F, 0.90F};
358 return {-0.05F, 1.05F};
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);
383 .label = marker.label,
386 .width_ratio = width_ratio,
387 .height_ratio = height_ratio,
388 .is_area = marker.is_area,
394 .label = marker.label,
397 .width = marker.height,
398 .height = marker.width,
399 .is_area = marker.is_area,
403[[nodiscard]]
inline std::vector<CrystalMarkerData>
408 std::vector<CrystalMarkerData> result;
409 result.reserve(physical_markers.size());
410 for (
const auto &phy_marker : physical_markers) {
416[[nodiscard]]
inline std::vector<CrystalMarkerData>
421 std::vector<CrystalMarkerData> result;
422 result.reserve(physical_markers.size());
423 for (
const auto &phy_marker : physical_markers) {
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},
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},
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},
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},
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},
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},
493[[nodiscard]]
inline std::vector<CrystalMarkerData>
502 if (is_q4(desc_x) && is_q6(desc_y)) {
505 if (is_q6(desc_x) && is_q4(desc_y)) {
523[[nodiscard]]
inline std::vector<CrystalMarkerData>
558[[nodiscard]]
inline std::vector<CrystalMarkerData>
561 if (!steinhardt_markers.empty()) {
562 return steinhardt_markers;
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