Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
G6Calculator.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
15#include "core/Cell.hpp"
16
17#include <cmath>
18#include <span>
19#include <string_view>
20#include <vector>
21
23
29 real_t xi_6{0.0};
31 bool is_plateau{false};
32};
33
40public:
41 [[nodiscard]] std::string_view getName() const override {
42 return "Bond-Orientational Correlation (G6)";
43 }
44 [[nodiscard]] std::string_view getShortName() const override { return "G6"; }
45 [[nodiscard]] std::string_view getGroup() const override { return "Spatial"; }
46 [[nodiscard]] std::string_view getDescription() const override {
47 return "Computes radial bond-orientational correlation g6(r) and extracts correlation length xi_6.";
48 }
49
50 [[nodiscard]] bool isFrameCalculator() const override { return true; }
51 [[nodiscard]] bool isTrajectoryCalculator() const override { return false; }
52
60 const correlation::analysis::AnalysisSettings &settings) const override;
61
71 [[nodiscard]] static CorrelationLengthFit
72 fitCorrelationLength(std::span<const real_t> r_bins, std::span<const real_t> g6_values) noexcept;
73
86 [[nodiscard]] static correlation::analysis::Histogram
89 real_t r_bin_width,
90 const SteinhardtCalculator::SteinhardtParams *steinhardt_params = nullptr);
91};
92
93} // namespace correlation::calculators
Abstract base class for all analysis calculators.
Simulation cell structure with periodic boundary conditions.
Manager for distribution function calculations (RDF, PAD, S(Q), etc.).
Steinhardt bond-order parameter calculator.
Structural analysis utilities for neighbor detection and bond topology.
Manages the calculation and storage of various distribution functions.
Definition DistributionFunctions.hpp:259
Computes and stores pairwise distances and bond angles in tensors indexed by element type.
Definition StructureAnalyzer.hpp:33
Computes distance-resolved bond-orientational correlation function g6(r) and extracts xi_6.
Definition G6Calculator.hpp:39
std::string_view getDescription() const override
Returns a brief description of the calculator's purpose.
Definition G6Calculator.hpp:46
bool isTrajectoryCalculator() const override
Check if this calculator runs on the whole trajectory (e.g. VACF).
Definition G6Calculator.hpp:51
static CorrelationLengthFit fitCorrelationLength(std::span< const real_t > r_bins, std::span< const real_t > g6_values) noexcept
Fits the bond-orientational correlation length xi_6 from radial profile g6(r).
Definition G6Calculator.cpp:228
void calculateFrame(correlation::analysis::DistributionFunctions &dists, const correlation::analysis::AnalysisSettings &settings) const override
Dispatches calculation for a single frame, storing histogram as "G6_r".
Definition G6Calculator.cpp:256
bool isFrameCalculator() const override
Check if this calculator runs per-frame (e.g. RDF, PAD).
Definition G6Calculator.hpp:50
static correlation::analysis::Histogram calculate(const correlation::core::Cell &cell, const correlation::analysis::StructureAnalyzer *neighbors, real_t r_max, real_t r_bin_width, const SteinhardtCalculator::SteinhardtParams *steinhardt_params=nullptr)
High-performance evaluation of distance-resolved g6(r).
Definition G6Calculator.cpp:270
std::string_view getShortName() const override
Returns a short, UI-friendly name of the calculator (e.g. "g_r", "S_q").
Definition G6Calculator.hpp:44
std::string_view getName() const override
Returns the unique identifier/name of the calculator.
Definition G6Calculator.hpp:41
std::string_view getGroup() const override
Returns the UI group this calculator belongs to (e.g., "Radial", "Angular", "Dynamic",...
Definition G6Calculator.hpp:45
Represents the simulation cell (periodic box).
Definition Cell.hpp:30
Definition OptionsSyncService.hpp:18
double real_t
Definition Precision.hpp:18
Configuration settings for distribution function analysis.
Definition DistributionFunctions.hpp:106
Container for a single calculated distribution function.
Definition DistributionFunctions.hpp:226
Results of exponential decay fitting for bond-orientational correlation g6(r).
Definition G6Calculator.hpp:28
bool is_plateau
True if crystalline plateau without exponential decay.
Definition G6Calculator.hpp:31
real_t xi_6
Correlation length in Angstroms (> 0, or inf if plateau).
Definition G6Calculator.hpp:29
real_t r_squared
Coefficient of determination R^2 of log-linear regression.
Definition G6Calculator.hpp:30
Per-atom arrays of Steinhardt order parameters across an atomic configuration frame.
Definition SteinhardtCalculator.hpp:91