seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
ring Namespace Reference

Topological network criteria functions. More...

Classes

class  AffiliationUpdater
 Exact incremental affiliation across frames. More...
struct  CageAffiliation
 Per-ring affiliation flags, indexed like the input ring vector. More...
struct  DdcSplit
struct  EquatorChoice
class  NeighBond
 Membership of the neighbour rows after the leading self entry. More...
struct  PackingCertificate
 Proof that the reported number of equatorial rings is maximum. More...
struct  PackParts
struct  RingSearchIndex
 Inverted index from an atom to the rings that contain it. More...
struct  SeededAtomLabels
 Per-atom cage flags from seeded (hysteresis) affiliation. More...
struct  StackingPlanes
 Six-rings that are ice-I stacking planes. More...

Enumerations

enum class  strucType {
  unclassified , DDC , HCbasal , HCprismatic ,
  bothBasal , bothPrismatic , Prism , deformedPrism ,
  mixedPrismRing
}

Functions

StackingPlanes stackingPlanes (const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList)
CageAffiliation cageAffiliation (const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList)
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-nearest bonds) supplies seeds, the permissive supergraph (typically the union bonds) supplies completions, and a permissively affiliated atom is accepted only when its bonded component of affiliated atoms contains a seed.
SeededAtomLabels seededCageAffiliation (const std::vector< std::vector< int > > &strictRings, const CageAffiliation &strictAffiliation, const std::vector< std::vector< int > > &permissiveRings, const CageAffiliation &permissiveAffiliation, const std::vector< std::vector< int > > &permissiveNList, bool ringAdjacentCompletion=false)
 The same labels from the affiliation of each graph's six-rings, computed by the caller.
SeededAtomLabels ringAdjacentCompletion (const SeededAtomLabels &labels, const std::vector< std::vector< int > > &permissiveRings)
 Ring completion of seeded labels.
std::vector< std::vector< int > > getSingleRingSize (const std::vector< std::vector< int > > &rings, int ringSize)
 Returns a vector of vectors of rings of a single size.
bool hasCommonElements (const std::vector< int > &ring1, const std::vector< int > &ring2)
bool compareRings (std::vector< int > ring1, std::vector< int > ring2)
bool findTripletInRing (const std::vector< int > &ring, const std::vector< int > &triplet)
 Searches a particular ring for a triplet.
bool commonElementsInThreeRings (const std::vector< int > &ring1, const std::vector< int > &ring2, const std::vector< int > &ring3)
 Common elements in 3 rings.
std::vector< int > findsCommonElements (const std::vector< int > &ring1, const std::vector< int > &ring2)
 Returns the common elements of two rings.
int clearRingList (std::vector< std::vector< int > > &rings)
 Erases memory for a vector of vectors for a list of rings.
int assignPolygonType (const std::vector< std::vector< int > > &rings, std::vector< int > &atomTypes, const std::vector< int > &nRings)
void getEdgeMoleculesInRings (const std::vector< std::vector< int > > &rings, molSys::PointCloud< molSys::Point< double >, double > &oCloud, molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::array< double, 3 > coordLow, std::array< double, 3 > coordHigh, bool identicalCloud=false)
void printSliceGetEdgeMoleculesInRings (std::string path, const std::vector< std::vector< int > > &rings, molSys::PointCloud< molSys::Point< double >, double > &oCloud, molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::array< double, 3 > coordLow, std::array< double, 3 > coordHigh, bool identicalCloud=false)
int bulkPolygonRingAnalysis (std::string path, const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList, molSys::PointCloud< molSys::Point< double >, double > &yCloud, int maxDepth, int firstFrame)
int topoBulkAnalysis (std::string path, const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList, molSys::PointCloud< molSys::Point< double >, double > &yCloud, int firstFrame, bool onlyTetrahedral=true)
RingSearchIndex buildRingSearchIndex (const std::vector< std::vector< int > > &rings, int numAtoms, bool withRows=true)
RingSearchIndex buildRingSearchIndex (const std::vector< std::vector< int > > &rings, const molSys::PointCloud< molSys::Point< double >, double > &yCloud)
 As buildRingSearchIndex, ranking the atoms by position (ring::positionRank).
std::vector< int > positionRank (const molSys::PointCloud< molSys::Point< double >, double > &yCloud)
std::vector< std::vector< int > > contractibleRings (const std::vector< std::vector< int > > &rings, const molSys::PointCloud< molSys::Point< double >, double > &yCloud)
std::vector< std::vector< int > > contractibleRings (std::vector< std::vector< int > > &&rings, const molSys::PointCloud< molSys::Point< double >, double > &yCloud)
 Same rings, compacted in place, so a kept ring is moved and not copied.
std::vector< std::vector< int > > cageRings (const std::vector< std::vector< int > > &rings, const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff)
std::vector< int > findDDC (const std::vector< std::vector< int > > &rings, std::vector< strucType > &ringType, const std::vector< int > &listHC, std::vector< cage::Cage > &cageList)
int equatorChoiceOverflow (const struct EquatorChoice *self, int at)
void equatorChoiceOverflowPut (struct EquatorChoice *self, int at, int value)
void releaseEquatorOverflow ()
std::vector< int > maximumEquators (const std::vector< EquatorChoice > &periph, const std::vector< int > &order, PackingCertificate *certificate)
std::vector< int > findDDC (const std::vector< std::vector< int > > &rings, std::vector< strucType > &ringType, const std::vector< int > &listHC, std::vector< cage::Cage > &cageList, const RingSearchIndex &index, PackingCertificate *certificate=nullptr)
std::vector< int > findMixedRings (const std::vector< std::vector< int > > &rings, std::vector< strucType > &ringType, std::vector< int > &listDDC, std::vector< int > &listHC)
std::vector< int > findHC (const std::vector< std::vector< int > > &rings, std::vector< strucType > &ringType, const std::vector< std::vector< int > > &nList, std::vector< cage::Cage > &cageList)
std::vector< int > findHC (const std::vector< std::vector< int > > &rings, std::vector< strucType > &ringType, const std::vector< std::vector< int > > &nList, std::vector< cage::Cage > &cageList, const RingSearchIndex &index)
 As findHC, reusing an index the caller has already built.
bool conditionOneDDC (const std::vector< std::vector< int > > &rings, std::vector< int > &peripheralRings, int iring)
bool conditionOneDDC (const std::vector< std::vector< int > > &rings, std::vector< int > &peripheralRings, int iring, const RingSearchIndex &index)
 As conditionOneDDC, reusing an index the caller has already built.
bool equatorialConditions (const std::vector< std::vector< int > > &rings, int iring, const RingSearchIndex &index, std::vector< int > *peripheralUnion, std::vector< int > *chosen=nullptr, const std::vector< int > *rank=nullptr, EquatorChoice *raw=nullptr)
bool basalConditions (const std::vector< std::vector< int > > &nList, const std::vector< int > &basal1, const std::vector< int > &basal2)
bool basalConditions (const NeighBond &bonds, const std::vector< int > &basal1, const std::vector< int > &basal2)
 As basalConditions, answering bonds from a prebuilt NeighBond.
bool basalNeighbours (const std::vector< std::vector< int > > &nList, std::vector< int > &triplet, int atomOne, int atomTwo)
bool notNeighboursOfRing (const std::vector< std::vector< int > > &nList, std::vector< int > &triplet, const std::vector< int > &ring)
int findPrismatic (const std::vector< std::vector< int > > &rings, std::vector< int > &listHC, std::vector< strucType > &ringType, int iring, int jring, std::vector< int > &prismaticRings)
 Finds the prismatic rings from basal rings iring and jring.
int findPrismatic (const std::vector< std::vector< int > > &rings, std::vector< int > &listHC, std::vector< strucType > &ringType, int iring, int jring, std::vector< int > &prismaticRings, const RingSearchIndex &index)
 As findPrismatic, drawing candidate rings from the inverted index.
int getAtomTypesTopoBulk (const std::vector< std::vector< int > > &rings, const std::vector< ring::strucType > &ringType, std::vector< cage::iceType > &atomTypes)
int getStrucNumbers (const std::vector< ring::strucType > &ringType, const std::vector< cage::Cage > &cageList, int &numHC, int &numDDC, int &mixedRings, int &prismaticRings, int &basalRings)
 Determines the number of HCs, DDCs, Mixed rings, prismatic and basal rings.
PackParts lastPackParts ()
 Conflict build, clique ids, matching and branch-and-bound from the last pack.
DdcSplit lastDdcSplit ()
 Order, equatorial test and packing from the last findDDC call.
std::vector< int > findPrisms (const std::vector< std::vector< int > > &rings, std::vector< strucType > &ringType, int &nPerfectPrisms, int &nImperfectPrisms, const std::vector< std::vector< int > > &nList, molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::vector< double > &rmsdPerAtom, bool doShapeMatching=false)
bool basalPrismConditions (const std::vector< std::vector< int > > &nList, std::vector< int > &basal1, std::vector< int > &basal2)
bool relaxedPrismConditions (const std::vector< std::vector< int > > &nList, std::vector< int > &basal1, std::vector< int > &basal2)
bool discardExtraTetragonBlocks (std::vector< int > &basal1, std::vector< int > &basal2, molSys::PointCloud< molSys::Point< double >, double > &yCloud)
std::vector< std::vector< int > > keepAxialRingsOnly (const std::vector< std::vector< int > > &rings, molSys::PointCloud< molSys::Point< double >, double > &yCloud)
 Saves only axial rings out of all possible rings.
int prismAnalysis (std::string path, const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList, molSys::PointCloud< molSys::Point< double >, double > &yCloud, int maxDepth, int &atomID, int firstFrame, int currentFrame, bool doShapeMatching=false)
int assignPrismType (const std::vector< std::vector< int > > &rings, const std::vector< int > &listPrism, int ringSize, const std::vector< ring::strucType > &ringType, std::vector< int > &atomTypes, std::vector< ring::strucType > &atomState)
int deformedPrismTypes (const std::vector< ring::strucType > &atomState, std::vector< int > &atomTypes, int maxDepth)
 Get the atom type values for deformed prisms.
int rmAxialTranslations (molSys::PointCloud< molSys::Point< double >, double > &yCloud, int &atomID, int firstFrame, int currentFrame)
 Shift the entire ice nanotube and remove axial translations.
int polygonRingAnalysis (std::string path, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > &yCloud, int maxDepth, double sheetArea, int firstFrame)

Detailed Description

Topological network criteria functions.

This namespace contains functions for the topological network criteria for bulk and confined systems both.

Although the namespace is shared by bulk and confined topological network criteria, the functions are split into files specific to each set of criteria.

All the topological network criteria are based on the identification of primitive rings (using the Franzblau algorithm for primitive rings), following which specific rules for combinations of primitive rings are used to identify quasi-one-dimensional, quasi-two-dimensional and bulk ices.

Changelog

Enumeration Type Documentation

◆ strucType

enum class ring::strucType
strong
Enumerator
unclassified 

The ring is unclassified, which may be either water or a deformed type which cannot be classified by the criteria.

DDC 

The ring belongs to a double-diamond cage (DDC).

HCbasal 

The ring belongs only to a hexagonal cage (HC).

Specifically, the ring is purely a basal ring of an HC.

HCprismatic 

The ring belongs only to a hexagonal cage (HC); specifically the ring is purely a prismatic ring of an HC.

It is not shared by a DDC.

bothBasal 

The ring belongs to both a DDC and HC.

It is a 'mixed' ring. The ring is also one of the basal rings of the HC of which it is part. A mixed ring must be a peripheral ring of the DDC of which it is part by definition.

bothPrismatic 

The ring belongs to both a DDC and HC and is, thus, a 'mixed' ring.

The ring is also one of the prismatic rings of the HC of which it is part. A mixed ring must be a peripheral ring of the DDC of which it is part by definition (can never be an equatorial ring of a DDC and also be part of an HC).

Prism 

The ring belongs to a prism block, classified according to the prism identification scheme.

deformedPrism 
mixedPrismRing 

Definition at line 115 of file ring.hpp.

115 {
117 DDC,
118 HCbasal,
120 bothBasal,
122 Prism,
125};
@ unclassified
Not classified into any other category.
Definition mol_sys.hpp:114
@ HCbasal
The ring belongs only to a hexagonal cage (HC).
Definition ring.hpp:118
@ DDC
The ring belongs to a double-diamond cage (DDC).
Definition ring.hpp:117
@ bothPrismatic
The ring belongs to both a DDC and HC and is, thus, a 'mixed' ring.
Definition ring.hpp:121
@ Prism
The ring belongs to a prism block, classified according to the prism identification scheme.
Definition ring.hpp:122
@ bothBasal
The ring belongs to both a DDC and HC.
Definition ring.hpp:120
@ HCprismatic
The ring belongs only to a hexagonal cage (HC); specifically the ring is purely a prismatic ring of a...
Definition ring.hpp:119

Function Documentation

◆ assignPolygonType()

int ring::assignPolygonType ( const std::vector< std::vector< int > > & rings,
std::vector< int > & atomTypes,
const std::vector< int > & nRings )
nodiscard

Assign an atomType (equal to the number of nodes in the ring) given n-membered rings.

◆ assignPrismType()

int ring::assignPrismType ( const std::vector< std::vector< int > > & rings,
const std::vector< int > & listPrism,
int ringSize,
const std::vector< ring::strucType > & ringType,
std::vector< int > & atomTypes,
std::vector< ring::strucType > & atomState )
nodiscard

Assign an atomType (equal to the number of nodes in the ring) given a vector with a list of indices of rings comprising the prisms

◆ basalConditions() [1/2]

bool ring::basalConditions ( const NeighBond & bonds,
const std::vector< int > & basal1,
const std::vector< int > & basal2 )

As basalConditions, answering bonds from a prebuilt NeighBond.

◆ basalConditions() [2/2]

bool ring::basalConditions ( const std::vector< std::vector< int > > & nList,
const std::vector< int > & basal1,
const std::vector< int > & basal2 )

Tests whether two rings are basal rings (true) or not (false): some alternate triplet of basal1, starting at its first or second atom, is bonded one-to-one to an alternate triplet of basal2, and no atom of the other triplet of basal2 is bonded to basal1

◆ basalNeighbours()

bool ring::basalNeighbours ( const std::vector< std::vector< int > > & nList,
std::vector< int > & triplet,
int atomOne,
int atomTwo )

Tests whether the last two elements of a triplet are neighbours of two atom IDs passed in

◆ basalPrismConditions()

bool ring::basalPrismConditions ( const std::vector< std::vector< int > > & nList,
std::vector< int > & basal1,
std::vector< int > & basal2 )

Tests whether two rings are basal rings (true) or not (false) for a prism (strict criterion)

◆ buildRingSearchIndex() [1/2]

RingSearchIndex ring::buildRingSearchIndex ( const std::vector< std::vector< int > > & rings,
const molSys::PointCloud< molSys::Point< double >, double > & yCloud )
nodiscard

As buildRingSearchIndex, ranking the atoms by position (ring::positionRank).

◆ buildRingSearchIndex() [2/2]

RingSearchIndex ring::buildRingSearchIndex ( const std::vector< std::vector< int > > & rings,
int numAtoms,
bool withRows = true )
nodiscard

Builds the inverted atom-to-rings index used by the cage searches. With withRows false only the packed rows are filled, and ringsContainingAtom stays empty.

◆ bulkPolygonRingAnalysis()

int ring::bulkPolygonRingAnalysis ( std::string path,
const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & nList,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int maxDepth,
int firstFrame )
nodiscard

Find out rings in the bulk, looping through all ring sizes upto the maxDepth The input ringsAllSizes array has rings of every size.

◆ cageAffiliation()

CageAffiliation ring::cageAffiliation ( const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & nList )
nodiscard

Batch computation of the affiliation predicates for six-membered rings. nList is by index with the leading self entry, as neighbourListByIndex produces.

◆ cageRings()

std::vector< std::vector< int > > ring::cageRings ( const std::vector< std::vector< int > > & rings,
const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff )
nodiscard

Faces for a cage search: contractibleRings, after refusing a cutoff that can contain more than one periodic image of a pair. The narrowest face separation must be longer than twice cutoff. A cloud without a box keeps every ring. Throws std::invalid_argument when the cell is too thin for cutoff

◆ clearRingList()

int ring::clearRingList ( std::vector< std::vector< int > > & rings)
nodiscard

Erases memory for a vector of vectors for a list of rings.

◆ commonElementsInThreeRings()

bool ring::commonElementsInThreeRings ( const std::vector< int > & ring1,
const std::vector< int > & ring2,
const std::vector< int > & ring3 )

Common elements in 3 rings.

◆ compareRings()

bool ring::compareRings ( std::vector< int > ring1,
std::vector< int > ring2 )

Compares two disordered vectors and checks to see if they contain the same elements

◆ conditionOneDDC() [1/2]

bool ring::conditionOneDDC ( const std::vector< std::vector< int > > & rings,
std::vector< int > & peripheralRings,
int iring )

First condition for the DDC: There must be at least 3 other rings in which each element of the equatorial ring is present

◆ conditionOneDDC() [2/2]

bool ring::conditionOneDDC ( const std::vector< std::vector< int > > & rings,
std::vector< int > & peripheralRings,
int iring,
const RingSearchIndex & index )

As conditionOneDDC, reusing an index the caller has already built.

◆ contractibleRings() [1/2]

std::vector< std::vector< int > > ring::contractibleRings ( const std::vector< std::vector< int > > & rings,
const molSys::PointCloud< molSys::Point< double >, double > & yCloud )
nodiscard

The rings of rings whose minimum-image bonds have integer lattice images summing to zero. Any other ring winds through the periodic cell and bounds no face. A cell narrower than a ring's span has such rings. Without a box every ring is kept

◆ contractibleRings() [2/2]

std::vector< std::vector< int > > ring::contractibleRings ( std::vector< std::vector< int > > && rings,
const molSys::PointCloud< molSys::Point< double >, double > & yCloud )
nodiscard

Same rings, compacted in place, so a kept ring is moved and not copied.

◆ deformedPrismTypes()

int ring::deformedPrismTypes ( const std::vector< ring::strucType > & atomState,
std::vector< int > & atomTypes,
int maxDepth )
nodiscard

Get the atom type values for deformed prisms.

◆ discardExtraTetragonBlocks()

bool ring::discardExtraTetragonBlocks ( std::vector< int > & basal1,
std::vector< int > & basal2,
molSys::PointCloud< molSys::Point< double >, double > & yCloud )

Checks whether two 4-membered rings are parallel in one dimension or not to prevent overcounting

◆ equatorChoiceOverflow()

int ring::equatorChoiceOverflow ( const struct EquatorChoice * self,
int at )

Peripheral rings of one equatorial candidate. n == 0 when the ring is not a candidate. The first six sit inline. A defect that names more conflicts stores the rest beside the row, so a crystal of candidates stays a plain block of integers.

◆ equatorChoiceOverflowPut()

void ring::equatorChoiceOverflowPut ( struct EquatorChoice * self,
int at,
int value )

◆ equatorialConditions()

bool ring::equatorialConditions ( const std::vector< std::vector< int > > & rings,
int iring,
const RingSearchIndex & index,
std::vector< int > * peripheralUnion,
std::vector< int > * chosen = nullptr,
const std::vector< int > * rank = nullptr,
EquatorChoice * raw = nullptr )

Equatorial test of a DDC. Holds when every atom of ring iring lies in at least three other rings and, for some starting atom and direction of iring, six distinct rings P_k through its consecutive triplets satisfy the even/odd common-atom and alternate-pair conditions. When peripheralUnion is given it receives every ring that serves as a P_k in some valid assignment, sorted. When chosen and rank are given, chosen receives the six rings of the valid assignment whose ranks, sorted, are lexicographically least, in ascending rank.

◆ findDDC() [1/2]

std::vector< int > ring::findDDC ( const std::vector< std::vector< int > > & rings,
std::vector< strucType > & ringType,
const std::vector< int > & listHC,
std::vector< cage::Cage > & cageList )

Find out which hexagonal rings are DDC (Double Diamond Cages) rings. Returns a vector containing all the ring IDs which are DDC rings

◆ findDDC() [2/2]

std::vector< int > ring::findDDC ( const std::vector< std::vector< int > > & rings,
std::vector< strucType > & ringType,
const std::vector< int > & listHC,
std::vector< cage::Cage > & cageList,
const RingSearchIndex & index,
PackingCertificate * certificate = nullptr )

As findDDC, reusing an index the caller has already built. When certificate is given it receives the matching or search bound.

◆ findHC() [1/2]

std::vector< int > ring::findHC ( const std::vector< std::vector< int > > & rings,
std::vector< strucType > & ringType,
const std::vector< std::vector< int > > & nList,
std::vector< cage::Cage > & cageList )

Find out which hexagonal rings are HC rings. Returns a vector containing all the ring IDs which are HC rings

◆ findHC() [2/2]

std::vector< int > ring::findHC ( const std::vector< std::vector< int > > & rings,
std::vector< strucType > & ringType,
const std::vector< std::vector< int > > & nList,
std::vector< cage::Cage > & cageList,
const RingSearchIndex & index )

As findHC, reusing an index the caller has already built.

◆ findMixedRings()

std::vector< int > ring::findMixedRings ( const std::vector< std::vector< int > > & rings,
std::vector< strucType > & ringType,
std::vector< int > & listDDC,
std::vector< int > & listHC )

Find out which hexagonal rings are both DDCs (Double Diamond Cages) and HCs (Hexagonal Cages). Returns a vector containing all the ring IDs which are of this type

◆ findPrismatic() [1/2]

int ring::findPrismatic ( const std::vector< std::vector< int > > & rings,
std::vector< int > & listHC,
std::vector< strucType > & ringType,
int iring,
int jring,
std::vector< int > & prismaticRings )
nodiscard

Finds the prismatic rings from basal rings iring and jring.

◆ findPrismatic() [2/2]

int ring::findPrismatic ( const std::vector< std::vector< int > > & rings,
std::vector< int > & listHC,
std::vector< strucType > & ringType,
int iring,
int jring,
std::vector< int > & prismaticRings,
const RingSearchIndex & index )
nodiscard

As findPrismatic, drawing candidate rings from the inverted index.

◆ findPrisms()

std::vector< int > ring::findPrisms ( const std::vector< std::vector< int > > & rings,
std::vector< strucType > & ringType,
int & nPerfectPrisms,
int & nImperfectPrisms,
const std::vector< std::vector< int > > & nList,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
std::vector< double > & rmsdPerAtom,
bool doShapeMatching = false )

Find out which rings are prisms. Returns a vector containing all the ring IDs which are prisms

◆ findsCommonElements()

std::vector< int > ring::findsCommonElements ( const std::vector< int > & ring1,
const std::vector< int > & ring2 )

Returns the common elements of two rings.

◆ findTripletInRing()

bool ring::findTripletInRing ( const std::vector< int > & ring,
const std::vector< int > & triplet )

Searches a particular ring for a triplet.

◆ getAtomTypesTopoBulk()

int ring::getAtomTypesTopoBulk ( const std::vector< std::vector< int > > & rings,
const std::vector< ring::strucType > & ringType,
std::vector< cage::iceType > & atomTypes )
nodiscard

Assigns a type of enum class iceType, to every atom, using information from ringType, which has the information of every ring

◆ getEdgeMoleculesInRings()

void ring::getEdgeMoleculesInRings ( const std::vector< std::vector< int > > & rings,
molSys::PointCloud< molSys::Point< double >, double > & oCloud,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
std::array< double, 3 > coordLow,
std::array< double, 3 > coordHigh,
bool identicalCloud = false )

Select edge molecules and atoms which are part of rings, such that rings formed with even one atom in the slice will be included in the selection Modifies the inSlice bool of a given PointCloud (this may be the same) as the given oxygen atom PointCloud which was used to construct the neighbour list used to construct the rings vector of vectors. We assume that the PointCloud structs have the inSlice bool values set according to the presence of the atom in the slice (this can be done using the gen::moleculesInSingleSlice function.

◆ getSingleRingSize()

std::vector< std::vector< int > > ring::getSingleRingSize ( const std::vector< std::vector< int > > & rings,
int ringSize )

Returns a vector of vectors of rings of a single size.

◆ getStrucNumbers()

int ring::getStrucNumbers ( const std::vector< ring::strucType > & ringType,
const std::vector< cage::Cage > & cageList,
int & numHC,
int & numDDC,
int & mixedRings,
int & prismaticRings,
int & basalRings )
nodiscard

Determines the number of HCs, DDCs, Mixed rings, prismatic and basal rings.

◆ hasCommonElements()

bool ring::hasCommonElements ( const std::vector< int > & ring1,
const std::vector< int > & ring2 )

Check to see if two vectors have common elements or not True, if common elements are present and false if there are no common elements

◆ keepAxialRingsOnly()

std::vector< std::vector< int > > ring::keepAxialRingsOnly ( const std::vector< std::vector< int > > & rings,
molSys::PointCloud< molSys::Point< double >, double > & yCloud )

Saves only axial rings out of all possible rings.

◆ lastDdcSplit()

DdcSplit ring::lastDdcSplit ( )
nodiscard

Order, equatorial test and packing from the last findDDC call.

◆ lastPackParts()

PackParts ring::lastPackParts ( )
nodiscard

Conflict build, clique ids, matching and branch-and-bound from the last pack.

◆ maximumEquators()

std::vector< int > ring::maximumEquators ( const std::vector< EquatorChoice > & periph,
const std::vector< int > & order,
PackingCertificate * certificate )
nodiscard

Maximum set of mutually non-conflicting equatorial rings. periph[i].n is 0 when ring i is not a candidate. The returned ids are a maximum packing; certificate is filled when non-null.

◆ notNeighboursOfRing()

bool ring::notNeighboursOfRing ( const std::vector< std::vector< int > > & nList,
std::vector< int > & triplet,
const std::vector< int > & ring )

Tests to check that elements of a triplet are not neighbours of a ring (vector) passed

◆ polygonRingAnalysis()

int ring::polygonRingAnalysis ( std::string path,
std::vector< std::vector< int > > rings,
std::vector< std::vector< int > > nList,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int maxDepth,
double sheetArea,
int firstFrame )
nodiscard

Find out which rings are prisms, looping through all ring sizes upto the maxDepth The input ringsAllSizes array has rings of every size.

◆ positionRank()

std::vector< int > ring::positionRank ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud)
nodiscard

Rank of every atom of yCloud when the atoms are sorted by position wrapped into the box, compared by x, then y, then z. Throws std::invalid_argument when two atoms share a wrapped position

◆ printSliceGetEdgeMoleculesInRings()

void ring::printSliceGetEdgeMoleculesInRings ( std::string path,
const std::vector< std::vector< int > > & rings,
molSys::PointCloud< molSys::Point< double >, double > & oCloud,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
std::array< double, 3 > coordLow,
std::array< double, 3 > coordHigh,
bool identicalCloud = false )

Master function for selecting edge molecules and atoms which are part of rings, such that rings formed with even one atom in the slice will be included in the selection Modifies the inSlice bool of a given PointCloud (this may be the same) as the given oxygen atom PointCloud which was used to construct the neighbour list used to construct the rings vector of vectors (calls ring::getEdgeMoleculesInRings) Prints out molecule IDs individually of molecules in the slice, and also prints out a LAMMPS data file of just the molecules and atoms in the slice

◆ prismAnalysis()

int ring::prismAnalysis ( std::string path,
const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & nList,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int maxDepth,
int & atomID,
int firstFrame,
int currentFrame,
bool doShapeMatching = false )
nodiscard

Find out which rings are prisms, looping through all ring sizes upto the maxDepth The input ringsAllSizes array has rings of every size.

◆ relaxedPrismConditions()

bool ring::relaxedPrismConditions ( const std::vector< std::vector< int > > & nList,
std::vector< int > & basal1,
std::vector< int > & basal2 )

Reduced criterion: Two candidate basal rings of a prism block should have at least one bond between them

◆ releaseEquatorOverflow()

void ring::releaseEquatorOverflow ( )

◆ ringAdjacentCompletion()

SeededAtomLabels ring::ringAdjacentCompletion ( const SeededAtomLabels & labels,
const std::vector< std::vector< int > > & permissiveRings )
nodiscard

Ring completion of seeded labels.

A permissive six-ring whose vertices all carry a cage label but one is a cage ring with a vacancy. The last vertex takes that label. The walk repeats until a fixed point. HC and DDC complete on separate flag vectors.

A liquid ring that only touches a nucleus has at most a few labeled vertices, so the all-but-one rule cannot walk into the liquid. An empty seed stays empty: no ring then has five labeled vertices.

The result is the least fixed point above the seed. Visiting order does not change the labeled set. lean/DseamsProofs/Completion.lean states that claim. Catch2 covers the C++ identity on a crystal, the refill of a single vacancy, and the structural zero.

Parameters
[in]labelsSeeded per-atom flags.
[in]permissiveRingsSix-membered rings of the permissive graph.

◆ rmAxialTranslations()

int ring::rmAxialTranslations ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int & atomID,
int firstFrame,
int currentFrame )
nodiscard

Shift the entire ice nanotube and remove axial translations.

◆ seededCageAffiliation() [1/2]

SeededAtomLabels ring::seededCageAffiliation ( const std::vector< std::vector< int > > & strictRings,
const CageAffiliation & strictAffiliation,
const std::vector< std::vector< int > > & permissiveRings,
const CageAffiliation & permissiveAffiliation,
const std::vector< std::vector< int > > & permissiveNList,
bool ringAdjacentCompletion = false )
nodiscard

The same labels from the affiliation of each graph's six-rings, computed by the caller.

A frame walk passes AffiliationUpdater results here, so both graphs carry their per-ring answers across frames.

Parameters
[in]strictRingsSix-membered rings of the strict graph.
[in]strictAffiliationcageAffiliation of strictRings.
[in]permissiveRingsSix-membered rings of the permissive graph.
[in]permissiveAffiliationcageAffiliation of permissiveRings.
[in]permissiveNListPermissive graph, by index with leading self entries.
[in]ringAdjacentCompletionAs in the overload above.

◆ seededCageAffiliation() [2/2]

SeededAtomLabels ring::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 )
nodiscard

Seeded affiliation over two graphs on the same atoms: the strict graph (typically the mutual k-nearest bonds) supplies seeds, the permissive supergraph (typically the union bonds) supplies completions, and a permissively affiliated atom is accepted only when its bonded component of affiliated atoms contains a seed.

Specificity on structureless input is structural rather than statistical: when the strict pass affiliates nothing, nothing is accepted regardless of what the permissive graph builds. Where both graphs label an atom, the strict labels win.

The fifth argument is the ring-adjacent completion flag. The default is false. When the flag is true the accepted labels pass through ringAdjacentCompletion() on the permissive six-rings. HC and DDC complete on separate flag vectors. seams cages –complete sets the flag. tests/walk_compare leaves the flag false.

Parameters
[in]strictRingsSix-membered rings of the strict graph.
[in]strictNListStrict graph, by index with leading self entries.
[in]permissiveRingsSix-membered rings of the permissive graph.
[in]permissiveNListPermissive graph, same conventions.
[in]ringAdjacentCompletionWhen true, call ringAdjacentCompletion() on the accepted labels. Default false.

◆ stackingPlanes()

StackingPlanes ring::stackingPlanes ( const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & nList )
nodiscard

◆ topoBulkAnalysis()

int ring::topoBulkAnalysis ( std::string path,
const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & nList,
molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int firstFrame,
bool onlyTetrahedral = true )
nodiscard

Find out which rings are DDCs or HCs, which are comprised of 6-membered primitive rings. Start with a neighbour list (by index) and a vector of vectors of rings (also by index). TODO: try 'square' ice and ice0