namespace ring

Overview

Topological network criteria functions. More…

namespace ring {
 
// structs
 
struct CageAffiliation;
struct RingSearchIndex;
struct SeededAtomLabels;
 
// classes
 
class AffiliationUpdater;
 
// global functions
 
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);
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);
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);
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);
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);
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);
bool conditionTwoDDC(const std::vector<std::vector<int>>& rings, std::vector<int>& peripheralRings, int iring);
bool conditionTwoDDC(const std::vector<std::vector<int>>& rings, std::vector<int>& peripheralRings, int iring, const RingSearchIndex& index);
bool conditionThreeDDC(const std::vector<std::vector<int>>& rings, std::vector<int>& peripheralRings);
bool basalConditions(const std::vector<std::vector<int>>& nList, const std::vector<int>& basal1, const std::vector<int>& basal2);
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);
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);
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);
 
} // namespace ring

Detailed Documentation

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

Global Functions

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

Batch computation of the affiliation predicates for six-membered rings.

nList is by index with the leading self entry, as neighbourListByIndex produces.

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)

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.

Parameters:

strictRings

Six-membered rings of the strict graph.

strictNList

Strict graph, by index with leading self entries.

permissiveRings

Six-membered rings of the permissive graph.

permissiveNList

Permissive graph, same conventions.

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)

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

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)

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

RingSearchIndex buildRingSearchIndex(const std::vector<std::vector<int>>& rings, int numAtoms)

Builds the inverted atom-to-rings index used by the cage searches.

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)

Find out which hexagonal rings are DDC (Double Diamond Cages) rings.

Returns a vector containing all the ring IDs which are DDC rings

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)

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

std::vector<int> 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

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)

Find out which hexagonal rings are HC rings.

Returns a vector containing all the ring IDs which are HC rings

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)

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

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 conditionTwoDDC(const std::vector<std::vector<int>>& rings, std::vector<int>& peripheralRings, int iring)

Second condition for the DDC: There must be at least 1 other ring for every triplet in the equatorial ring.

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

As conditionTwoDDC, answering each triplet from the inverted index.

bool conditionThreeDDC(const std::vector<std::vector<int>>& rings, std::vector<int>& peripheralRings)

Third condition for the DDC: Even (by vector index) numbered index triplets and odd triplets must have at least one element in common.

bool 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)

bool 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.

bool 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.

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)

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

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.