23 std::vector<std::vector<int>> nList,
const Eigen::MatrixXd &refPoints,
24 std::vector<int> *basal1, std::vector<int> *basal2,
25 std::vector<double> *rmsdPerAtom,
bool isPerfect) {
27 int ringSize = (*basal1).size();
28 std::vector<int> matchedBasal1,
32 Eigen::MatrixXd basal1Set(ringSize,
34 Eigen::MatrixXd basal2Set(ringSize,
38 double cutoffAngle = 15;
42 std::vector<double> quat1, quat2;
44 std::vector<double> rmsdList1,
46 double scale1, scale2;
48 bool doAngleCriterion =
false ;
59 yCloud, nList, refPoints, &matchedBasal1, &matchedBasal2, &startingIndex);
112 std::vector<std::vector<int>> nList,
const Eigen::MatrixXd &refPoints,
113 std::vector<int> *basal1, std::vector<int> *basal2,
114 std::vector<double> *rmsdPerAtom) {
116 int ringSize = (*basal1).size();
117 std::vector<int> matchedBasal1,
121 Eigen::MatrixXd basal1Set(ringSize,
123 Eigen::MatrixXd basal2Set(ringSize,
129 std::vector<double> quat1, quat2;
131 std::vector<double> rmsdList1,
133 double scale1, scale2;
135 bool doAngleCriterion =
false ;
146 yCloud, nList, refPoints, &matchedBasal1, &matchedBasal2, &startingIndex);
187 std::vector<double> rmsdFromMatch,
188 std::vector<double> *rmsdPerAtom) {
191 int ringSize = basalRing.size();
197 for (
int i = 0; i < ringSize; i++) {
198 index = i + startingIndex;
200 if (index >= ringSize) {
205 atomIndex = basalRing[index];
207 iRMSD = rmsdFromMatch[i];
208 if ((*rmsdPerAtom)[atomIndex] == -1) {
209 (*rmsdPerAtom)[atomIndex] = iRMSD;
221 double rmsdVal, std::vector<double> *rmsdPerAtom) {
224 int ringSize = basalRing.size();
229 for (
int i = 0; i < ringSize; i++) {
230 index = i + startingIndex;
232 if (index >= ringSize) {
237 atomIndex = basalRing[index];
239 if ((*rmsdPerAtom)[atomIndex] == -1) {
240 (*rmsdPerAtom)[atomIndex] = rmsdVal;
253 std::vector<std::vector<int>> nList,
const Eigen::MatrixXd &refPoints,
254 std::vector<int> *basal1, std::vector<int> *basal2,
int *beginIndex) {
256 int ringSize = (*basal1).size();
259 int nop = 2 * ringSize;
260 Eigen::MatrixXd refPrismBlock(
262 Eigen::MatrixXd targetPrismBlock(
267 std::vector<double> quat;
269 std::vector<double> rmsdList;
278 if (ringSize % 2 == 0 || ringSize == 3) {
290 std::vector<double> currentQuat;
296 for (
int i = 0; i < ringSize; i++) {
304 ¤tRmsd, ¤tRmsdList, ¤tScale);
310 rmsdList = currentRmsdList;
311 scale = currentScale;
317 if (currentRmsd < rmsd) {
320 rmsdList = currentRmsdList;
321 scale = currentScale;
329 *beginIndex = startingIndex;
int hornAbsOrientation(const Eigen::MatrixXd &refPoints, const Eigen::MatrixXd &targetPoints, std::vector< double > *quat, double *rmsd, std::vector< double > *rmsdList, double *scale)
Get the absolute orientation using Horn's algorithm (with quaternions)
int updatePerAtomRMSDRing(std::vector< int > basalRing, int startingIndex, std::vector< double > rmsdFromMatch, std::vector< double > *rmsdPerAtom)
Update the per-particle RMSD for a prism block basal ring.
bool matchUntetheredPrism(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, const Eigen::MatrixXd &refPoints, std::vector< int > *basal1, std::vector< int > *basal2, std::vector< double > *rmsdPerAtom)
bool matchPrism(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, const Eigen::MatrixXd &refPoints, std::vector< int > *basal1, std::vector< int > *basal2, std::vector< double > *rmsdPerAtom, bool isPerfect=true)
int updateRMSDRing(std::vector< int > basalRing, int startingIndex, double rmsdVal, std::vector< double > *rmsdPerAtom)
bool matchPrismBlock(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, const Eigen::MatrixXd &refPoints, std::vector< int > *basal1, std::vector< int > *basal2, int *beginIndex)
Eigen::MatrixXd fillPointSetPrismRing(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< int > basalRing, int startingIndex)
int relOrderPrismBlock(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< int > basal1, std::vector< int > basal2, std::vector< std::vector< int > > nList, std::vector< int > *outBasal1, std::vector< int > *outBasal2)
Eigen::MatrixXd createPrismBlock(molSys::PointCloud< molSys::Point< double >, double > *yCloud, const Eigen::MatrixXd &refPoints, int ringSize, std::vector< int > basal1, std::vector< int > basal2)
Eigen::MatrixXd fillPointSetPrismBlock(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< int > basal1, std::vector< int > basal2, int startingIndex)
This contains a collection of points; contains information for a particular frame.
This contains per-particle information.
Copy