Loading...
Searching...
No Matches
Ring

Namespaces

namespace  tum3
namespace  ring
 Topological network criteria functions.

Enumerations

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

Functions

int tum3::topoUnitMatchingBulk (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 printClusters, bool onlyTetrahedral, std::string templatePath="templates")
Eigen::MatrixXd tum3::buildRefHC (const std::string &fileName)
 Build a reference Hexagonal cage, reading in from a template XYZ file.
Eigen::MatrixXd tum3::buildRefDDC (const std::string &fileName)
 Build a reference Double-Diamond cage, reading in from a template XYZ file.
int tum3::shapeMatchHC (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const Eigen::MatrixXd &refPoints, cage::Cage cageUnit, const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &nList, std::vector< double > &quat, double &rmsd)
 Shape-matching for a target HC.
int tum3::shapeMatchDDC (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const Eigen::MatrixXd &refPoints, const std::vector< cage::Cage > &cageList, int cageIndex, const std::vector< std::vector< int > > &rings, std::vector< double > &quat, double &rmsd)
 Shape-matching for a target DDC.
int tum3::updateRMSDatom (const std::vector< std::vector< int > > &rings, cage::Cage cageUnit, double rmsd, std::vector< double > &rmsdPerAtom, std::vector< int > &noOfCommonAtoms, const std::vector< cage::iceType > &atomTypes)
int tum3::averageRMSDatom (std::vector< double > &rmsdPerAtom, std::vector< int > &noOfCommonAtoms)
 Average the RMSD per atom.
std::vector< cage::Cagetum3::topoBulkCriteria (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, int &numHC, int &numDDC, std::vector< ring::strucType > &ringType)
int tum3::clusterCages (molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::string path, const std::vector< std::vector< int > > &rings, const std::vector< cage::Cage > &cageList, int numHC, int numDDC)
std::vector< int > tum3::atomsFromCages (const std::vector< std::vector< int > > &rings, const std::vector< cage::Cage > &cageList, const std::vector< int > &clusterCages)
 Gets the atoms in the cages of a given cluster.
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.
bool ring::hasCommonElements (std::vector< int > ring1, std::vector< int > ring2)
bool ring::compareRings (std::vector< int > ring1, std::vector< int > ring2)
bool ring::findTripletInRing (const std::vector< int > &ring, const std::vector< int > &triplet)
 Searches a particular ring for a triplet.
bool ring::commonElementsInThreeRings (const std::vector< int > &ring1, const std::vector< int > &ring2, const std::vector< int > &ring3)
 Common elements in 3 rings.
std::vector< int > ring::findsCommonElements (const std::vector< int > &ring1, const std::vector< int > &ring2)
 Returns the common elements of two rings.
int ring::clearRingList (std::vector< std::vector< int > > &rings)
 Erases memory for a vector of vectors for a list of rings.
int ring::assignPolygonType (const std::vector< std::vector< int > > &rings, std::vector< int > &atomTypes, const std::vector< int > &nRings)
molSys::PointCloud< molSys::Point< double >, double > gen::getPointCloudOneAtomType (molSys::PointCloud< molSys::Point< double >, double > &yCloud, molSys::PointCloud< molSys::Point< double >, double > &outCloud, int atomTypeI, bool isSlice=false, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
void gen::moleculesInSingleSlice (molSys::PointCloud< molSys::Point< double >, double > &yCloud, bool clearPreviousSliceSelection=true, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
void gen::atomsInSingleSlice (molSys::PointCloud< molSys::Point< double >, double > &yCloud, bool clearPreviousSliceSelection=true, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
void gen::setAtomsWithSameMolID (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::unordered_multimap< int, int > &molIDAtomIDmap, int molID, bool inSliceValue=true)
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)
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)
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)
bool ring::basalPrismConditions (const std::vector< std::vector< int > > &nList, std::vector< int > &basal1, std::vector< int > &basal2)
bool ring::relaxedPrismConditions (const std::vector< std::vector< int > > &nList, std::vector< int > &basal1, std::vector< int > &basal2)
bool ring::discardExtraTetragonBlocks (std::vector< int > &basal1, std::vector< int > &basal2, molSys::PointCloud< molSys::Point< double >, double > &yCloud)
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.
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)
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)
int ring::deformedPrismTypes (const std::vector< ring::strucType > &atomState, std::vector< int > &atomTypes, int maxDepth)
 Get the atom type values for deformed prisms.
int ring::rmAxialTranslations (molSys::PointCloud< molSys::Point< double >, double > &yCloud, int &atomID, int firstFrame, int currentFrame)
 Shift the entire ice nanotube and remove axial translations.
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)

Detailed Description

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

◆ atomsFromCages()

std::vector< int > tum3::atomsFromCages ( const std::vector< std::vector< int > > & rings,
const std::vector< cage::Cage > & cageList,
const std::vector< int > & clusterCages )

Gets the atoms in the cages of a given cluster.

◆ atomsInSingleSlice()

void gen::atomsInSingleSlice ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
bool clearPreviousSliceSelection = true,
std::array< double, 3 > coordLow = std::array< double, 3 >{0, 0, 0},
std::array< double, 3 > coordHigh = std::array< double, 3 >{0, 0, 0} )

Given a pointCloud set the inSlice bool for every atom, if the atoms are inside the specified (single) region. Does not handle atoms in molecules straddling the boundary

◆ averageRMSDatom()

int tum3::averageRMSDatom ( std::vector< double > & rmsdPerAtom,
std::vector< int > & noOfCommonAtoms )
nodiscard

Average the RMSD per atom.

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

◆ buildRefDDC()

Eigen::MatrixXd tum3::buildRefDDC ( const std::string & fileName)

Build a reference Double-Diamond cage, reading in from a template XYZ file.

◆ buildRefHC()

Eigen::MatrixXd tum3::buildRefHC ( const std::string & fileName)

Build a reference Hexagonal cage, reading in from a template XYZ file.

◆ clearRingList()

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

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

◆ clusterCages()

int tum3::clusterCages ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
std::string path,
const std::vector< std::vector< int > > & rings,
const std::vector< cage::Cage > & cageList,
int numHC,
int numDDC )
nodiscard

Clustering Clusters cages using the Stillinger algorithm and prints out individual XYZ files of clusters.

◆ 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

◆ 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

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

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

◆ getPointCloudOneAtomType()

molSys::PointCloud< molSys::Point< double >, double > gen::getPointCloudOneAtomType ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
molSys::PointCloud< molSys::Point< double >, double > & outCloud,
int atomTypeI,
bool isSlice = false,
std::array< double, 3 > coordLow = std::array< double, 3 >{0, 0, 0},
std::array< double, 3 > coordHigh = std::array< double, 3 >{0, 0, 0} )

Given a pointCloud containing certain atom types, this returns a pointCloud containing atoms of only the desired type

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

◆ hasCommonElements()

bool ring::hasCommonElements ( std::vector< int > ring1,
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.

◆ moleculesInSingleSlice()

void gen::moleculesInSingleSlice ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
bool clearPreviousSliceSelection = true,
std::array< double, 3 > coordLow = std::array< double, 3 >{0, 0, 0},
std::array< double, 3 > coordHigh = std::array< double, 3 >{0, 0, 0} )

Given a pointCloud set the inSlice bool for every atom, if the molecules are inside the specified (single) region. If even one atom of a molecule is inside the region, then all atoms of that molecule will be inside the region (irrespective of type)

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

◆ 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

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

◆ setAtomsWithSameMolID()

void gen::setAtomsWithSameMolID ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::unordered_multimap< int, int > & molIDAtomIDmap,
int molID,
bool inSliceValue = true )

Given a particular molecule ID and a pointCloud set the inSlice bool for all atoms, with that molecule ID

◆ shapeMatchDDC()

int tum3::shapeMatchDDC ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const Eigen::MatrixXd & refPoints,
const std::vector< cage::Cage > & cageList,
int cageIndex,
const std::vector< std::vector< int > > & rings,
std::vector< double > & quat,
double & rmsd )
nodiscard

Shape-matching for a target DDC.

◆ shapeMatchHC()

int tum3::shapeMatchHC ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const Eigen::MatrixXd & refPoints,
cage::Cage cageUnit,
const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & nList,
std::vector< double > & quat,
double & rmsd )
nodiscard

Shape-matching for a target HC.

◆ topoBulkCriteria()

std::vector< cage::Cage > tum3::topoBulkCriteria ( 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,
int & numHC,
int & numDDC,
std::vector< ring::strucType > & ringType )

Topological network methods Finds the HCs and DDCs for the system

◆ topoUnitMatchingBulk()

int tum3::topoUnitMatchingBulk ( 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 printClusters,
bool onlyTetrahedral,
std::string templatePath = "templates" )
nodiscard

Topological unit matching for bulk water. If printClusters is true, individual clusters of connected cages are printed.

◆ updateRMSDatom()

int tum3::updateRMSDatom ( const std::vector< std::vector< int > > & rings,
cage::Cage cageUnit,
double rmsd,
std::vector< double > & rmsdPerAtom,
std::vector< int > & noOfCommonAtoms,
const std::vector< cage::iceType > & atomTypes )
nodiscard

Calulate the RMSD for each ring, using RMSD values (rmsd) obtained from the shape-matching of each cage