Loading...
Searching...
No Matches
Primitive

Namespaces

namespace  primitive
 Functions for generating primitive rings.

Classes

struct  primitive::Vertex
 This is a collection of elements, for each point, required for graph traversal. More...
struct  primitive::Graph
 This is a per-frame object, containing all the vertices for the particular frame, along with the vector of rings generated. More...
class  primitive::RingUpdater
 Exact frame-to-frame maintenance of the primitive ring network. More...

Functions

std::vector< std::vector< int > > primitive::ringNetwork (const std::vector< std::vector< int > > &nList, int maxDepth)
Graph primitive::populateGraphFromNListID (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &neighHbondList)
Graph primitive::populateGraphFromIndices (const std::vector< std::vector< int > > &nList)
void primitive::restoreEdgesFromIndices (Graph &fullGraph, const std::vector< std::vector< int > > &nList)
Graph primitive::countAllRingsFromIndex (const std::vector< std::vector< int > > &neighHbondList, int maxDepth)
 Creates a vector of vectors of all possible rings.
void primitive::removeNonSPrings (Graph &fullGraph)
 Removes the non-SP rings, using the Franzblau shortest path criterion.
int primitive::findRings (Graph &fullGraph, int v, std::vector< int > &visited, int maxDepth, int depth, int root=-1)
 Main function that searches for all rings.
int primitive::shortestPath (Graph &fullGraph, int v, int goal, std::vector< int > &path, std::vector< int > &visited, int maxDepth, int depth=1)
 Calculates the shortest path.
Graph primitive::clearGraph (Graph &currentGraph)
 Function for clearing vectors in Graph after multiple usage.
 primitive::RingUpdater::RingUpdater (int maxDepth)
 primitive::RingUpdater::~RingUpdater ()
 primitive::RingUpdater::RingUpdater (RingUpdater &&) noexcept
RingUpdaterprimitive::RingUpdater::operator= (RingUpdater &&) noexcept
 primitive::RingUpdater::RingUpdater (const RingUpdater &)=delete
RingUpdaterprimitive::RingUpdater::operator= (const RingUpdater &)=delete
const std::vector< std::vector< int > > & primitive::RingUpdater::update (const std::vector< std::vector< int > > &nList)
int primitive::RingUpdater::lastRecomputedSources () const
int primitive::RingUpdater::lastBallsRefreshed () const
 Vertices whose bounded balls were rebuilt on the last update.

Variables

int primitive::Vertex::atomIndex
std::vector< int > primitive::Vertex::neighListIndex
 This is the index according to pointCloud.
bool primitive::Vertex::inGraph
std::vector< Vertexprimitive::Graph::pts
std::vector< std::vector< int > > primitive::Graph::rings

Detailed Description

Function Documentation

◆ clearGraph()

Graph primitive::clearGraph ( Graph & currentGraph)

Function for clearing vectors in Graph after multiple usage.

◆ countAllRingsFromIndex()

Graph primitive::countAllRingsFromIndex ( const std::vector< std::vector< int > > & neighHbondList,
int maxDepth )

Creates a vector of vectors of all possible rings.

◆ findRings()

int primitive::findRings ( Graph & fullGraph,
int v,
std::vector< int > & visited,
int maxDepth,
int depth,
int root = -1 )
nodiscard

Main function that searches for all rings.

◆ lastBallsRefreshed()

int primitive::RingUpdater::lastBallsRefreshed ( ) const
nodiscard

Vertices whose bounded balls were rebuilt on the last update.

◆ lastRecomputedSources()

int primitive::RingUpdater::lastRecomputedSources ( ) const
nodiscard

Sources re-enumerated by the last update; the full vertex count on the first frame, zero when nothing changed

◆ operator=() [1/2]

RingUpdater & primitive::RingUpdater::operator= ( const RingUpdater & )
delete

◆ operator=() [2/2]

RingUpdater & primitive::RingUpdater::operator= ( RingUpdater && )
noexcept

◆ populateGraphFromIndices()

Graph primitive::populateGraphFromIndices ( const std::vector< std::vector< int > > & nList)

Creates a graph object and fills it with the information from a neighbour list of INDICES NOT ATOM IDs created before. NOTE: the neighbourListIndex contains the indices and NOT the atom IDs as in the neighbour list

◆ populateGraphFromNListID()

Graph primitive::populateGraphFromNListID ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & neighHbondList )

Creates a graph object and fills it with the information from a neighbour list and pointCloud created before. NOTE: the neighbourListIndex contains the indices and NOT the atom IDs as in the neighbour list

◆ removeNonSPrings()

void primitive::removeNonSPrings ( Graph & fullGraph)

Removes the non-SP rings, using the Franzblau shortest path criterion.

◆ restoreEdgesFromIndices()

void primitive::restoreEdgesFromIndices ( Graph & fullGraph,
const std::vector< std::vector< int > > & nList )

Re-fills the neighbour lists of a graph object from a neighbour list of INDICES NOT ATOM IDs created before. NOTE: the neighbourListIndex contains the indices and NOT the atom IDs as in the neighbour list

◆ ringNetwork()

std::vector< std::vector< int > > primitive::ringNetwork ( const std::vector< std::vector< int > > & nList,
int maxDepth )

Returns a vector of vectors containing the rings (of all sizes), by atom index, given the neighbour list also by index (preferably the hydrogen-bonded neighbour list). Internally uses the Graph and Vertex objects.

◆ RingUpdater() [1/3]

primitive::RingUpdater::RingUpdater ( const RingUpdater & )
delete

◆ RingUpdater() [2/3]

primitive::RingUpdater::RingUpdater ( int maxDepth)
explicit

◆ RingUpdater() [3/3]

primitive::RingUpdater::RingUpdater ( RingUpdater && )
noexcept

◆ shortestPath()

int primitive::shortestPath ( Graph & fullGraph,
int v,
int goal,
std::vector< int > & path,
std::vector< int > & visited,
int maxDepth,
int depth = 1 )
nodiscard

Calculates the shortest path.

◆ update()

const std::vector< std::vector< int > > & primitive::RingUpdater::update ( const std::vector< std::vector< int > > & nList)

Primitive rings for this frame's neighbour list (row-ordered, by index, first element of each row the vertex itself)

◆ ~RingUpdater()

primitive::RingUpdater::~RingUpdater ( )

Variable Documentation

◆ atomIndex

int primitive::Vertex::atomIndex

Definition at line 90 of file franzblau.hpp.

◆ inGraph

bool primitive::Vertex::inGraph
Initial value:
=
true

Contains the INDICES (not the atomIDs) of the neighbouring vertices

Definition at line 93 of file franzblau.hpp.

◆ neighListIndex

std::vector<int> primitive::Vertex::neighListIndex

This is the index according to pointCloud.

Definition at line 91 of file franzblau.hpp.

◆ pts

std::vector<Vertex> primitive::Graph::pts

Definition at line 108 of file franzblau.hpp.

◆ rings

std::vector<std::vector<int> > primitive::Graph::rings

Collection of vertices. The index of each should be the same as that in pointCloud

Definition at line 111 of file franzblau.hpp.