franzblau.hpp
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------------
2 // d-SEAMS is free software: you can redistribute it and/or modify
3 // it under the terms of the GNU General Public License as published by
4 // the Free Software Foundation, either version 3 of the License, or
5 // (at your option) any later version.
6 //
7 // A copy of the GNU General Public License is available at
8 // http://www.gnu.org/licenses/
9 //-----------------------------------------------------------------------------------
10 
11 #ifndef __FRANZBLAU_H_
12 #define __FRANZBLAU_H_
13 
14 #include <algorithm>
15 #include <array>
16 #include <fstream>
17 #include <iostream>
18 #include <iterator>
19 #include <math.h>
20 #include <memory>
21 #include <sstream>
22 #include <string>
23 #include <sys/stat.h>
24 #include <vector>
25 
26 #include <cage.hpp>
27 #include <mol_sys.hpp>
28 #include <seams_input.hpp>
29 #include <seams_output.hpp>
30 
73 namespace primitive {
74 
86 struct Vertex {
87  int atomIndex;
90  bool inGraph =
91  true;
92 };
93 
104 struct Graph {
109 };
110 
116  int maxDepth);
117 
122  molSys::PointCloud<molSys::Point<double>, double> *yCloud,
123  std::vector<std::vector<int>> neighHbondList);
124 
129 
135 
138  int maxDepth);
139 
141 Graph removeNonSPrings(Graph *fullGraph);
142 
144 int findRings(Graph *fullGraph, int v, std::vector<int> *visited, int maxDepth,
145  int depth, int root = -1);
146 
148 int shortestPath(Graph *fullGraph, int v, int goal, std::vector<int> *path,
149  std::vector<int> *visited, int maxDepth, int depth = 1);
150 
152 Graph clearGraph(Graph *currentGraph);
153 
154 } // namespace primitive
155 
156 #endif // __FRANZBLAU_H_
File for cage types for topological network criteria.
Graph restoreEdgesFromIndices(Graph *fullGraph, std::vector< std::vector< int >> nList)
Definition: franzblau.cpp:279
Graph populateGraphFromNListID(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> neighHbondList)
Definition: franzblau.cpp:188
Graph countAllRingsFromIndex(std::vector< std::vector< int >> neighHbondList, int maxDepth)
Creates a vector of vectors of all possible rings.
Definition: franzblau.cpp:60
Graph populateGraphFromIndices(std::vector< std::vector< int >> nList)
Definition: franzblau.cpp:244
Graph removeNonSPrings(Graph *fullGraph)
Removes the non-SP rings, using the Franzblau shortest path criterion.
Definition: franzblau.cpp:303
std::vector< std::vector< int > > ringNetwork(std::vector< std::vector< int >> nList, int maxDepth)
Definition: franzblau.cpp:28
std::vector< int > neighListIndex
This is the index according to pointCloud.
Definition: franzblau.hpp:88
std::vector< std::vector< int > > rings
Definition: franzblau.hpp:108
Graph clearGraph(Graph *currentGraph)
Function for clearing vectors in Graph after multiple usage.
Definition: franzblau.cpp:440
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:393
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:112
std::vector< Vertex > pts
Definition: franzblau.hpp:105
The main molecular system handler.
Functions for generating primitive rings. This namespace contains struct definitions and functions th...
Definition: franzblau.hpp:73
File for functions that read in files).
This contains a collection of points; contains information for a particular frame.
Definition: mol_sys.hpp:166
This contains per-particle information.
Definition: mol_sys.hpp:145
This is a per-frame object, containing all the vertices for the particular frame, along with the vect...
Definition: franzblau.hpp:104
This is a collection of elements, for each point, required for graph traversal.
Definition: franzblau.hpp:86