seams-core v2.6.0
libyodaLib, the C++ engine of d-SEAMS
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
ira_sofi.hpp
Go to the documentation of this file.
1
#ifndef SEAMS_IRA_SOFI_H_
2
#define SEAMS_IRA_SOFI_H_
3
4
#include <Eigen/Core>
5
#include <string>
6
#include <vector>
7
8
// IRA (Gunde, Salles, Hemeryck, Martin-Samos, JCIM 2021,
9
// 10.1021/acs.jcim.1c00567) solves rotation + translation + permutation.
10
// SOFI (Gunde, Salles, Grisanti, Hemeryck, Martin-Samos, JCP 2024,
11
// 10.1063/5.0215689) returns the degenerate self-matches as the point group.
12
// Both live in libira. A build without the library still compiles these
13
// declarations; match and pointGroup then return 1.
14
15
namespace
ira
{
16
17
struct
Match
{
18
Eigen::Matrix3d
rotation
= Eigen::Matrix3d::Identity();
19
Eigen::Vector3d
translation
= Eigen::Vector3d::Zero();
20
std::vector<int>
assignment
;
21
std::vector<double>
quat
;
22
double
hausdorff
= 0.0;
23
double
rmsd
= 0.0;
24
};
25
26
bool
available
();
27
28
// Overlay target onto ref. Both are n x 3 (or m x 3). Equal size is the
29
// cage/prism case; unequal size is a fragment match. Returns 0 on success.
30
[[nodiscard]]
int
match
(
const
Eigen::MatrixXd &ref,
31
const
Eigen::MatrixXd &target,
Match
&out,
32
double
kmaxFactor = 1.8);
33
34
// Point-group operations of a centered n x 3 cloud. Returns 0 on success.
35
struct
PointGroup
{
36
std::string
symbol
;
37
int
nOperations
= 0;
38
std::vector<Eigen::Matrix3d>
operations
;
39
};
40
41
[[nodiscard]]
int
pointGroup
(
const
Eigen::MatrixXd &coords,
PointGroup
&out,
42
double
symThr = 0.05);
43
44
// Horn-shaped result for callers that already store quat + rmsd.
45
// Returns true when IRA produced a match.
46
bool
orient
(
const
Eigen::MatrixXd &ref,
const
Eigen::MatrixXd &target,
47
std::vector<double> &quat,
double
&rmsd);
48
49
}
// namespace ira
50
51
#endif
// SEAMS_IRA_SOFI_H_
ira
Definition
ira_sofi.hpp:15
ira::available
bool available()
ira::orient
bool orient(const Eigen::MatrixXd &ref, const Eigen::MatrixXd &target, std::vector< double > &quat, double &rmsd)
ira::pointGroup
int pointGroup(const Eigen::MatrixXd &coords, PointGroup &out, double symThr=0.05)
match
Definition
shapeMatch.hpp:36
ira::Match
Definition
ira_sofi.hpp:17
ira::Match::quat
std::vector< double > quat
Definition
ira_sofi.hpp:21
ira::Match::rotation
Eigen::Matrix3d rotation
Definition
ira_sofi.hpp:18
ira::Match::assignment
std::vector< int > assignment
Definition
ira_sofi.hpp:20
ira::Match::translation
Eigen::Vector3d translation
Definition
ira_sofi.hpp:19
ira::Match::rmsd
double rmsd
Definition
ira_sofi.hpp:23
ira::Match::hausdorff
double hausdorff
Definition
ira_sofi.hpp:22
ira::PointGroup
Definition
ira_sofi.hpp:35
ira::PointGroup::nOperations
int nOperations
Definition
ira_sofi.hpp:37
ira::PointGroup::operations
std::vector< Eigen::Matrix3d > operations
Definition
ira_sofi.hpp:38
ira::PointGroup::symbol
std::string symbol
Definition
ira_sofi.hpp:36
src
include
internal
ira_sofi.hpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf