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
21class IIRAResource;
22
26public:
27 struct MatchResult {
28 std::vector<int> permutation; // Atom permutation mapping 1->2
29 Eigen::Matrix3d rotation; // Optimal rotation matrix
30 Eigen::Vector3d translation; // Optimal translation vector
31 double hausdorffDistance; // Hausdorff distance after alignment
32 int error{0}; // 0 = success
33 };
34
36 std::string pointGroup;
38 std::vector<Eigen::Matrix3d> operations;
39 std::vector<std::string> operationLabels;
40 std::vector<double> angles;
41 std::vector<Eigen::Vector3d> axes;
42 int error{0};
43 };
44
47 static MatchResult match(const Matter &m1, const Matter &m2,
48 double distThreshold);
49
53 static MatchResult matchArrays(int nat1, const int *typ1, const double *pos1,
54 int nat2, const int *typ2, const double *pos2,
55 double distThreshold);
57 static MatchResult matchArrays(int nat1, const int *typ1, const double *pos1,
58 int nat2, const int *typ2, const double *pos2,
59 double distThreshold, IIRAResource &res);
60
63 static MatchResult matchPBC(const Matter &m1, const Matter &m2,
64 double distThreshold);
65 static MatchResult matchPBC(const Matter &m1, const Matter &m2,
66 double distThreshold, IIRAResource &res);
67
69 static SymmetryResult findSymmetry(const Matter &m, double threshold,
70 bool prescreenIh = true);
71 static SymmetryResult findSymmetry(const Matter &m, double threshold,
72 bool prescreenIh, IIRAResource &res);
73
76 static MatchResult alignReactantToProduct(Matter &reactant,
77 const Matter &product,
78 double distThreshold);
79};
80
81} // namespace eonc
C++ wrapper for the IRA (Iterative Rotations and Assignments) library.
Definition IRACompare.h:25
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 alignReactantToProduct(Matter &reactant, const Matter &product, double distThreshold)
Rigid-align + permute reactant onto product.
static MatchResult match(const Matter &m1, const Matter &m2, double distThreshold)
Match two structures using CShDA + SVD (optimal rotation + assignment).
static MatchResult matchArrays(int nat1, const int *typ1, const double *pos1, int nat2, const int *typ2, const double *pos2, double distThreshold)
Same as match(), from packed (n,3) row-major coordinates and Z arrays.
RAII resource manager for the ARTn C library with global synchronization.
Eigen::Vector3d translation
Definition IRACompare.h:30
std::vector< int > permutation
Definition IRACompare.h:28
std::vector< std::string > operationLabels
Definition IRACompare.h:39
std::vector< double > angles
Definition IRACompare.h:40
std::vector< Eigen::Matrix3d > operations
Definition IRACompare.h:38
std::vector< Eigen::Vector3d > axes
Definition IRACompare.h:41