.. index:: pair: namespace; ring .. _doxid-namespacering: namespace ring ============== .. toctree:: :hidden: struct_ring_CageAffiliation.rst struct_ring_RingSearchIndex.rst struct_ring_SeededAtomLabels.rst class_ring_AffiliationUpdater.rst Overview ~~~~~~~~ Topological network criteria functions. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace ring { // structs struct :ref:`CageAffiliation`; struct :ref:`RingSearchIndex`; struct :ref:`SeededAtomLabels`; // classes class :ref:`AffiliationUpdater`; // global functions :ref:`CageAffiliation` :ref:`cageAffiliation`(const std::vector>& rings, const std::vector>& nList); :ref:`SeededAtomLabels` :ref:`seededCageAffiliation`(const std::vector>& strictRings, const std::vector>& strictNList, const std::vector>& permissiveRings, const std::vector>& permissiveNList); int :ref:`bulkPolygonRingAnalysis`(std::string path, const std::vector>& rings, const std::vector>& nList, :ref:`molSys::PointCloud`<:ref:`molSys::Point`, double>& yCloud, int maxDepth, int firstFrame); int :ref:`topoBulkAnalysis`(std::string path, const std::vector>& rings, const std::vector>& nList, :ref:`molSys::PointCloud`<:ref:`molSys::Point`, double>& yCloud, int firstFrame, bool onlyTetrahedral = true); :ref:`RingSearchIndex` :ref:`buildRingSearchIndex`(const std::vector>& rings, int numAtoms); std::vector :ref:`findDDC`(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector& listHC, std::vector<:ref:`cage::Cage`>& cageList); std::vector :ref:`findDDC`(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector& listHC, std::vector<:ref:`cage::Cage`>& cageList, const :ref:`RingSearchIndex`& index); std::vector :ref:`findMixedRings`(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, std::vector& listDDC, std::vector& listHC); std::vector :ref:`findHC`(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector>& nList, std::vector<:ref:`cage::Cage`>& cageList); std::vector :ref:`findHC`(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector>& nList, std::vector<:ref:`cage::Cage`>& cageList, const :ref:`RingSearchIndex`& index); bool :ref:`conditionOneDDC`(const std::vector>& rings, std::vector& peripheralRings, int iring); bool :ref:`conditionOneDDC`(const std::vector>& rings, std::vector& peripheralRings, int iring, const :ref:`RingSearchIndex`& index); bool :ref:`conditionTwoDDC`(const std::vector>& rings, std::vector& peripheralRings, int iring); bool :ref:`conditionTwoDDC`(const std::vector>& rings, std::vector& peripheralRings, int iring, const :ref:`RingSearchIndex`& index); bool :ref:`conditionThreeDDC`(const std::vector>& rings, std::vector& peripheralRings); bool :ref:`basalConditions`(const std::vector>& nList, const std::vector& basal1, const std::vector& basal2); bool :ref:`basalNeighbours`(const std::vector>& nList, std::vector& triplet, int atomOne, int atomTwo); bool :ref:`notNeighboursOfRing`(const std::vector>& nList, std::vector& triplet, const std::vector& ring); int :ref:`findPrismatic`(const std::vector>& rings, std::vector& listHC, std::vector<:ref:`strucType`>& ringType, int iring, int jring, std::vector& prismaticRings); int :ref:`findPrismatic`(const std::vector>& rings, std::vector& listHC, std::vector<:ref:`strucType`>& ringType, int iring, int jring, std::vector& prismaticRings, const :ref:`RingSearchIndex`& index); int :ref:`getAtomTypesTopoBulk`(const std::vector>& rings, const std::vector<:ref:`ring::strucType`>& ringType, std::vector<:ref:`cage::iceType`>& atomTypes); int :ref:`getStrucNumbers`(const std::vector<:ref:`ring::strucType`>& ringType, const std::vector<:ref:`cage::Cage`>& cageList, int& numHC, int& numDDC, int& mixedRings, int& prismaticRings, int& basalRings); } // namespace ring .. _details-namespacering: 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. .. _doxid-namespacering_1autotoc_md10_1s1: .. _doxid-namespacering_1autotoc_md10_1s2: .. _doxid-namespacering_1autotoc_md10: Changelog +++++++++ * Amrita Goswami [`amrita16thaug646@gmail.com `__]; date modified: Nov 13, 2019 * Rohit Goswami [`rog32@hi.is `__]; date modified: Mar 20, 2021 Global Functions ---------------- .. index:: pair: function; cageAffiliation .. _doxid-namespacering_1a6a455f7a0da97df613534671c9377a45: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`CageAffiliation` cageAffiliation(const std::vector>& rings, const std::vector>& nList) Batch computation of the affiliation predicates for six-membered rings. nList is by index with the leading self entry, as neighbourListByIndex produces. .. index:: pair: function; seededCageAffiliation .. _doxid-namespacering_1a995edc47f2d855d9b3d19b6aedfa640c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`SeededAtomLabels` seededCageAffiliation(const std::vector>& strictRings, const std::vector>& strictNList, const std::vector>& permissiveRings, const std::vector>& 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. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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. .. index:: pair: function; bulkPolygonRingAnalysis .. _doxid-namespacering_1a46bc67e817124b0e736c493bc8e4d6ee: .. ref-code-block:: cpp :class: doxyrest-title-code-block int bulkPolygonRingAnalysis(std::string path, const std::vector>& rings, const std::vector>& nList, :ref:`molSys::PointCloud`<:ref:`molSys::Point`, 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. .. index:: pair: function; topoBulkAnalysis .. _doxid-namespacering_1ada5f6a19834edc41365e7f85d92e4b76: .. ref-code-block:: cpp :class: doxyrest-title-code-block int topoBulkAnalysis(std::string path, const std::vector>& rings, const std::vector>& nList, :ref:`molSys::PointCloud`<:ref:`molSys::Point`, 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 .. index:: pair: function; buildRingSearchIndex .. _doxid-namespacering_1a2314146c9c30c45799ab5217b8b69e61: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`RingSearchIndex` buildRingSearchIndex(const std::vector>& rings, int numAtoms) Builds the inverted atom-to-rings index used by the cage searches. .. index:: pair: function; findDDC .. _doxid-namespacering_1a503bfa2deec404d907645e16ed236c28: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector findDDC(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector& listHC, std::vector<:ref:`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 .. index:: pair: function; findDDC .. _doxid-namespacering_1a13d4db1147bed179fe5c59afe3bb90f7: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector findDDC(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector& listHC, std::vector<:ref:`cage::Cage`>& cageList, const :ref:`RingSearchIndex`& index) As findDDC, reusing an index the caller has already built. .. index:: pair: function; findMixedRings .. _doxid-namespacering_1a5e65636a113b8a778541f437f00c0f97: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector findMixedRings(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, std::vector& listDDC, std::vector& 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 .. index:: pair: function; findHC .. _doxid-namespacering_1af2bab9ed638ed3e3a1ed3392d7e4a576: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector findHC(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector>& nList, std::vector<:ref:`cage::Cage`>& cageList) Find out which hexagonal rings are HC rings. Returns a vector containing all the ring IDs which are HC rings .. index:: pair: function; findHC .. _doxid-namespacering_1a1dfa48bf23ffaf39fee585ac7634231a: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector findHC(const std::vector>& rings, std::vector<:ref:`strucType`>& ringType, const std::vector>& nList, std::vector<:ref:`cage::Cage`>& cageList, const :ref:`RingSearchIndex`& index) As findHC, reusing an index the caller has already built. .. index:: pair: function; conditionOneDDC .. _doxid-namespacering_1a7cc755c188267af7b9ff9ae73ca77579: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool conditionOneDDC(const std::vector>& rings, std::vector& 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. .. index:: pair: function; conditionOneDDC .. _doxid-namespacering_1a75c45309352d085d18f89f370dd42ab2: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool conditionOneDDC(const std::vector>& rings, std::vector& peripheralRings, int iring, const :ref:`RingSearchIndex`& index) As conditionOneDDC, reusing an index the caller has already built. .. index:: pair: function; conditionTwoDDC .. _doxid-namespacering_1a5bc5928258e125e0d9e52314221974b9: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool conditionTwoDDC(const std::vector>& rings, std::vector& peripheralRings, int iring) Second condition for the DDC: There must be at least 1 other ring for every triplet in the equatorial ring. .. index:: pair: function; conditionTwoDDC .. _doxid-namespacering_1ac90a6cf68afb185f82a5b1d064a1f80f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool conditionTwoDDC(const std::vector>& rings, std::vector& peripheralRings, int iring, const :ref:`RingSearchIndex`& index) As conditionTwoDDC, answering each triplet from the inverted index. .. index:: pair: function; conditionThreeDDC .. _doxid-namespacering_1abf88eff5d04ebb4bfad69693edaaa432: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool conditionThreeDDC(const std::vector>& rings, std::vector& peripheralRings) Third condition for the DDC: Even (by vector index) numbered index triplets and odd triplets must have at least one element in common. .. index:: pair: function; basalConditions .. _doxid-namespacering_1a199fe38d3152cc04d18109ddb868ab34: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool basalConditions(const std::vector>& nList, const std::vector& basal1, const std::vector& basal2) Tests whether two rings are basal rings (true) or not (false) .. index:: pair: function; basalNeighbours .. _doxid-namespacering_1a350f1fa3c3d5807fb720444054d6e340: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool basalNeighbours(const std::vector>& nList, std::vector& triplet, int atomOne, int atomTwo) Tests whether the last two elements of a triplet are neighbours of two atom IDs passed in. .. index:: pair: function; notNeighboursOfRing .. _doxid-namespacering_1a5db4898b22ebb13511cc37fae6674e5c: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool notNeighboursOfRing(const std::vector>& nList, std::vector& triplet, const std::vector& ring) Tests to check that elements of a triplet are not neighbours of a ring (vector) passed. .. index:: pair: function; findPrismatic .. _doxid-namespacering_1a56c3c2a30736d27d9eaf3e3759e630e9: .. ref-code-block:: cpp :class: doxyrest-title-code-block int findPrismatic(const std::vector>& rings, std::vector& listHC, std::vector<:ref:`strucType`>& ringType, int iring, int jring, std::vector& prismaticRings) Finds the prismatic rings from basal rings iring and jring. .. index:: pair: function; findPrismatic .. _doxid-namespacering_1aaf26a6612dd314b36db80820289ab68b: .. ref-code-block:: cpp :class: doxyrest-title-code-block int findPrismatic(const std::vector>& rings, std::vector& listHC, std::vector<:ref:`strucType`>& ringType, int iring, int jring, std::vector& prismaticRings, const :ref:`RingSearchIndex`& index) As findPrismatic, drawing candidate rings from the inverted index. .. index:: pair: function; getAtomTypesTopoBulk .. _doxid-namespacering_1a45c216fc97f12e29f117bbc1f6d3c7f3: .. ref-code-block:: cpp :class: doxyrest-title-code-block int getAtomTypesTopoBulk(const std::vector>& rings, const std::vector<:ref:`ring::strucType`>& ringType, std::vector<:ref:`cage::iceType`>& atomTypes) Assigns a type of enum class iceType, to every atom, using information from ringType, which has the information of every ring. .. index:: pair: function; getStrucNumbers .. _doxid-namespacering_1aac3a6fdc27f05a7ded468e955983f270: .. ref-code-block:: cpp :class: doxyrest-title-code-block int getStrucNumbers(const std::vector<:ref:`ring::strucType`>& ringType, const std::vector<:ref:`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.