franzblau.hpp
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------------
2 // d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3 //
4 // Copyright (c) 2018--present d-SEAMS core team
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the MIT License as published by
8 // the Open Source Initiative.
9 //
10 // A copy of the MIT License is included in the LICENSE file of this repository.
11 // You should have received a copy of the MIT License along with this program.
12 // If not, see <https://opensource.org/licenses/MIT>.
13 //-----------------------------------------------------------------------------------
14 
15 #ifndef __FRANZBLAU_H_
16 #define __FRANZBLAU_H_
17 
18 #include <algorithm>
19 #include <array>
20 #include <fstream>
21 #include <iostream>
22 #include <iterator>
23 #include <math.h>
24 #include <memory>
25 #include <sstream>
26 #include <string>
27 #include <sys/stat.h>
28 #include <vector>
29 
30 #include <cage.hpp>
31 #include <mol_sys.hpp>
32 #include <seams_input.hpp>
33 #include <seams_output.hpp>
34 
77 namespace primitive {
78 
90 struct Vertex {
91  int atomIndex;
94  bool inGraph =
95  true;
96 };
97 
108 struct Graph {
113 };
114 
120  int maxDepth);
121 
126  molSys::PointCloud<molSys::Point<double>, double> *yCloud,
127  std::vector<std::vector<int>> neighHbondList);
128 
133 
139 
142  int maxDepth);
143 
145 Graph removeNonSPrings(Graph *fullGraph);
146 
148 int findRings(Graph *fullGraph, int v, std::vector<int> *visited, int maxDepth,
149  int depth, int root = -1);
150 
152 int shortestPath(Graph *fullGraph, int v, int goal, std::vector<int> *path,
153  std::vector<int> *visited, int maxDepth, int depth = 1);
154 
156 Graph clearGraph(Graph *currentGraph);
157 
158 } // namespace primitive
159 
160 #endif // __FRANZBLAU_H_
File for cage types for topological network criteria.
Graph restoreEdgesFromIndices(Graph *fullGraph, std::vector< std::vector< int >> nList)
Definition: franzblau.cpp:283
Graph populateGraphFromNListID(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> neighHbondList)
Definition: franzblau.cpp:192
Graph countAllRingsFromIndex(std::vector< std::vector< int >> neighHbondList, int maxDepth)
Creates a vector of vectors of all possible rings.
Definition: franzblau.cpp:64
Graph populateGraphFromIndices(std::vector< std::vector< int >> nList)
Definition: franzblau.cpp:248
Graph removeNonSPrings(Graph *fullGraph)
Removes the non-SP rings, using the Franzblau shortest path criterion.
Definition: franzblau.cpp:307
std::vector< std::vector< int > > ringNetwork(std::vector< std::vector< int >> nList, int maxDepth)
Definition: franzblau.cpp:32
std::vector< int > neighListIndex
This is the index according to pointCloud.
Definition: franzblau.hpp:92
std::vector< std::vector< int > > rings
Definition: franzblau.hpp:112
Graph clearGraph(Graph *currentGraph)
Function for clearing vectors in Graph after multiple usage.
Definition: franzblau.cpp:444
int shortestPath(Graph *fullGraph, int v, int goal, std::vector< int > *path, std::vector< int > *visited, int maxDepth, int depth=1)
Calculates the shortest path.
Definition: franzblau.cpp:397
int findRings(Graph *fullGraph, int v, std::vector< int > *visited, int maxDepth, int depth, int root=-1)
Main function that searches for all rings.
Definition: franzblau.cpp:116
std::vector< Vertex > pts
Definition: franzblau.hpp:109
The main molecular system handler.
Functions for generating primitive rings. This namespace contains struct definitions and functions th...
Definition: franzblau.hpp:77
File for functions that read in files).
This contains a collection of points; contains information for a particular frame.
Definition: mol_sys.hpp:170
This contains per-particle information.
Definition: mol_sys.hpp:149
This is a per-frame object, containing all the vertices for the particular frame, along with the vect...
Definition: franzblau.hpp:108
This is a collection of elements, for each point, required for graph traversal.
Definition: franzblau.hpp:90