|
Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
|
Computes and stores pairwise distances and bond angles in tensors indexed by element type. More...
#include <StructureAnalyzer.hpp>

Public Types | |
| using | RawHistogramTensor = std::vector<std::vector<std::vector<real_t>>> |
| Tensor for storing raw distance histogram bins [element1][element2][bin_index]. | |
| using | AngleTensor = std::vector<std::vector<std::vector<std::vector<real_t>>>> |
| Tensor for storing bond angles [center][outer1][outer2][angle_index]. | |
| using | DihedralTensor = std::vector<std::vector<std::vector<std::vector<std::vector<real_t>>>>> |
| Tensor for storing dihedrals [e1][e2][e3][e4][dihedral_index]. | |
Public Member Functions | |
Constructors & Destructors | |
| StructureAnalyzer (std::shared_ptr< const correlation::core::Cell > cell, real_t cutoff, BondCutoffMatrix bond_cutoffs, bool ignore_periodic_self_interactions=true, real_t r_bin_width=static_cast< real_t >(0.02)) | |
| Constructs a StructureAnalyzer using shared ownership of the Cell. | |
| StructureAnalyzer (const correlation::core::Cell &cell, real_t cutoff, BondCutoffMatrix bond_cutoffs, bool ignore_periodic_self_interactions=true, real_t r_bin_width=static_cast< real_t >(0.02)) | |
| Constructs a StructureAnalyzer copying the cell into a shared instance. | |
| ~StructureAnalyzer ()=default | |
| StructureAnalyzer (const StructureAnalyzer &)=delete | |
| StructureAnalyzer & | operator= (const StructureAnalyzer &)=delete |
| StructureAnalyzer (StructureAnalyzer &&other) noexcept | |
| StructureAnalyzer & | operator= (StructureAnalyzer &&other) noexcept |
Accessors | |
| const correlation::core::Cell & | cell () const noexcept |
| Gets a reference to the periodic cell. | |
| std::shared_ptr< const correlation::core::Cell > | cellPtr () const noexcept |
| Gets the shared pointer to the periodic cell. | |
| const RawHistogramTensor & | rawHistograms () const |
| Gets a multi-dimensional tensor containing raw distance histogram bins. | |
| const AngleTensor & | angles () const |
| Gets a multi-dimensional tensor containing bond angles. Computed lazily on first access in a thread-safe manner. | |
| const DihedralTensor & | dihedrals () const |
| Gets a multi-dimensional tensor containing dihedral angles. Computed lazily on first access in a thread-safe manner. | |
| const correlation::core::NeighborGraph & | neighborGraph () const |
| Gets the corresponding neighbor graph capturing topological connections. | |
| bool | getIgnorePeriodicSelfInteractions () const |
| Returns true if periodic self-interactions are ignored. | |
Private Member Functions | |
| void | ensureAnglesComputed () const |
| void | ensureDihedralsComputed () const |
Private Attributes | |
| std::shared_ptr< const correlation::core::Cell > | cell_ |
| Shared pointer to the periodic cell. | |
| real_t | cutoff_sq_ |
| Squared cutoff for efficiency. | |
| BondCutoffMatrix | bond_cutoffs_ |
| Internal bond cutoffs matrix. | |
| bool | ignore_periodic_self_interactions_ |
| Interaction guard. | |
| correlation::core::NeighborGraph | neighbor_graph_ |
| Graph of topological bonds. | |
| RawHistogramTensor | raw_histograms_ |
| Raw distance histogram storage. | |
| AngleTensor | angle_tensor_ |
| Bond angle storage (lazy). | |
| DihedralTensor | dihedral_tensor_ |
| Dihedral angle storage (lazy). | |
| std::mutex | compute_mutex_ |
| Mutex guarding lazy computation. | |
| std::atomic< bool > | angles_computed_ {false} |
| Flag indicating if angles are computed. | |
| std::atomic< bool > | dihedrals_computed_ |
| Flag indicating if dihedrals are computed. | |
Computes and stores pairwise distances and bond angles in tensors indexed by element type.
This class efficiently finds all atom pairs within a cutoff radius and all unique bond angles, storing the results in multi-dimensional vectors (tensors) suitable for calculating partial distribution functions. Angle and Dihedral tensors are computed lazily on first access.
| using correlation::analysis::StructureAnalyzer::AngleTensor = std::vector<std::vector<std::vector<std::vector<real_t>>>> |
Tensor for storing bond angles [center][outer1][outer2][angle_index].
| using correlation::analysis::StructureAnalyzer::DihedralTensor = std::vector<std::vector<std::vector<std::vector<std::vector<real_t>>>>> |
Tensor for storing dihedrals [e1][e2][e3][e4][dihedral_index].
| using correlation::analysis::StructureAnalyzer::RawHistogramTensor = std::vector<std::vector<std::vector<real_t>>> |
Tensor for storing raw distance histogram bins [element1][element2][bin_index].
|
explicit |
Constructs a StructureAnalyzer using shared ownership of the Cell.
| cell | Shared pointer to the periodic simulation cell (zero-copy). |
| cutoff | Neighbor search cutoff radius. |
| bond_cutoffs | Matrix of per-pair bond cutoffs. |
| ignore_periodic_self_interactions | Flag to ignore periodic self-interactions. |
| r_bin_width | Bin width for radial histograms. |


|
explicit |
Constructs a StructureAnalyzer copying the cell into a shared instance.
| cell | Reference to the periodic simulation cell. |
| cutoff | Neighbor search cutoff radius. |
| bond_cutoffs | Matrix of per-pair bond cutoffs. |
| ignore_periodic_self_interactions | Flag to ignore periodic self-interactions. |
| r_bin_width | Bin width for radial histograms. |

|
default |
|
delete |

|
noexcept |

|
nodiscard |
Gets a multi-dimensional tensor containing bond angles. Computed lazily on first access in a thread-safe manner.


|
inlinenodiscardnoexcept |
Gets a reference to the periodic cell.

|
inlinenodiscardnoexcept |
Gets the shared pointer to the periodic cell.
|
nodiscard |
Gets a multi-dimensional tensor containing dihedral angles. Computed lazily on first access in a thread-safe manner.


|
private |


|
private |


|
inlinenodiscard |
Returns true if periodic self-interactions are ignored.

|
inlinenodiscard |
Gets the corresponding neighbor graph capturing topological connections.

|
delete |

|
noexcept |

|
inlinenodiscard |
Gets a multi-dimensional tensor containing raw distance histogram bins.

|
mutableprivate |
Bond angle storage (lazy).
|
mutableprivate |
Flag indicating if angles are computed.
|
private |
Internal bond cutoffs matrix.
|
private |
Shared pointer to the periodic cell.
|
mutableprivate |
Mutex guarding lazy computation.
|
private |
Squared cutoff for efficiency.
|
mutableprivate |
Dihedral angle storage (lazy).
|
mutableprivate |
Flag indicating if dihedrals are computed.
|
private |
Interaction guard.
|
private |
Graph of topological bonds.
|
private |
Raw distance histogram storage.