Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
CutoffSanityChecker.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
12#include "core/Atom.hpp"
13#include "core/Cell.hpp"
14#include "math/Precision.hpp"
15
16#include <cstdint>
17#include <string>
18#include <vector>
19
20namespace correlation::analysis {
21
26enum class SanitySeverity : std::uint8_t {
27 Optimal = 0,
28 Warning = 1,
29 Error = 2,
30};
31
36enum class SanityFixAction : std::uint8_t {
37 None = 0,
41};
42
57
64public:
66
75 [[nodiscard]] static auto checkCutoffs(const BondCutoffMatrix &matrix,
76 const std::vector<core::Element> &elements,
77 const core::Cell *cell = nullptr) -> SanityReport;
78
87 static auto applyFix(BondCutoffMatrix &matrix, const std::vector<core::Element> &elements,
88 const core::Cell *cell, SanityFixAction action) -> bool;
89};
90
91} // namespace correlation::analysis
Atom data structure and AtomID type definitions.
Simulation cell structure with periodic boundary conditions.
Floating point precision type definitions for Correlation.
Contiguous 2D matrix of element-pair bond cutoff ranges.
Definition AnalysisTypes.hpp:48
static auto checkCutoffs(const BondCutoffMatrix &matrix, const std::vector< core::Element > &elements, const core::Cell *cell=nullptr) -> SanityReport
Evaluates the sanity of an entire bond cutoff matrix against periodic box geometry and physical const...
Definition CutoffSanityChecker.cpp:261
static auto applyFix(BondCutoffMatrix &matrix, const std::vector< core::Element > &elements, const core::Cell *cell, SanityFixAction action) -> bool
Automatically applies a recommended repair action to the bond cutoff matrix.
Definition CutoffSanityChecker.cpp:299
Represents the simulation cell (periodic box).
Definition Cell.hpp:30
Definition AnalysisTypes.hpp:11
@ None
Rectangular (unwindowed): 1.0.
Definition AnalysisTypes.hpp:452
SanityFixAction
Automated one-click remediation actions for cutoff sanity warnings.
Definition CutoffSanityChecker.hpp:36
@ ResetToCovalent
Reset problematic bounds to standard covalent radius sums.
Definition CutoffSanityChecker.hpp:39
@ ClampToBoxHalf
Clamp maximum cutoffs to 48% of the shortest perpendicular box width.
Definition CutoffSanityChecker.hpp:38
@ None
No action required or available.
Definition CutoffSanityChecker.hpp:37
@ AutoDetectFirstMin
Trigger auto-detection of the first RDF minimum.
Definition CutoffSanityChecker.hpp:40
SanitySeverity
Severity level for scientific cutoff sanity diagnostics.
Definition CutoffSanityChecker.hpp:26
@ Warning
Sub-optimal, missing, or potentially problematic cutoff bounds.
Definition CutoffSanityChecker.hpp:28
@ Error
Unphysical inversion or hard minimum-image convention violation.
Definition CutoffSanityChecker.hpp:29
@ Optimal
All cutoffs satisfy physical coordination and PBC requirements.
Definition CutoffSanityChecker.hpp:27
double real_t
Definition Precision.hpp:18
Diagnostic findings produced by the cutoff sanity checker.
Definition CutoffSanityChecker.hpp:47
real_t suggested_value
Numeric cutoff distance suggested for repair.
Definition CutoffSanityChecker.hpp:55
std::string problematic_pair
Element pair label triggering the warning (e.g. "Si-O").
Definition CutoffSanityChecker.hpp:54
SanityFixAction fix_action
Associated automated remediation code.
Definition CutoffSanityChecker.hpp:52
bool has_fix
Whether an automated fix action can be performed.
Definition CutoffSanityChecker.hpp:51
std::string fix_label
Button label for UI (e.g. "Clamp to L/2").
Definition CutoffSanityChecker.hpp:53
std::string title
Concise header string (e.g. "Optimal Cutoffs").
Definition CutoffSanityChecker.hpp:49
std::string message
Detailed explanation of findings.
Definition CutoffSanityChecker.hpp:50
SanitySeverity severity
Diagnostic severity code.
Definition CutoffSanityChecker.hpp:48