Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
AppOptions.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
13#include "math/Precision.hpp"
14#include "math/Smoothing.hpp"
15
16#include <map>
17#include <string>
18
19namespace correlation::app {
20
25 static constexpr real_t R_MAX =
26 static_cast<real_t>(20.0);
27 static constexpr real_t R_BIN_WIDTH =
28 static_cast<real_t>(0.02);
29 static constexpr real_t Q_MAX =
30 static_cast<real_t>(20.0);
31 static constexpr real_t Q_BIN_WIDTH =
32 static_cast<real_t>(0.02);
33 static constexpr real_t R_INT_MAX =
34 static_cast<real_t>(10.0);
35 static constexpr real_t ANGLE_BIN_WIDTH =
36 static_cast<real_t>(0.25);
37 static constexpr real_t SMOOTHING_SIGMA =
38 static_cast<real_t>(0.1);
39 static constexpr real_t LEF_CUTOFF =
40 static_cast<real_t>(5.0);
41 static constexpr real_t LEF_SIGMA =
42 static_cast<real_t>(0.2);
43
44 // Crystalline Defaults (1 order of magnitude smaller)
45 static constexpr real_t R_BIN_WIDTH_CRYSTAL = static_cast<real_t>(0.002);
46 static constexpr real_t Q_BIN_WIDTH_CRYSTAL = static_cast<real_t>(0.002);
47 static constexpr real_t ANGLE_BIN_WIDTH_CRYSTAL = static_cast<real_t>(0.1);
48 static constexpr real_t SMOOTHING_SIGMA_CRYSTAL = static_cast<real_t>(0.01);
49
50 // Liquid Defaults (broad/diffuse features)
51 static constexpr real_t R_BIN_WIDTH_LIQUID = static_cast<real_t>(0.05);
52 static constexpr real_t Q_BIN_WIDTH_LIQUID = static_cast<real_t>(0.05);
53 static constexpr real_t ANGLE_BIN_WIDTH_LIQUID = static_cast<real_t>(0.5);
54 static constexpr real_t SMOOTHING_SIGMA_LIQUID = static_cast<real_t>(0.15);
55
59
60 static constexpr real_t TIME_STEP = static_cast<real_t>(1.0);
61 static constexpr int VACF_MAX_LAG = -1;
64 static constexpr size_t VDOS_ZERO_PAD = 4;
65
66 // Electronic LDOS & Eliashberg Defaults
69 static constexpr real_t LDOS_BROADENING_SIGMA = static_cast<real_t>(0.0);
70 static constexpr real_t LDOS_ELECTRONIC_TEMP_K = static_cast<real_t>(300.0);
71 static constexpr real_t LDOS_GAP_THRESHOLD = static_cast<real_t>(1e-3);
72 static constexpr real_t ELIASHBERG_MU_STAR = static_cast<real_t>(0.10);
75 static constexpr real_t ELIASHBERG_DISP_STEP = static_cast<real_t>(0.02);
76
77 // XRD Defaults
78 static constexpr real_t XRD_LAMBDA =
79 static_cast<real_t>(1.5406);
80 static constexpr real_t XRD_THETA_MIN =
81 static_cast<real_t>(10.0);
82 static constexpr real_t XRD_THETA_MAX =
83 static_cast<real_t>(140.0);
84 static constexpr real_t XRD_BIN_WIDTH =
85 static_cast<real_t>(0.05);
86
87 // Bond Cutoff Defaults
88 static constexpr real_t BOND_MIN_FACTOR =
89 static_cast<real_t>(0.6);
90 static constexpr real_t BOND_MAX_FACTOR =
91 static_cast<real_t>(1.2);
92 static constexpr real_t BOND_GLOBAL_CUTOFF =
93 static_cast<real_t>(3.5);
94 static constexpr size_t MAX_RING_SIZE = 12;
95
96 // --- Status Messages ---
97 static constexpr const char *MSG_RUNNING_ANALYSIS =
98 "Running Analysis...";
99 static constexpr const char *MSG_ANALYSIS_ENDED =
100 "Analysis ended.";
101 static constexpr const char *MSG_SELECTING_OUTPUT =
102 "Selecting output file...";
103 static constexpr const char *MSG_FILE_SELECTION_CANCELLED =
104 "File selection cancelled.";
105 static constexpr const char *MSG_ERROR_LOADING =
106 "Error loading file: ";
107 static constexpr const char *MSG_FILES_WRITTEN = "Files Written.";
108 static constexpr const char *MSG_SAVE_CANCELLED = "Save cancelled.";
109 static constexpr const char *MSG_ANALYSIS_ABORTED =
110 "Analysis aborted: No trajectory loaded.";
111 static constexpr const char *MSG_ERROR_ANALYSIS =
112 "Error during analysis: ";
113 static constexpr const char *MSG_ERROR_WRITING =
114 "Error during file writing: ";
115 static constexpr const char *MSG_NO_DATA_TO_WRITE =
116 "No analysis data to write.";
117};
118
123 std::string input_file;
124 std::string output_file_base;
125 bool smoothing = true;
126 bool use_hdf5 = false;
127 bool use_csv = true;
128 bool use_parquet = false;
129 bool use_zip = false;
130 bool export_images = true;
131 std::vector<std::string> export_algorithms;
137 bool sq_exact_direct = false;
142
144 std::map<std::string, bool> active_calculators;
145
149 size_t hyper_samples = 10000;
152 int min_frame = 0;
153 int max_frame = -1;
154 int frame_stride = 1;
160
162
170
173
175 std::string mlip_model_path;
176
177 // Electronic LDOS / TDOS & Eliashberg α²F(ω) options
183 bool ldos_compute_idos = true;
188};
189
190} // namespace correlation::app
Manager for distribution function calculations (RDF, PAD, S(Q), etc.).
Floating point precision type definitions for Correlation.
Kernel-based smoothing algorithms for analysis data.
Contiguous 2D matrix of element-pair bond cutoff ranges.
Definition AnalysisTypes.hpp:48
LDOSBroadeningKernel
Spectral convolution kernel for post-processing electronic LDOS/TDOS spectra.
Definition AnalysisTypes.hpp:459
@ None
No additional broadening beyond the model's native grid.
Definition AnalysisTypes.hpp:460
VDOSWindowType
Time-domain tapering half-window applied to the VACF prior to Fourier cosine transform.
Definition AnalysisTypes.hpp:448
@ Hann
Half-Hann: 0.5 * (1 + cos(pi * t / t_max)) — exact zero at t_max (default).
Definition AnalysisTypes.hpp:449
CouplingEstimationMode
Strategy for estimating MLIP electron-phonon deformation sensitivity.
Definition AnalysisTypes.hpp:469
@ TrajectoryFluctuation
Fast regression of per-atom δN_i(E_F, t) vs MD displacements.
Definition AnalysisTypes.hpp:470
Definition AppController.hpp:27
KernelType
Selection of kernel types for smoothing.
Definition Smoothing.hpp:26
@ Gaussian
Definition Smoothing.hpp:26
double real_t
Definition Precision.hpp:18
Parameters for X-Ray Diffraction (XRD) pattern calculation.
Definition DistributionFunctions.hpp:96
Default values and messages for the application.
Definition AppOptions.hpp:24
static constexpr correlation::analysis::CouplingEstimationMode ELIASHBERG_COUPLING_MODE
Definition AppOptions.hpp:73
static constexpr const char * MSG_SAVE_CANCELLED
UI: User aborted save.
Definition AppOptions.hpp:108
static constexpr real_t Q_MAX
Default max q for S(Q) (Angstrom^-1).
Definition AppOptions.hpp:29
static constexpr real_t XRD_BIN_WIDTH
Default 2-theta bin width in degrees.
Definition AppOptions.hpp:84
static constexpr real_t ANGLE_BIN_WIDTH
Default bin width for ADF (Degrees).
Definition AppOptions.hpp:35
static constexpr real_t Q_BIN_WIDTH_LIQUID
Definition AppOptions.hpp:52
static constexpr real_t R_INT_MAX
Default max radius for integration (Angstrom).
Definition AppOptions.hpp:33
static constexpr real_t XRD_LAMBDA
Default X-ray wavelength in Å (Cu K-alpha).
Definition AppOptions.hpp:78
static constexpr real_t LDOS_ELECTRONIC_TEMP_K
Definition AppOptions.hpp:70
static constexpr correlation::analysis::LDOSBroadeningKernel LDOS_BROADENING_KERNEL
Definition AppOptions.hpp:67
static constexpr real_t SMOOTHING_SIGMA
Default Gaussian smoothing sigma.
Definition AppOptions.hpp:37
static constexpr real_t Q_BIN_WIDTH
Default bin width for S(Q) (Angstrom^-1).
Definition AppOptions.hpp:31
static constexpr real_t BOND_MIN_FACTOR
Default factor for minimum bond cutoff distance.
Definition AppOptions.hpp:88
static constexpr real_t BOND_GLOBAL_CUTOFF
Default global uniform bond cutoff in Å.
Definition AppOptions.hpp:92
static constexpr real_t LEF_CUTOFF
Default cutoff for local entropy.
Definition AppOptions.hpp:39
static constexpr real_t LDOS_BROADENING_SIGMA
Definition AppOptions.hpp:69
static constexpr real_t TIME_STEP
Default time step (fs).
Definition AppOptions.hpp:60
static constexpr const char * MSG_RUNNING_ANALYSIS
Status: Computation in progress.
Definition AppOptions.hpp:97
static constexpr const char * MSG_NO_DATA_TO_WRITE
Error: Empty results.
Definition AppOptions.hpp:115
static constexpr real_t BOND_MAX_FACTOR
Default factor for maximum bond cutoff distance.
Definition AppOptions.hpp:90
static constexpr real_t ANGLE_BIN_WIDTH_LIQUID
Definition AppOptions.hpp:53
static constexpr real_t ELIASHBERG_DISP_STEP
Definition AppOptions.hpp:75
static constexpr const char * MSG_ERROR_ANALYSIS
Error: Computation failure.
Definition AppOptions.hpp:111
static constexpr real_t R_BIN_WIDTH_CRYSTAL
Definition AppOptions.hpp:45
static constexpr real_t ANGLE_BIN_WIDTH_CRYSTAL
Definition AppOptions.hpp:47
static constexpr const char * MSG_FILE_SELECTION_CANCELLED
UI: User closed picker.
Definition AppOptions.hpp:103
static constexpr real_t LEF_SIGMA
Default Gaussian sigma for local entropy.
Definition AppOptions.hpp:41
static constexpr const char * MSG_ANALYSIS_ENDED
Status: Successfully completed.
Definition AppOptions.hpp:99
static constexpr real_t LDOS_GAP_THRESHOLD
Definition AppOptions.hpp:71
static constexpr real_t XRD_THETA_MAX
Default max 2-theta in degrees.
Definition AppOptions.hpp:82
static constexpr size_t MAX_RING_SIZE
Default max ring size for topology.
Definition AppOptions.hpp:94
static constexpr size_t VDOS_ZERO_PAD
Default VDOS FFT zero-padding factor.
Definition AppOptions.hpp:64
static constexpr real_t ELIASHBERG_MU_STAR
Definition AppOptions.hpp:72
static constexpr real_t SMOOTHING_SIGMA_LIQUID
Definition AppOptions.hpp:54
static constexpr real_t R_BIN_WIDTH_LIQUID
Definition AppOptions.hpp:51
static constexpr const char * MSG_ERROR_WRITING
Error: Export failure.
Definition AppOptions.hpp:113
static constexpr real_t R_BIN_WIDTH
Default bin width for RDF (Angstrom).
Definition AppOptions.hpp:27
static constexpr const char * MSG_FILES_WRITTEN
Success: Data exported.
Definition AppOptions.hpp:107
static constexpr const char * MSG_ERROR_LOADING
Error: IO or parsing failure.
Definition AppOptions.hpp:105
static constexpr real_t R_MAX
Default max radius for RDF (Angstrom).
Definition AppOptions.hpp:25
static constexpr correlation::analysis::VDOSWindowType VDOS_WINDOW
Default VDOS tapering window.
Definition AppOptions.hpp:62
static constexpr const char * MSG_ANALYSIS_ABORTED
Error: Missing data.
Definition AppOptions.hpp:109
static constexpr real_t XRD_THETA_MIN
Default min 2-theta in degrees.
Definition AppOptions.hpp:80
static constexpr int VACF_MAX_LAG
Default VACF max lag (-1 = auto N/2).
Definition AppOptions.hpp:61
static constexpr real_t Q_BIN_WIDTH_CRYSTAL
Definition AppOptions.hpp:46
static constexpr real_t SMOOTHING_SIGMA_CRYSTAL
Definition AppOptions.hpp:48
static constexpr const char * MSG_SELECTING_OUTPUT
UI: File picker open.
Definition AppOptions.hpp:101
static constexpr decltype(correlation::math::KernelType::Gaussian) SMOOTHING_KERNEL
Default smoothing kernel.
Definition AppOptions.hpp:57
Encapsulates all configurable options for the application.
Definition AppOptions.hpp:122
int min_frame
Starting frame index.
Definition AppOptions.hpp:152
bool use_csv
Enable CSV output format.
Definition AppOptions.hpp:127
bool use_hdf5
Enable HDF5 output format.
Definition AppOptions.hpp:126
bool export_images
Enable SVG plots export.
Definition AppOptions.hpp:130
std::string mlip_model_path
Optional path to MLIP/LDOS binary model weights.
Definition AppOptions.hpp:175
real_t eliashberg_mu_star
Definition AppOptions.hpp:184
std::string input_file
Path to the input trajectory file.
Definition AppOptions.hpp:123
correlation::math::KernelType smoothing_kernel
Smoothing kernel type.
Definition AppOptions.hpp:150
size_t max_ring_size
Maximum ring size for topological analysis.
Definition AppOptions.hpp:140
real_t smoothing_sigma
Sigma for Gaussian kernel.
Definition AppOptions.hpp:146
int material_type
Material type (0: Amorphous, 1: Liquid, 2: Crystalline).
Definition AppOptions.hpp:161
size_t hyper_samples
Number of random samples for hyperuniformity.
Definition AppOptions.hpp:149
size_t vdos_zero_pad
Zero-padding factor for VDOS FFT.
Definition AppOptions.hpp:159
std::string output_file_base
Base path/name for output files.
Definition AppOptions.hpp:124
real_t lef_sigma
Gaussian standard deviation for local entropy.
Definition AppOptions.hpp:148
real_t q_bin_width
Step size for S(Q) histogram.
Definition AppOptions.hpp:135
real_t r_max
Max distance for RDF calculation.
Definition AppOptions.hpp:132
bool use_zip
Enable consolidated ZIP bundle output format.
Definition AppOptions.hpp:129
real_t r_int_max
Upper limit for g(r) integration.
Definition AppOptions.hpp:136
real_t r_bin_width
Step size for RDF histogram.
Definition AppOptions.hpp:133
bool ldos_compute_idos
Definition AppOptions.hpp:183
real_t lef_cutoff
Cutoff radius for local entropy.
Definition AppOptions.hpp:147
real_t time_step
Simulation time step in fs.
Definition AppOptions.hpp:155
int frame_stride
Stride between analyzed frames (>= 1).
Definition AppOptions.hpp:154
correlation::analysis::CouplingEstimationMode eliashberg_coupling_mode
Definition AppOptions.hpp:185
real_t q_max
Max momentum transfer for S(Q).
Definition AppOptions.hpp:134
real_t dihedral_bin_width
Step size for dihedral analysis.
Definition AppOptions.hpp:139
bool sq_exact_direct
Force full direct reciprocal-space S(Q) for large cells (>= 1000 atoms).
Definition AppOptions.hpp:137
real_t ldos_gap_threshold
Definition AppOptions.hpp:182
correlation::analysis::XRDParams xrd_params
Parameters for X-Ray Diffraction calculation.
Definition AppOptions.hpp:164
correlation::analysis::VDOSWindowType vdos_window
Time-domain tapering window for VDOS.
Definition AppOptions.hpp:157
real_t ldos_broadening_sigma
Definition AppOptions.hpp:180
real_t angle_bin_width
Step size for ADF.
Definition AppOptions.hpp:138
bool use_parquet
Enable Parquet output format.
Definition AppOptions.hpp:128
correlation::analysis::BondCutoffMatrix bond_cutoffs
Bond cutoff ranges for neighbor & topological calculations.
Definition AppOptions.hpp:172
std::map< std::string, bool > active_calculators
Map of calculator ID to its enabled state.
Definition AppOptions.hpp:144
real_t eliashberg_disp_step
Definition AppOptions.hpp:187
correlation::analysis::LDOSBroadeningKernel ldos_broadening_kernel
Definition AppOptions.hpp:178
int max_frame
Ending frame index (-1 for all).
Definition AppOptions.hpp:153
bool smoothing
Whether to apply Gaussian smoothing to results.
Definition AppOptions.hpp:125
int vacf_max_lag
Max VACF lag frames (-1 = auto N/2).
Definition AppOptions.hpp:156
real_t ldos_electronic_temp_k
Definition AppOptions.hpp:181
std::vector< std::string > export_algorithms
Filter algorithms for export (empty = all).
Definition AppOptions.hpp:131