d-SEAMS
Install
Output
Methods
Docs
Engine & CLI
Python
Rust
Julia
R
Lua / Fennel
Fortran
PLUMED
linkcell
Wiki
Cite
GitHub
seams-core
v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Toggle main menu visibility
Loading...
Searching...
No Matches
cage_affiliation.hpp
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------------
2
// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3
//
4
// Copyright (c) 2018--present d-SEAMS core team
5
//
6
// SPDX-License-Identifier: MIT
7
//-----------------------------------------------------------------------------------
8
9
#ifndef SEAMS_CAGE_AFFILIATION_H_
10
#define SEAMS_CAGE_AFFILIATION_H_
11
12
#include <memory>
13
#include <vector>
14
54
55
namespace
ring
{
56
60
struct
CageAffiliation
{
61
std::vector<bool>
hc
;
62
std::vector<bool>
ddc
;
63
};
64
73
struct
StackingPlanes
{
74
std::vector<bool>
basal
;
75
std::vector<bool>
equatorial
;
76
};
77
78
[[nodiscard]]
StackingPlanes
stackingPlanes
(
79
const
std::vector<std::vector<int>> &rings,
80
const
std::vector<std::vector<int>> &nList);
81
85
[[nodiscard]]
CageAffiliation
cageAffiliation
(
86
const
std::vector<std::vector<int>> &rings,
87
const
std::vector<std::vector<int>> &nList);
88
100
class
AffiliationUpdater
{
101
public
:
102
AffiliationUpdater
();
103
~AffiliationUpdater
();
104
AffiliationUpdater
(
AffiliationUpdater
&&) noexcept;
105
AffiliationUpdater
&operator=(
AffiliationUpdater
&&) noexcept;
106
AffiliationUpdater
(const
AffiliationUpdater
&) = delete;
107
AffiliationUpdater
&operator=(const
AffiliationUpdater
&) = delete;
108
112
const
CageAffiliation
&
update
(const std::vector<std::vector<
int
>> &rings,
113
const std::vector<std::vector<
int
>> &nList);
114
117
[[nodiscard]]
int
lastReclassified
() const;
118
123
void
setBatchFraction
(
double
fraction);
124
125
private:
126
struct Impl;
127
std::unique_ptr<Impl> impl_;
128
};
129
133
struct
SeededAtomLabels
{
134
std::vector<bool>
hc
;
135
std::vector<bool>
ddc
;
136
};
137
159
[[nodiscard]]
SeededAtomLabels
seededCageAffiliation
(
160
const
std::vector<std::vector<int>> &strictRings,
161
const
std::vector<std::vector<int>> &strictNList,
162
const
std::vector<std::vector<int>> &permissiveRings,
163
const
std::vector<std::vector<int>> &permissiveNList,
164
bool
ringAdjacentCompletion
=
false
);
165
177
[[nodiscard]]
SeededAtomLabels
seededCageAffiliation
(
178
const
std::vector<std::vector<int>> &strictRings,
179
const
CageAffiliation
&strictAffiliation,
180
const
std::vector<std::vector<int>> &permissiveRings,
181
const
CageAffiliation
&permissiveAffiliation,
182
const
std::vector<std::vector<int>> &permissiveNList,
183
bool
ringAdjacentCompletion
=
false
);
184
203
[[nodiscard]]
SeededAtomLabels
204
ringAdjacentCompletion
(
const
SeededAtomLabels
&labels,
205
const
std::vector<std::vector<int>> &permissiveRings);
206
207
}
// namespace ring
208
209
#endif
// SEAMS_CAGE_AFFILIATION_H_
ring::AffiliationUpdater::update
const CageAffiliation & update(const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList)
ring::AffiliationUpdater::lastReclassified
int lastReclassified() const
ring::AffiliationUpdater::AffiliationUpdater
AffiliationUpdater()
ring::AffiliationUpdater::setBatchFraction
void setBatchFraction(double fraction)
ring::AffiliationUpdater::AffiliationUpdater
AffiliationUpdater(AffiliationUpdater &&) noexcept
ring::AffiliationUpdater::~AffiliationUpdater
~AffiliationUpdater()
ring
Topological network criteria functions.
Definition
cage_affiliation.hpp:55
ring::seededCageAffiliation
SeededAtomLabels seededCageAffiliation(const std::vector< std::vector< int > > &strictRings, const std::vector< std::vector< int > > &strictNList, const std::vector< std::vector< int > > &permissiveRings, const std::vector< std::vector< int > > &permissiveNList, bool ringAdjacentCompletion=false)
Seeded affiliation over two graphs on the same atoms: the strict graph (typically the mutual k-neares...
ring::ringAdjacentCompletion
SeededAtomLabels ringAdjacentCompletion(const SeededAtomLabels &labels, const std::vector< std::vector< int > > &permissiveRings)
Ring completion of seeded labels.
ring::cageAffiliation
CageAffiliation cageAffiliation(const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList)
ring::stackingPlanes
StackingPlanes stackingPlanes(const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList)
ring::CageAffiliation
Per-ring affiliation flags, indexed like the input ring vector.
Definition
cage_affiliation.hpp:60
ring::CageAffiliation::ddc
std::vector< bool > ddc
Basal or prismatic of a passing basal pair.
Definition
cage_affiliation.hpp:62
ring::CageAffiliation::hc
std::vector< bool > hc
Definition
cage_affiliation.hpp:61
ring::SeededAtomLabels
Per-atom cage flags from seeded (hysteresis) affiliation.
Definition
cage_affiliation.hpp:133
ring::SeededAtomLabels::ddc
std::vector< bool > ddc
Atom belongs to an accepted HC-affiliated ring.
Definition
cage_affiliation.hpp:135
ring::SeededAtomLabels::hc
std::vector< bool > hc
Definition
cage_affiliation.hpp:134
ring::StackingPlanes
Six-rings that are ice-I stacking planes.
Definition
cage_affiliation.hpp:73
ring::StackingPlanes::equatorial
std::vector< bool > equatorial
HC basal of a passing pair.
Definition
cage_affiliation.hpp:75
ring::StackingPlanes::basal
std::vector< bool > basal
Definition
cage_affiliation.hpp:74
src
include
internal
cage_affiliation.hpp