Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::analysis::DistributionFunctions Class Reference

Manages the calculation and storage of various distribution functions. More...

#include <DistributionFunctions.hpp>

Collaboration diagram for correlation::analysis::DistributionFunctions:

Public Member Functions

Constructors
 DistributionFunctions (correlation::core::Cell cell, real_t cutoff=0.0, BondCutoffMatrix bond_cutoffs={})
 Constructs a DistributionFunctions object.
 DistributionFunctions (DistributionFunctions &&other) noexcept
 Move constructor.
DistributionFunctions & operator= (DistributionFunctions &&other) noexcept
 Move assignment operator.
 ~DistributionFunctions ()=default
 Default destructor.
 DistributionFunctions (const DistributionFunctions &)=delete
 Deleted copy constructor (contains non-copyable std::mutex).
DistributionFunctions & operator= (const DistributionFunctions &)=delete
 Deleted copy assignment operator (contains non-copyable std::mutex).
Accessors
const correlation::core::Cell & cell () const
 Access the underlying simulation cell.
const Histogram & getHistogram (const std::string &name) const
 Access a specific calculated histogram by name.
Histogram & getMutableHistogram (const std::string &name)
 Access a mutable calculated histogram by name.
bool hasHistogram (const std::string &name) const
 Checks if a calculated histogram exists by name or alias.
const std::map< std::string, Histogram > & getAllHistograms () const
 Access all calculated histograms.
std::map< std::string, Histogram > & getAllHistograms () noexcept
 Access mutable collection of all calculated histograms.
const std::map< std::string, real_t > & getAshcroftWeights () const
 Gets the Ashcroft-Langreth weights used for S(Q) partials.
void addHistogram (const std::string &name, Histogram &&histogram)
 Manually add a histogram to the collection.
bool removeHistogram (const std::string &name)
 Removes a histogram from the collection if present.
const StructureAnalyzer * neighbors () const
 Returns the structure analyzer providing neighbor information.
std::vector< std::string > getAvailableHistograms () const
 Gets a list of names for all currently available histograms.
const DynamicProperties & dynamicProperties () const noexcept
 Gets the trajectory-wide dynamic properties.
DynamicProperties & dynamicProperties () noexcept
 Gets mutable trajectory-wide dynamic properties.
void setDynamicProperties (const DynamicProperties &props) noexcept
 Sets the trajectory-wide dynamic properties.
real_t getDiffusionCoefficientMSD () const noexcept
 Gets the self-diffusion coefficient computed from Mean Squared Displacement (MSD).
void setDiffusionCoefficientMSD (real_t diff_coeff) noexcept
 Sets the self-diffusion coefficient computed from Mean Squared Displacement (MSD).
real_t getDiffusionCoefficientVACF () const noexcept
 Gets the self-diffusion coefficient computed from Velocity Autocorrelation Function (VACF).
void setDiffusionCoefficientVACF (real_t diff_coeff) noexcept
 Sets the self-diffusion coefficient computed from Velocity Autocorrelation Function (VACF).
real_t getRelaxationTime () const noexcept
 Gets the relaxation time computed from normalized VACF.
void setRelaxationTime (real_t relax_time) noexcept
 Sets the relaxation time computed from normalized VACF.
real_t getDeborahNumber () const noexcept
 Gets the Deborah number.
void setDeborahNumber (real_t deborah_num) noexcept
 Sets the Deborah number.
const HyperuniformityDiagnostics & getHyperuniformityDiagnostics () const noexcept
 Gets the scalar hyperuniformity diagnostics struct.
void setHyperuniformityDiagnostics (const HyperuniformityDiagnostics &diag) noexcept
 Sets the scalar hyperuniformity diagnostics struct.
real_t getHyperuniformityBeta () const noexcept
 Gets the real-space number variance scaling exponent β (σ²_N(R) ∝ R^β).
real_t getHyperuniformityChiH () const noexcept
 Gets the large-R asymptotic real-space hyperuniformity index χ_H(R_max).
real_t getHyperuniformityHIndex () const noexcept
 Gets the reciprocal-space Torquato-Stillinger index H = S(0⁺) / S(q_peak).
real_t getHyperuniformityAlpha () const noexcept
 Gets the low-q structure factor scaling exponent α (S(q) ∝ q^α).
const ElectronicDiagnostics & getElectronicDiagnostics () const noexcept
 Gets the electronic structure diagnostics extracted from LDOS/TDOS.
void setElectronicDiagnostics (ElectronicDiagnostics diagnostics) noexcept
 Sets the electronic structure diagnostics extracted from LDOS/TDOS.
const SuperconductingDiagnostics & getSuperconductingDiagnostics () const noexcept
 Gets the superconducting screening diagnostics derived from Eliashberg α²F(ω).
void setSuperconductingDiagnostics (const SuperconductingDiagnostics &diagnostics) noexcept
 Sets the superconducting screening diagnostics derived from Eliashberg α²F(ω).
Calculation Methods
void calculateCoordinationNumber ()
 Calculates the Coordination Number (CN) distribution. Requires that neighbors have been computed.
void calculateRDF (RDFParams params={})
 Calculates the radial distribution function g(r).
void calculatePAD (real_t bin_width=0.25)
 Calculates the Plane Angle Distribution (PAD).
void calculateDAD (real_t bin_width=0.25)
 Calculates the Dihedral Angle Distribution (DAD).
void calculateVACF (const correlation::core::Trajectory &traj, MaxFrames max_correlation_frames={-1}, StartFrame start_frame={0}, EndFrame end_frame={static_cast< size_t >(-1)})
 Calculates the Velocity Autocorrelation Function (VACF).
void calculateVDOS (VDOSWindowType window_type=VDOSWindowType::Hann, size_t zero_pad_factor=4, real_t max_freq=static_cast< real_t >(-1.0))
 Calculates the Vibrational Density of States (VDOS) from the VACF. Requires calculateVACF to be called first.
void calculateXRD (XRDParams params={})
 Calculates the XRD pattern.
void smooth (const std::string &name, real_t sigma, correlation::math::KernelType kernel=correlation::math::KernelType::Gaussian)
 Smooths a specific histogram.
void smoothAll (real_t sigma, correlation::math::KernelType kernel=correlation::math::KernelType::Gaussian)
 Smooths all available histograms.
void setStructureAnalyzer (const StructureAnalyzer *analyzer)
 Uses an external StructureAnalyzer for neighborhood/bond info.
void setStructureAnalyzerOwned (std::unique_ptr< StructureAnalyzer > analyzer)
 Takes ownership of a StructureAnalyzer for neighborhood/bond info.

Private Member Functions

void ensureNeighborsComputed (real_t r_max)
 Ensures neighbors are computed for the given cutoff.
void calculateAshcroftWeights ()
 Calculates weights for partial distributions based on concentrations.

Static Private Member Functions

static std::unique_ptr< DistributionFunctions > processSingleFrame (correlation::core::Trajectory &trajectory, const TrajectoryAnalyzer &analyzer, size_t frame_idx, const AnalysisSettings &settings, const BondCutoffMatrix &bond_cutoffs)
static void normalizeHistograms (DistributionFunctions &dist_funcs)

Private Attributes

correlation::core::Cell cell_
 Reference to the cell being analyzed.
const StructureAnalyzer * neighbors_ref_ {nullptr}
 Pointer to external neighbor info.
std::unique_ptr< StructureAnalyzer > neighbors_owned_
 Owned neighbor info.
real_t current_cutoff_ {-1.0}
 Last cutoff used for neighbor searching.
BondCutoffMatrix bond_cutoffs_
 Cached squared bond cutoff ranges.
std::map< std::string, Histogram > histograms_
 Storage for all analysis results.
std::map< std::string, real_t > ashcroft_weights_
 Scalar weights for S(Q) calculations.
std::mutex histogram_mutex_
 Protects concurrent access to histograms_.
DynamicProperties dynamic_properties_ {}
 Trajectory-wide dynamic properties.
HyperuniformityDiagnostics hyperuniformity_diagnostics_ {}
 Scalar hyperuniformity diagnostics.
ElectronicDiagnostics electronic_diagnostics_ {}
 Electronic LDOS/TDOS diagnostics.
SuperconductingDiagnostics superconducting_diagnostics_ {}
 Eliashberg α²F(ω) superconducting diagnostics.
std::shared_ptr< PerFrameDistributionStore > per_frame_store_
 Per-frame 1D distribution curves.

Accumulation

void add (const DistributionFunctions &other)
 Adds the histograms from another DistributionFunctions object to this one. Used for averaging over multiple frames.
void scale (real_t factor)
 Scales all histograms in this object by a factor. Used for normalizing averaged distributions.
std::string getPartialKey (int type1, int type2) const
 Generates a unique string key for a pair of element types.
std::string getInversePartialKey (int type1, int type2) const
 Generates the inverse string key for a pair of element types.
std::shared_ptr< const PerFrameDistributionStore > getPerFrameStore () const noexcept
 Accesses the per-frame distribution store (if computed).
std::shared_ptr< PerFrameDistributionStore > mutablePerFrameStore () noexcept
 Accesses mutable shared pointer to the per-frame distribution store.
void setPerFrameStore (std::shared_ptr< PerFrameDistributionStore > store) noexcept
 Sets or updates the per-frame distribution store.
static std::unique_ptr< DistributionFunctions > computeMean (correlation::core::Trajectory &trajectory, const TrajectoryAnalyzer &analyzer, size_t start_frame, const AnalysisSettings &settings, std::function< void(float, const std::string &)> progress_callback=nullptr)
 Computes the mean distribution functions over a trajectory. Uses parallel execution to speed up calculation.
static PerFrameDistributionStore::FrameCurveArray computeLightweightFrameCurves (const correlation::core::Cell &cell, const AnalysisSettings &settings, const BondCutoffMatrix &bond_cutoffs, std::array< bool, PerFrameDistributionStore::METRIC_COUNT > wanted_metrics)
 Computes lightweight 1D [RDF, PAD, SQ, XRD] curves for a single cell frame.

Detailed Description

Manages the calculation and storage of various distribution functions.

This class includes methods for calculating:

  • Radial Distribution Functions (RDF) g(r), J(r), G(r)
  • Plane and Angle Distributions (PAD)
  • Validation Autocorrelation Function (VACF)
  • Vibrational Density of States (VDOS)
  • Structure Factor S(Q)
  • X-Ray Diffraction (XRD) patterns

It acts as a container for all analysis results associated with a correlation::core::Cell or correlation::core::Trajectory.

Constructor & Destructor Documentation

◆ DistributionFunctions() [1/3]

correlation::analysis::DistributionFunctions::DistributionFunctions ( correlation::core::Cell cell,
real_t cutoff = 0.0,
BondCutoffMatrix bond_cutoffs = {} )
explicit

Constructs a DistributionFunctions object.

Parameters
cellReference to the cell (structure) being analyzed.
cutoffOptional cutoff radius for neighbor calculations (if not pre computed).
bond_cutoffsOptional bond cutoffs for neighbor calculations.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DistributionFunctions() [2/3]

correlation::analysis::DistributionFunctions::DistributionFunctions ( DistributionFunctions && other)
noexcept

Move constructor.

Parameters
otherThe DistributionFunctions object to move from.
Here is the call graph for this function:

◆ ~DistributionFunctions()

correlation::analysis::DistributionFunctions::~DistributionFunctions ( )
default

Default destructor.

◆ DistributionFunctions() [3/3]

correlation::analysis::DistributionFunctions::DistributionFunctions ( const DistributionFunctions & )
delete

Deleted copy constructor (contains non-copyable std::mutex).

Here is the call graph for this function:

Member Function Documentation

◆ add()

void correlation::analysis::DistributionFunctions::add ( const DistributionFunctions & other)

Adds the histograms from another DistributionFunctions object to this one. Used for averaging over multiple frames.

Parameters
otherThe other DistributionFunctions object to add.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addHistogram()

void correlation::analysis::DistributionFunctions::addHistogram ( const std::string & name,
Histogram && histogram )

Manually add a histogram to the collection.

Parameters
nameName of the histogram.
histogramThe Histogram data to move into the collection.
Here is the caller graph for this function:

◆ calculateAshcroftWeights()

void correlation::analysis::DistributionFunctions::calculateAshcroftWeights ( )
private

Calculates weights for partial distributions based on concentrations.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateCoordinationNumber()

void correlation::analysis::DistributionFunctions::calculateCoordinationNumber ( )

Calculates the Coordination Number (CN) distribution. Requires that neighbors have been computed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateDAD()

void correlation::analysis::DistributionFunctions::calculateDAD ( real_t bin_width = 0.25)

Calculates the Dihedral Angle Distribution (DAD).

Parameters
bin_widthWidth of angular bins in degrees.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculatePAD()

void correlation::analysis::DistributionFunctions::calculatePAD ( real_t bin_width = 0.25)

Calculates the Plane Angle Distribution (PAD).

Parameters
bin_widthWidth of angular bins in degrees.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateRDF()

void correlation::analysis::DistributionFunctions::calculateRDF ( RDFParams params = {})

Calculates the radial distribution function g(r).

Parameters
paramsRDF calculation parameters (r_max, r_bin_width).
Exceptions
std::invalid_argumentif parameters are invalid
std::logic_errorif cell volume is invalid
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateVACF()

void correlation::analysis::DistributionFunctions::calculateVACF ( const correlation::core::Trajectory & traj,
MaxFrames max_correlation_frames = {-1},
StartFrame start_frame = {0},
EndFrame end_frame = {static_cast<size_t>(-1)} )

Calculates the Velocity Autocorrelation Function (VACF).

Parameters
trajThe trajectory containing pre-calculated velocities.
max_correlation_framesMaximum lag frames. -1 uses default (half trajectory).
start_frameStarting frame index.
end_frameEnding frame index (exclusive).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateVDOS()

void correlation::analysis::DistributionFunctions::calculateVDOS ( VDOSWindowType window_type = VDOSWindowType::Hann,
size_t zero_pad_factor = 4,
real_t max_freq = static_cast<real_t>(-1.0) )

Calculates the Vibrational Density of States (VDOS) from the VACF. Requires calculateVACF to be called first.

Parameters
window_typeTime-domain tapering half-window (default: Half-Hann).
zero_pad_factorZero-padding multiplier for FFT interpolation (>= 1, default: 4).
max_freqMaximum real frequency in THz (<= 0 uses element-based recommendation).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateXRD()

void correlation::analysis::DistributionFunctions::calculateXRD ( XRDParams params = {})

Calculates the XRD pattern.

Parameters
paramsXRD calculation parameters (lambda, theta_min, theta_max, bin_width).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cell()

const correlation::core::Cell & correlation::analysis::DistributionFunctions::cell ( ) const
inlinenodiscard

Access the underlying simulation cell.

Returns
Constant reference to the Cell object.
Here is the caller graph for this function:

◆ computeLightweightFrameCurves()

PerFrameDistributionStore::FrameCurveArray correlation::analysis::DistributionFunctions::computeLightweightFrameCurves ( const correlation::core::Cell & cell,
const AnalysisSettings & settings,
const BondCutoffMatrix & bond_cutoffs,
std::array< bool, PerFrameDistributionStore::METRIC_COUNT > wanted_metrics )
staticnodiscard

Computes lightweight 1D [RDF, PAD, SQ, XRD] curves for a single cell frame.

Parameters
[in]cellAtomic cell frame to evaluate.
[in]settingsAnalysis bin/cutoff parameters.
[in]bond_cutoffsPairwise squared bond cutoffs.
[in]wanted_metricsBoolean mask indicating which [RDF, PAD, SQ, XRD] curves are needed.
Returns
Array of computed Total curves indexed by DistributionMetric.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeMean()

std::unique_ptr< DistributionFunctions > correlation::analysis::DistributionFunctions::computeMean ( correlation::core::Trajectory & trajectory,
const TrajectoryAnalyzer & analyzer,
size_t start_frame,
const AnalysisSettings & settings,
std::function< void(float, const std::string &)> progress_callback = nullptr )
staticnodiscard

Computes the mean distribution functions over a trajectory. Uses parallel execution to speed up calculation.

Parameters
trajectoryThe trajectory to analyze.
analyzerA pre-configured TrajectoryAnalyzer for neighbor info.
start_frameIndex of the frame to start analysis from.
settingsThe analysis parameters (bin widths, cutoffs, etc.).
progress_callbackOptional callback to report completion progress.
Returns
A unique_ptr to the newly created and populated DistributionFunctions object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dynamicProperties() [1/2]

const DynamicProperties & correlation::analysis::DistributionFunctions::dynamicProperties ( ) const
inlinenodiscardnoexcept

Gets the trajectory-wide dynamic properties.

Returns
Const reference to DynamicProperties.

◆ dynamicProperties() [2/2]

DynamicProperties & correlation::analysis::DistributionFunctions::dynamicProperties ( )
inlinenodiscardnoexcept

Gets mutable trajectory-wide dynamic properties.

Returns
Reference to DynamicProperties.

◆ ensureNeighborsComputed()

void correlation::analysis::DistributionFunctions::ensureNeighborsComputed ( real_t r_max)
private

Ensures neighbors are computed for the given cutoff.

Parameters
r_maxCutoff radius.
Here is the caller graph for this function:

◆ getAllHistograms() [1/2]

const std::map< std::string, Histogram > & correlation::analysis::DistributionFunctions::getAllHistograms ( ) const
inlinenodiscard

Access all calculated histograms.

Returns
A map of histogram names to Histogram objects.
Here is the caller graph for this function:

◆ getAllHistograms() [2/2]

std::map< std::string, Histogram > & correlation::analysis::DistributionFunctions::getAllHistograms ( )
inlinenodiscardnoexcept

Access mutable collection of all calculated histograms.

Returns
Mutable reference to map of histogram names to Histogram objects.

◆ getAshcroftWeights()

const std::map< std::string, real_t > & correlation::analysis::DistributionFunctions::getAshcroftWeights ( ) const
inlinenodiscard

Gets the Ashcroft-Langreth weights used for S(Q) partials.

Returns
A map of element pair strings to weight values.
Here is the caller graph for this function:

◆ getAvailableHistograms()

std::vector< std::string > correlation::analysis::DistributionFunctions::getAvailableHistograms ( ) const
nodiscard

Gets a list of names for all currently available histograms.

Returns
Vector of histogram name strings.
Here is the caller graph for this function:

◆ getDeborahNumber()

real_t correlation::analysis::DistributionFunctions::getDeborahNumber ( ) const
inlinenodiscardnoexcept

Gets the Deborah number.

Returns
The Deborah number.
Here is the caller graph for this function:

◆ getDiffusionCoefficientMSD()

real_t correlation::analysis::DistributionFunctions::getDiffusionCoefficientMSD ( ) const
inlinenodiscardnoexcept

Gets the self-diffusion coefficient computed from Mean Squared Displacement (MSD).

Returns
The diffusion coefficient in Ų/fs.
Here is the caller graph for this function:

◆ getDiffusionCoefficientVACF()

real_t correlation::analysis::DistributionFunctions::getDiffusionCoefficientVACF ( ) const
inlinenodiscardnoexcept

Gets the self-diffusion coefficient computed from Velocity Autocorrelation Function (VACF).

Returns
The diffusion coefficient in Ų/fs.
Here is the caller graph for this function:

◆ getElectronicDiagnostics()

const ElectronicDiagnostics & correlation::analysis::DistributionFunctions::getElectronicDiagnostics ( ) const
inlinenodiscardnoexcept

Gets the electronic structure diagnostics extracted from LDOS/TDOS.

Returns
Const reference to ElectronicDiagnostics.
Here is the caller graph for this function:

◆ getHistogram()

const Histogram & correlation::analysis::DistributionFunctions::getHistogram ( const std::string & name) const
nodiscard

Access a specific calculated histogram by name.

Parameters
nameThe name of the distribution function (e.g., "g(r)", "S(Q)").
Returns
A const reference to the Histogram data.
Exceptions
std::out_of_rangeif the name is not found.
Here is the caller graph for this function:

◆ getHyperuniformityAlpha()

real_t correlation::analysis::DistributionFunctions::getHyperuniformityAlpha ( ) const
inlinenodiscardnoexcept

Gets the low-q structure factor scaling exponent α (S(q) ∝ q^α).

Returns
Scaling exponent α (0 if not computed).
Here is the caller graph for this function:

◆ getHyperuniformityBeta()

real_t correlation::analysis::DistributionFunctions::getHyperuniformityBeta ( ) const
inlinenodiscardnoexcept

Gets the real-space number variance scaling exponent β (σ²_N(R) ∝ R^β).

Returns
Scaling exponent β (0 if not computed).
Here is the caller graph for this function:

◆ getHyperuniformityChiH()

real_t correlation::analysis::DistributionFunctions::getHyperuniformityChiH ( ) const
inlinenodiscardnoexcept

Gets the large-R asymptotic real-space hyperuniformity index χ_H(R_max).

Returns
Asymptotic χ_H value (0 if not computed).
Here is the caller graph for this function:

◆ getHyperuniformityDiagnostics()

const HyperuniformityDiagnostics & correlation::analysis::DistributionFunctions::getHyperuniformityDiagnostics ( ) const
inlinenodiscardnoexcept

Gets the scalar hyperuniformity diagnostics struct.

Returns
Const reference to HyperuniformityDiagnostics.

◆ getHyperuniformityHIndex()

real_t correlation::analysis::DistributionFunctions::getHyperuniformityHIndex ( ) const
inlinenodiscardnoexcept

Gets the reciprocal-space Torquato-Stillinger index H = S(0⁺) / S(q_peak).

Returns
H index (0 if not computed).
Here is the caller graph for this function:

◆ getInversePartialKey()

std::string correlation::analysis::DistributionFunctions::getInversePartialKey ( int type1,
int type2 ) const
nodiscard

Generates the inverse string key for a pair of element types.

Parameters
type1First element ID.
type2Second element ID.
Returns
Inverse string key (e.g. "O-Si").

◆ getMutableHistogram()

Histogram & correlation::analysis::DistributionFunctions::getMutableHistogram ( const std::string & name)
nodiscard

Access a mutable calculated histogram by name.

Parameters
nameThe name of the distribution function.
Returns
A mutable reference to the Histogram data.
Exceptions
std::out_of_rangeif the name is not found.
Here is the caller graph for this function:

◆ getPartialKey()

std::string correlation::analysis::DistributionFunctions::getPartialKey ( int type1,
int type2 ) const
nodiscard

Generates a unique string key for a pair of element types.

Parameters
type1First element ID.
type2Second element ID.
Returns
Canonical string key (e.g. "Si-O").
Here is the caller graph for this function:

◆ getPerFrameStore()

std::shared_ptr< const PerFrameDistributionStore > correlation::analysis::DistributionFunctions::getPerFrameStore ( ) const
inlinenodiscardnoexcept

Accesses the per-frame distribution store (if computed).

Returns
Const shared pointer to PerFrameDistributionStore, or nullptr.

◆ getRelaxationTime()

real_t correlation::analysis::DistributionFunctions::getRelaxationTime ( ) const
inlinenodiscardnoexcept

Gets the relaxation time computed from normalized VACF.

Returns
The relaxation time in fs.
Here is the caller graph for this function:

◆ getSuperconductingDiagnostics()

const SuperconductingDiagnostics & correlation::analysis::DistributionFunctions::getSuperconductingDiagnostics ( ) const
inlinenodiscardnoexcept

Gets the superconducting screening diagnostics derived from Eliashberg α²F(ω).

Returns
Const reference to SuperconductingDiagnostics.
Here is the caller graph for this function:

◆ hasHistogram()

bool correlation::analysis::DistributionFunctions::hasHistogram ( const std::string & name) const
nodiscard

Checks if a calculated histogram exists by name or alias.

Parameters
nameThe name or alias to query.
Returns
True if present, false otherwise.
Here is the caller graph for this function:

◆ mutablePerFrameStore()

std::shared_ptr< PerFrameDistributionStore > correlation::analysis::DistributionFunctions::mutablePerFrameStore ( )
inlinenodiscardnoexcept

Accesses mutable shared pointer to the per-frame distribution store.

Returns
Mutable shared pointer to PerFrameDistributionStore, or nullptr.

◆ neighbors()

const StructureAnalyzer * correlation::analysis::DistributionFunctions::neighbors ( ) const
nodiscard

Returns the structure analyzer providing neighbor information.

Returns
Pointer to the current StructureAnalyzer.
Here is the caller graph for this function:

◆ normalizeHistograms()

void correlation::analysis::DistributionFunctions::normalizeHistograms ( DistributionFunctions & dist_funcs)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

DistributionFunctions & correlation::analysis::DistributionFunctions::operator= ( const DistributionFunctions & )
delete

Deleted copy assignment operator (contains non-copyable std::mutex).

Here is the call graph for this function:

◆ operator=() [2/2]

DistributionFunctions & correlation::analysis::DistributionFunctions::operator= ( DistributionFunctions && other)
noexcept

Move assignment operator.

Parameters
otherThe DistributionFunctions object to move from.
Returns
Reference to this object.
Here is the call graph for this function:

◆ processSingleFrame()

std::unique_ptr< DistributionFunctions > correlation::analysis::DistributionFunctions::processSingleFrame ( correlation::core::Trajectory & trajectory,
const TrajectoryAnalyzer & analyzer,
size_t frame_idx,
const AnalysisSettings & settings,
const BondCutoffMatrix & bond_cutoffs )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeHistogram()

bool correlation::analysis::DistributionFunctions::removeHistogram ( const std::string & name)

Removes a histogram from the collection if present.

Parameters
nameName of the histogram to remove.
Returns
True if the histogram existed and was removed, false otherwise.

◆ scale()

void correlation::analysis::DistributionFunctions::scale ( real_t factor)

Scales all histograms in this object by a factor. Used for normalizing averaged distributions.

Parameters
factorThe scaling factor.
Here is the caller graph for this function:

◆ setDeborahNumber()

void correlation::analysis::DistributionFunctions::setDeborahNumber ( real_t deborah_num)
inlinenoexcept

Sets the Deborah number.

Parameters
deborah_numThe new Deborah number value.
Here is the caller graph for this function:

◆ setDiffusionCoefficientMSD()

void correlation::analysis::DistributionFunctions::setDiffusionCoefficientMSD ( real_t diff_coeff)
inlinenoexcept

Sets the self-diffusion coefficient computed from Mean Squared Displacement (MSD).

Parameters
diff_coeffThe new diffusion coefficient value in Ų/fs.
Here is the caller graph for this function:

◆ setDiffusionCoefficientVACF()

void correlation::analysis::DistributionFunctions::setDiffusionCoefficientVACF ( real_t diff_coeff)
inlinenoexcept

Sets the self-diffusion coefficient computed from Velocity Autocorrelation Function (VACF).

Parameters
diff_coeffThe new diffusion coefficient value in Ų/fs.
Here is the caller graph for this function:

◆ setDynamicProperties()

void correlation::analysis::DistributionFunctions::setDynamicProperties ( const DynamicProperties & props)
inlinenoexcept

Sets the trajectory-wide dynamic properties.

Parameters
propsThe DynamicProperties struct.

◆ setElectronicDiagnostics()

void correlation::analysis::DistributionFunctions::setElectronicDiagnostics ( ElectronicDiagnostics diagnostics)
inlinenoexcept

Sets the electronic structure diagnostics extracted from LDOS/TDOS.

Parameters
[in]diagnosticsElectronicDiagnostics payload to store.

◆ setHyperuniformityDiagnostics()

void correlation::analysis::DistributionFunctions::setHyperuniformityDiagnostics ( const HyperuniformityDiagnostics & diag)
inlinenoexcept

Sets the scalar hyperuniformity diagnostics struct.

Parameters
diagThe computed HyperuniformityDiagnostics values.
Here is the caller graph for this function:

◆ setPerFrameStore()

void correlation::analysis::DistributionFunctions::setPerFrameStore ( std::shared_ptr< PerFrameDistributionStore > store)
inlinenoexcept

Sets or updates the per-frame distribution store.

Parameters
[in]storeShared pointer to PerFrameDistributionStore.

◆ setRelaxationTime()

void correlation::analysis::DistributionFunctions::setRelaxationTime ( real_t relax_time)
inlinenoexcept

Sets the relaxation time computed from normalized VACF.

Parameters
relax_timeThe new relaxation time value in fs.
Here is the caller graph for this function:

◆ setStructureAnalyzer()

void correlation::analysis::DistributionFunctions::setStructureAnalyzer ( const StructureAnalyzer * analyzer)

Uses an external StructureAnalyzer for neighborhood/bond info.

Parameters
analyzerA pre-computed external analyzer instance.

◆ setStructureAnalyzerOwned()

void correlation::analysis::DistributionFunctions::setStructureAnalyzerOwned ( std::unique_ptr< StructureAnalyzer > analyzer)

Takes ownership of a StructureAnalyzer for neighborhood/bond info.

Parameters
analyzerA pre-computed analyzer instance.
Here is the caller graph for this function:

◆ setSuperconductingDiagnostics()

void correlation::analysis::DistributionFunctions::setSuperconductingDiagnostics ( const SuperconductingDiagnostics & diagnostics)
inlinenoexcept

Sets the superconducting screening diagnostics derived from Eliashberg α²F(ω).

Parameters
[in]diagnosticsSuperconductingDiagnostics payload to store.
Here is the caller graph for this function:

◆ smooth()

void correlation::analysis::DistributionFunctions::smooth ( const std::string & name,
real_t sigma,
correlation::math::KernelType kernel = correlation::math::KernelType::Gaussian )

Smooths a specific histogram.

Parameters
nameName of the histogram (e.g., "g(r)").
sigmaSmoothing width.
kernelThe smoothing kernel type.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smoothAll()

void correlation::analysis::DistributionFunctions::smoothAll ( real_t sigma,
correlation::math::KernelType kernel = correlation::math::KernelType::Gaussian )

Smooths all available histograms.

Parameters
sigmaSmoothing width.
kernelThe smoothing kernel type.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ashcroft_weights_

std::map<std::string, real_t> correlation::analysis::DistributionFunctions::ashcroft_weights_
private

Scalar weights for S(Q) calculations.

◆ bond_cutoffs_

BondCutoffMatrix correlation::analysis::DistributionFunctions::bond_cutoffs_
private

Cached squared bond cutoff ranges.

◆ cell_

correlation::core::Cell correlation::analysis::DistributionFunctions::cell_
private

Reference to the cell being analyzed.

◆ current_cutoff_

real_t correlation::analysis::DistributionFunctions::current_cutoff_ {-1.0}
private

Last cutoff used for neighbor searching.

◆ dynamic_properties_

DynamicProperties correlation::analysis::DistributionFunctions::dynamic_properties_ {}
private

Trajectory-wide dynamic properties.

◆ electronic_diagnostics_

ElectronicDiagnostics correlation::analysis::DistributionFunctions::electronic_diagnostics_ {}
private

Electronic LDOS/TDOS diagnostics.

◆ histogram_mutex_

std::mutex correlation::analysis::DistributionFunctions::histogram_mutex_
mutableprivate

Protects concurrent access to histograms_.

◆ histograms_

std::map<std::string, Histogram> correlation::analysis::DistributionFunctions::histograms_
private

Storage for all analysis results.

◆ hyperuniformity_diagnostics_

HyperuniformityDiagnostics correlation::analysis::DistributionFunctions::hyperuniformity_diagnostics_ {}
private

Scalar hyperuniformity diagnostics.

◆ neighbors_owned_

std::unique_ptr<StructureAnalyzer> correlation::analysis::DistributionFunctions::neighbors_owned_
private

Owned neighbor info.

◆ neighbors_ref_

const StructureAnalyzer* correlation::analysis::DistributionFunctions::neighbors_ref_ {nullptr}
private

Pointer to external neighbor info.

◆ per_frame_store_

std::shared_ptr<PerFrameDistributionStore> correlation::analysis::DistributionFunctions::per_frame_store_
private

Per-frame 1D distribution curves.

◆ superconducting_diagnostics_

SuperconductingDiagnostics correlation::analysis::DistributionFunctions::superconducting_diagnostics_ {}
private

Eliashberg α²F(ω) superconducting diagnostics.


The documentation for this class was generated from the following files: