nneigh Namespace Reference

Functions for building neighbour lists. This namespace contains functions that build neighbour lists (using brute-force), saving either the atom IDs or atom indices (according to a PointCloud) in a row-ordered vector of vectors. Whether the atom IDs or atom indices (i.e. the indices of the elements in the vector pts inside the PointCloud) are saved, the neighbour lists are constructed such that the first element is the 'central atom', whose neighbours are being saved on that particular line. The central atom is followed by the atom IDs or indices of the nearest neighbours. More...

Functions

std::vector< std::vector< int > > neighList (double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI, int typeJ)
 All these functions use atom IDs and not indices. More...
 
std::vector< std::vector< int > > neighListO (double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI)
 
std::vector< std::vector< int > > halfNeighList (double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI=1)
 
std::vector< std::vector< int > > neighbourListByIndex (molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList)
 
std::vector< std::vector< int > > getNewNeighbourListByIndex (molSys::PointCloud< molSys::Point< double >, double > *yCloud, double cutoff)
 
int clearNeighbourList (std::vector< std::vector< int >> &nList)
 Erases memory for a vector of vectors for the neighbour list. More...
 

Detailed Description

Functions for building neighbour lists. This namespace contains functions that build neighbour lists (using brute-force), saving either the atom IDs or atom indices (according to a PointCloud) in a row-ordered vector of vectors. Whether the atom IDs or atom indices (i.e. the indices of the elements in the vector pts inside the PointCloud) are saved, the neighbour lists are constructed such that the first element is the 'central atom', whose neighbours are being saved on that particular line. The central atom is followed by the atom IDs or indices of the nearest neighbours.

In a 'full' neighbour list, if 1 is a neighbour of 2 then 1 is saved in the neighbour list of 2 AND 2 is also saved in the neighbour list of 1.

In a 'half' neighbour list, if 1 is a neighbour of 2, then 2 is saved in the neighbour list of 1 but not vice versa.

Changelog