Modules | |
Prism3 | |
Enumerations | |
enum | ring::strucType { ring::unclassified , ring::DDC , ring::HCbasal , ring::HCprismatic , ring::bothBasal , ring::bothPrismatic , ring::Prism , ring::deformedPrism , ring::mixedPrismRing } |
Functions | |
int | tum3::topoUnitMatchingBulk (std::string path, std::vector< std::vector< int >> rings, std::vector< std::vector< int >> nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int firstFrame, bool printClusters, bool onlyTetrahedral) |
Eigen::MatrixXd | tum3::buildRefHC (std::string fileName) |
Build a reference Hexagonal cage, reading in from a template XYZ file. More... | |
Eigen::MatrixXd | tum3::buildRefDDC (std::string fileName) |
Build a reference Double-Diamond cage, reading in from a template XYZ file. More... | |
int | tum3::shapeMatchHC (molSys::PointCloud< molSys::Point< double >, double > *yCloud, const Eigen::MatrixXd &refPoints, cage::Cage cageUnit, std::vector< std::vector< int >> rings, std::vector< std::vector< int >> nList, std::vector< double > *quat, double *rmsd) |
Shape-matching for a target HC. More... | |
int | tum3::shapeMatchDDC (molSys::PointCloud< molSys::Point< double >, double > *yCloud, const Eigen::MatrixXd &refPoints, std::vector< cage::Cage > cageList, int cageIndex, std::vector< std::vector< int >> rings, std::vector< double > *quat, double *rmsd) |
Shape-matching for a target DDC. More... | |
int | tum3::updateRMSDatom (std::vector< std::vector< int >> rings, cage::Cage cageUnit, double rmsd, std::vector< double > *rmsdPerAtom, std::vector< int > *noOfCommonAtoms, std::vector< cage::iceType > atomTypes) |
int | tum3::averageRMSDatom (std::vector< double > *rmsdPerAtom, std::vector< int > *noOfCommonAtoms) |
Average the RMSD per atom. More... | |
std::vector< cage::Cage > | tum3::topoBulkCriteria (std::string path, std::vector< std::vector< int >> rings, 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, std::vector< std::vector< int >> rings, std::vector< cage::Cage > cageList, int numHC, int numDDC) |
std::vector< int > | tum3::atomsFromCages (std::vector< std::vector< int >> rings, std::vector< cage::Cage > cageList, std::vector< int > clusterCages) |
Gets the atoms in the cages of a given cluster. More... | |
std::vector< std::vector< int > > | ring::getSingleRingSize (std::vector< std::vector< int >> rings, int ringSize) |
Returns a vector of vectors of rings of a single size. More... | |
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 (std::vector< int > ring, std::vector< int > triplet) |
Searches a particular ring for a triplet. More... | |
bool | ring::commonElementsInThreeRings (std::vector< int > ring1, std::vector< int > ring2, std::vector< int > ring3) |
Common elements in 3 rings. More... | |
std::vector< int > | ring::findsCommonElements (std::vector< int > ring1, std::vector< int > ring2) |
Returns the common elements of two rings. More... | |
int | ring::clearRingList (std::vector< std::vector< int >> &rings) |
Erases memory for a vector of vectors for a list of rings. More... | |
std::vector< int > | ring::findPrisms (std::vector< std::vector< int >> rings, std::vector< strucType > *ringType, int *nPerfectPrisms, int *nImperfectPrisms, std::vector< std::vector< int >> nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > *rmsdPerAtom, bool doShapeMatching=false) |
bool | ring::basalPrismConditions (std::vector< std::vector< int >> nList, std::vector< int > *basal1, std::vector< int > *basal2) |
bool | ring::relaxedPrismConditions (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 (std::vector< std::vector< int >> rings, molSys::PointCloud< molSys::Point< double >, double > *yCloud) |
Saves only axial rings out of all possible rings. More... | |
int | ring::prismAnalysis (std::string path, std::vector< std::vector< int >> rings, 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 (std::vector< std::vector< int >> rings, std::vector< int > listPrism, int ringSize, std::vector< ring::strucType > ringType, std::vector< int > *atomTypes, std::vector< ring::strucType > *atomState) |
int | ring::deformedPrismTypes (std::vector< ring::strucType > atomState, std::vector< int > *atomTypes, int maxDepth) |
Get the atom type values for deformed prisms. More... | |
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. More... | |
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) |
int | ring::assignPolygonType (std::vector< std::vector< int >> rings, std::vector< int > *atomTypes, std::vector< int > nRings) |
enum ring::strucType |
Definition at line 112 of file ring.hpp.
int ring::assignPolygonType | ( | std::vector< std::vector< int >> | rings, |
std::vector< int > * | atomTypes, | ||
std::vector< int > | nRings | ||
) |
Assign an atomType (equal to the number of nodes in the ring) given n-membered rings.
Assign an atomType (equal to the number of nodes in the ring) given the rings vector.
[in] | rings | The vector of vectors containing the primitive rings, of a particular ring size. |
[in,out] | atomTypes | A vector which contains a type for each atom, depending on it's type as classified by the prism identification scheme. |
[in] | nRings | Number of rings. |
Definition at line 125 of file topo_two_dim.cpp.
int ring::assignPrismType | ( | std::vector< std::vector< int >> | rings, |
std::vector< int > | listPrism, | ||
int | ringSize, | ||
std::vector< ring::strucType > | ringType, | ||
std::vector< int > * | atomTypes, | ||
std::vector< ring::strucType > * | atomState | ||
) |
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
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. Note that the ring indices in the listPrism vector correspond to the indices in the input rings vector of vectors.
[in] | rings | The vector of vectors containing the primitive rings, of a particular ring size. |
[in] | listPrism | The list of prism blocks found. |
[in] | ringSize | The current ring size or number of nodes in each ring. |
[in,out] | atomTypes | A vector which contains a type for each atom, depending on it's type as classified by the prism identification scheme. |
Definition at line 692 of file topo_one_dim.cpp.
std::vector< int > tum3::atomsFromCages | ( | std::vector< std::vector< int >> | rings, |
std::vector< cage::Cage > | cageList, | ||
std::vector< int > | clusterCages | ||
) |
Gets the atoms in the cages of a given cluster.
Returns a vector containing the atom indices of all the atoms in a cluster of cages, according to the input cageList vector of Cages
Definition at line 797 of file bulkTUM.cpp.
int tum3::averageRMSDatom | ( | std::vector< double > * | rmsdPerAtom, |
std::vector< int > * | noOfCommonAtoms | ||
) |
Average the RMSD per atom.
Average the RMSD per atom, by the number of common elements
Definition at line 525 of file bulkTUM.cpp.
bool ring::basalPrismConditions | ( | 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)
A function that checks to see if two basal rings are basal rings of a prism block or not, using the neighbour list information. The neighbour list nList is a row-ordered vector of vectors, containing atom indices (not atom IDs!). The first element of each subvector in nList is the atom index of the particle for which the other elements are the nearest neighbours.
[in] | nList | Row-ordered neighbour list by atom index. |
[in] | basal1 | The vector for one of the basal rings. |
[in] | basal2 | The vector for the other basal ring. |
Definition at line 347 of file topo_one_dim.cpp.
Eigen::MatrixXd tum3::buildRefDDC | ( | std::string | fileName | ) |
Build a reference Double-Diamond cage, reading in from a template XYZ file.
Build a reference Double-Diamond cage, reading it in from a templates directory
Definition at line 431 of file bulkTUM.cpp.
Eigen::MatrixXd tum3::buildRefHC | ( | std::string | fileName | ) |
Build a reference Hexagonal cage, reading in from a template XYZ file.
Build a reference Hexagonal cage, reading it in from a templates directory
Definition at line 373 of file bulkTUM.cpp.
int ring::clearRingList | ( | std::vector< std::vector< int >> & | rings | ) |
int tum3::clusterCages | ( | molSys::PointCloud< molSys::Point< double >, double > * | yCloud, |
std::string | path, | ||
std::vector< std::vector< int >> | rings, | ||
std::vector< cage::Cage > | cageList, | ||
int | numHC, | ||
int | numDDC | ||
) |
Clustering Clusters cages using the Stillinger algorithm and prints out individual XYZ files of clusters.
Groups cages into clusters and prints out each cluster into an XYZ file
Definition at line 640 of file bulkTUM.cpp.
bool ring::commonElementsInThreeRings | ( | std::vector< int > | ring1, |
std::vector< int > | ring2, | ||
std::vector< int > | ring3 | ||
) |
Common elements in 3 rings.
Function that finds the common elements in three input rings
[in] | ring1 | The first ring. |
[in] | ring2 | The second ring. |
[in] | ring3 | The third ring. |
Definition at line 63 of file ring.cpp.
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
Checks to see if two vectors (ring1, ring2) have the same elements (which may or may not be disordered). The order or sequence of elements is not important, so the rings are sorted. Returns true if the rings have the same elements
[in] | ring1 | The first ring. |
[in] | ring2 | The second ring. |
int ring::deformedPrismTypes | ( | std::vector< ring::strucType > | atomState, |
std::vector< int > * | atomTypes, | ||
int | maxDepth | ||
) |
Get the atom type values for deformed prisms.
Assign an atomType value for atoms belonging to deformed prisms.
[in] | rings | The vector of vectors containing the primitive rings, of a particular ring size. |
[in] | listPrism | The list of prism blocks found. |
[in] | ringSize | The current ring size or number of nodes in each ring. |
[in,out] | atomTypes | A vector which contains a type for each atom, depending on it's type as classified by the prism identification scheme. |
Definition at line 755 of file topo_one_dim.cpp.
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
A function that discards basal tetragonal rings which are not oriented perpendicular to the axial direction. This is will only work for the XY, YZ or XZ planes. If true is returned, then the rings are axial. This function is only needed for tetragonal prism blocks because in the other cases, the basal rings and lateral planes have a different number of nodes.
[in] | basal1 | The first basal ring. |
[in] | basal2 | The other candidate basal ring. |
[in] | yCloud | The input PointCloud. |
Definition at line 483 of file topo_one_dim.cpp.
std::vector< int > ring::findPrisms | ( | std::vector< std::vector< int >> | rings, |
std::vector< strucType > * | ringType, | ||
int * | nPerfectPrisms, | ||
int * | nImperfectPrisms, | ||
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
Determines which rings are n-sided prisms. This function returns a vector which contains the ring indices of all the rings which are prisms. The ring indices correspond to the index of the rings inside the vector of vector rings, starting from 0. Prism rings can be found using a three-step procedure, in which first two basal rings are found. Prismatic rings are simply rings which share every face made by upper and lower triplets of the basal rings The neighbour list is also required as an input, which is a vector of vectors, containing atom IDs. The first element of the neighbour list is the atom index of the atom for which the other elements are nearest neighbours.\
[in] | rings | The input vector of vectors containing the primitive rings of a single ring size (number of nodes). |
[in] | ringType | A vector containing a ring::strucType value (a classification type) for each ring. |
[in] | nPrisms | The number of prism blocks identified for the number of nodes. |
[in] | nList | The row-ordered neighbour list (by atom index). |
[in] | yCloud | The input PointCloud. |
Definition at line 189 of file topo_one_dim.cpp.
std::vector< int > ring::findsCommonElements | ( | std::vector< int > | ring1, |
std::vector< int > | ring2 | ||
) |
Returns the common elements of two rings.
Function that finds and returns a vector containing the elements shared by two input rings (each ring is a vector).
[in] | ring1 | The first ring. |
[in] | ring2 | The second ring. |
Definition at line 34 of file ring.cpp.
bool ring::findTripletInRing | ( | std::vector< int > | ring, |
std::vector< int > | triplet | ||
) |
Searches a particular ring for a triplet.
Function that finds out if a given triplet is is present (in the same order or in reversed order) in a given ring.
[in] | ring | The input ring containing the indices of atoms. |
[in] | triplet | Vector containing the triplet, for whose presence the input ring vector will be checked. |
Definition at line 97 of file ring.cpp.
std::vector< std::vector< int > > ring::getSingleRingSize | ( | std::vector< std::vector< int >> | rings, |
int | ringSize | ||
) |
Returns a vector of vectors of rings of a single size.
Function that gets rings of a single ring size (i.e. a particular number of nodes) from all primitive rings, and returns a vector of vectors containing the rings of the specified size.
[in] | rings | The vector of vectors containing the primitive rings of all sizes. |
[in] | ringSize | The desired ring size or number of nodes in each ring to be saved. |
Definition at line 149 of file ring.cpp.
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
For two vectors, checks to see if there are common elements (true) or not (false).
[in] | ring1 | The vector of the first ring. |
[in] | ring2 | The vector of the second ring. |
Definition at line 175 of file ring.cpp.
std::vector<std::vector<int> > ring::keepAxialRingsOnly | ( | std::vector< std::vector< int >> | rings, |
molSys::PointCloud< molSys::Point< double >, double > * | yCloud | ||
) |
Saves only axial rings out of all possible rings.
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 | ||
) |
Find out which rings are prisms, looping through all ring sizes upto the maxDepth The input ringsAllSizes array has rings of every size.
Function that loops through the primitive rings (which is a vector of vectors) of all sizes, upto maxDepth (the largest ring size). The function returns a vector which contains the ring indices of all the rings which constitute prism blocks. The ring IDs correspond to the index of the rings inside the vector of vector rings, starting from 0. This is registered as a Lua function, and is exposed to the user directly. The function calls the following functions internally:
[in] | path | The string to the output directory, in which files will be written out. |
[in] | rings | Row-ordered vector of vectors for rings of a single type. |
[in] | nList | Row-ordered neighbour list by index. |
[in] | yCloud | The input PointCloud. |
[in] | maxDepth | The maximum possible size of the primitive rings. |
[in] | sheetArea | Area calculated using the two significant dimensions of the quasi-two-dimensional sheet. |
[in] | firstFrame | The first frame to be analyzed |
Definition at line 37 of file topo_two_dim.cpp.
int ring::prismAnalysis | ( | std::string | path, |
std::vector< std::vector< int >> | rings, | ||
std::vector< std::vector< int >> | nList, | ||
molSys::PointCloud< molSys::Point< double >, double > * | yCloud, | ||
int | maxDepth, | ||
int * | atomID, | ||
int | firstFrame, | ||
int | currentFrame, | ||
bool | doShapeMatching = false |
||
) |
Find out which rings are prisms, looping through all ring sizes upto the maxDepth The input ringsAllSizes array has rings of every size.
Function that loops through the primitive rings (which is a vector of vectors) of all sizes, upto maxDepth (the largest ring size). The function returns a vector which contains the ring indices of all the rings which constitute prism blocks. The ring IDs correspond to the index of the rings inside the vector of vector rings, starting from 0. This is registered as a Lua function, and is exposed to the user directly. The function calls the following functions internally:
[in] | path | The string to the output directory, in which files will be written out. |
[in] | rings | Row-ordered vector of vectors for rings of a single type. |
[in] | nList | Row-ordered neighbour list by index. |
[in] | yCloud | The input PointCloud. |
[in] | maxDepth | The maximum possible size of the primitive rings. |
[in] | maxDepth | The first frame. |
Definition at line 45 of file topo_one_dim.cpp.
bool ring::relaxedPrismConditions | ( | 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
Relaxed criteria for deformed prism blocks: at least one bond should exist between the basal rings.
Definition at line 432 of file topo_one_dim.cpp.
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.
Assign an atomType value for atoms belonging to deformed prisms.
[in] | rings | The vector of vectors containing the primitive rings, of a particular ring size. |
[in] | listPrism | The list of prism blocks found. |
[in] | ringSize | The current ring size or number of nodes in each ring. |
[in,out] | atomTypes | A vector which contains a type for each atom, depending on it's type as classified by the prism identification scheme. |
Definition at line 787 of file topo_one_dim.cpp.
int tum3::shapeMatchDDC | ( | molSys::PointCloud< molSys::Point< double >, double > * | yCloud, |
const Eigen::MatrixXd & | refPoints, | ||
std::vector< cage::Cage > | cageList, | ||
int | cageIndex, | ||
std::vector< std::vector< int >> | rings, | ||
std::vector< double > * | quat, | ||
double * | rmsd | ||
) |
Shape-matching for a target DDC.
Match the input cage with a perfect DDC. The quaternion for the rotation and the RMSD is outputted.
[in] | refPoints | The point set of the reference system (or right system). This is a \( (n \times 3) \) Eigen matrix. Here, \( n \) is the number of particles. |
[in] | targetPoints | \( (n \times 3) \) Eigen matrix of the candidate/test system (or left system). |
[in,out] | quat | The quaternion for the optimum rotation of the left system into the right system. |
[in,out] | scale | The scale factor obtained from Horn's algorithm. |
Definition at line 319 of file bulkTUM.cpp.
int tum3::shapeMatchHC | ( | molSys::PointCloud< molSys::Point< double >, double > * | yCloud, |
const Eigen::MatrixXd & | refPoints, | ||
cage::Cage | cageUnit, | ||
std::vector< std::vector< int >> | rings, | ||
std::vector< std::vector< int >> | nList, | ||
std::vector< double > * | quat, | ||
double * | rmsd | ||
) |
Shape-matching for a target HC.
Match the input cage with a perfect HC. The quaternion for the rotation and the RMSD is outputted.
[in] | refPoints | The point set of the reference system (or right system). This is a \( (n \times 3) \) Eigen matrix. Here, \( n \) is the number of particles. |
[in] | targetPoints | \( (n \times 3) \) Eigen matrix of the candidate/test system (or left system). |
[in,out] | quat | The quaternion for the optimum rotation of the left system into the right system. |
[in,out] | scale | The scale factor obtained from Horn's algorithm. |
Definition at line 247 of file bulkTUM.cpp.
std::vector< cage::Cage > tum3::topoBulkCriteria | ( | std::string | path, |
std::vector< std::vector< int >> | rings, | ||
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
Finds out if rings constitute double-diamond cages or hexagonal cages. Requires a neighbour list (by index) and a vector of vectors of primitive rings which should also be by index. This is only for rings of size 6! Internally, this function calls the following functions:
[in] | path | The file path of the output directory to which output files will be written. |
[in] | rings | Vector of vectors containing the primitive rings. This should contain rings of only size 6. |
[in] | nList | Row-ordered neighbour list, by index. |
[in] | yCloud | The input PointCloud, with respect to which the indices in the rings and nList vector of vectors have been saved. |
[in] | firstFrame | First frame to be analyzed |
[in] | onlyTetrahedral | Flag for only finding DDCs and HCs (true) or also finding PNCs (false) |
Definition at line 577 of file bulkTUM.cpp.
int tum3::topoUnitMatchingBulk | ( | std::string | path, |
std::vector< std::vector< int >> | rings, | ||
std::vector< std::vector< int >> | nList, | ||
molSys::PointCloud< molSys::Point< double >, double > * | yCloud, | ||
int | firstFrame, | ||
bool | printClusters, | ||
bool | onlyTetrahedral | ||
) |
Topological unit matching for bulk water. If printClusters is true, individual clusters of connected cages are printed.
Finds out if rings constitute double-diamond cages or hexagonal cages. Requires a neighbour list (by index) and a vector of vectors of primitive rings which should also be by index. This is registered as a Lua function and is accessible to the user. Internally, this function calls the following functions:
[in] | path | The file path of the output directory to which output files will be written. |
[in] | rings | Vector of vectors containing the primitive rings. This contains rings of all sizes. |
[in] | nList | Row-ordered neighbour list, by index. |
[in] | yCloud | The input PointCloud, with respect to which the indices in the rings and nList vector of vectors have been saved. |
[in] | firstFrame | First frame to be analyzed |
[in] | onlyTetrahedral | Flag for only finding DDCs and HCs (true) or also finding PNCs (false) |
Definition at line 48 of file bulkTUM.cpp.
int tum3::updateRMSDatom | ( | std::vector< std::vector< int >> | rings, |
cage::Cage | cageUnit, | ||
double | rmsd, | ||
std::vector< double > * | rmsdPerAtom, | ||
std::vector< int > * | noOfCommonAtoms, | ||
std::vector< cage::iceType > | atomTypes | ||
) |
Calulate the RMSD for each ring, using RMSD values (rmsd) obtained from the shape-matching of each cage
Update the calculated RMSD per ring using the RMSD values of each cage, and also update the values in the noOfCommonRings vector, which will be used for averaging the RMSD per atom depending on the number of cages that share that particular ring.
Definition at line 482 of file bulkTUM.cpp.