Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::DistanceGeometry::MetricMatrix Class Reference

Public Member Functions

 MetricMatrix (Eigen::MatrixXd distanceMatrix)
 
const Eigen::MatrixXd & access () const
 Nonmodifiable access to underlying matrix. More...
 
Eigen::MatrixXd embed () const
 Embeds metric matrix into four dimensional space. More...
 
Eigen::MatrixXd embedWithFullDiagonalization () const
 Implements embedding employing full diagonalization. More...
 
bool operator== (const MetricMatrix &other) const
 

Private Member Functions

void constructFromTemporary_ (Eigen::MatrixXd &&distances)
 

Private Attributes

Eigen::MatrixXd matrix_
 

Member Function Documentation

const Eigen::MatrixXd& Scine::Molassembler::DistanceGeometry::MetricMatrix::access ( ) const

Nonmodifiable access to underlying matrix.

Complexity \(\Theta(1)\)

Eigen::MatrixXd Scine::Molassembler::DistanceGeometry::MetricMatrix::embed ( ) const

Embeds metric matrix into four dimensional space.

Embeds itself into 4D space, returning a dynamically sized Matrix where every column vector is the coordinates of a particle.

Note
For Molecules of size 20 and lower, employs full diagonalization. If larger, attempts to calculate only the required eigenpairs. If that fails, falls back on full diagonalization.
Eigen::MatrixXd Scine::Molassembler::DistanceGeometry::MetricMatrix::embedWithFullDiagonalization ( ) const

Implements embedding employing full diagonalization.

Uses Eigen's SelfAdjointEigenSolver to fully diagonalize the matrix, calculating all eigenpairs. Then selects the necessary ones from the full set.

Complexity \(\Theta(9 N^3)\) for the eigenvalue decomposition per Eigen's documentation

Note
Faster for roughly N < 20

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