Loading...
Searching...
No Matches
IRACompare.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include "Eigen.h"
15#include "Matter.h"
16#include <string>
17#include <vector>
18
19namespace eonc {
20
24public:
25 struct MatchResult {
26 std::vector<int> permutation; // Atom permutation mapping 1->2
27 Eigen::Matrix3d rotation; // Optimal rotation matrix
28 Eigen::Vector3d translation; // Optimal translation vector
29 double hausdorffDistance; // Hausdorff distance after alignment
30 int error{0}; // 0 = success
31 };
32
34 std::string pointGroup;
36 std::vector<Eigen::Matrix3d> operations;
37 std::vector<std::string> operationLabels;
38 std::vector<double> angles;
39 std::vector<Eigen::Vector3d> axes;
40 int error{0};
41 };
42
45 static MatchResult match(const Matter &m1, const Matter &m2,
46 double distThreshold);
47
50 static MatchResult matchPBC(const Matter &m1, const Matter &m2,
51 double distThreshold);
52
54 static SymmetryResult findSymmetry(const Matter &m, double threshold,
55 bool prescreenIh = true);
56};
57
58} // namespace eonc
59
C++ wrapper for the IRA (Iterative Rotations and Assignments) library.
Definition IRACompare.h:23
static MatchResult matchPBC(const Matter &m1, const Matter &m2, double distThreshold)
Atom assignment under periodic boundary conditions (CShDA only, no rotation/SVD).
static SymmetryResult findSymmetry(const Matter &m, double threshold, bool prescreenIh=true)
Find all symmetry operations of a structure (SOFI algorithm).
static MatchResult match(const Matter &m1, const Matter &m2, double distThreshold)
Match two structures using CShDA + SVD (optimal rotation + assignment).
RAII resource manager for the ARTn C library with global synchronization.
Eigen::Vector3d translation
Definition IRACompare.h:28
std::vector< int > permutation
Definition IRACompare.h:26
std::vector< std::string > operationLabels
Definition IRACompare.h:37
std::vector< double > angles
Definition IRACompare.h:38
std::vector< Eigen::Matrix3d > operations
Definition IRACompare.h:36
std::vector< Eigen::Vector3d > axes
Definition IRACompare.h:39