neighbours.hpp
Go to the documentation of this file.
Code
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 __NEIGHBOURS_H_
16#define __NEIGHBOURS_H_
17
18#include <generic.hpp>
19#include <mol_sys.hpp>
20
52namespace nneigh {
54
58std::vector<std::vector<int>> neighList(
59 double rcutoff, molSys::PointCloud<molSys::Point<double>, double> *yCloud,
60 int typeI, int typeJ);
61
64std::vector<std::vector<int>> neighListO(
65 double rcutoff, molSys::PointCloud<molSys::Point<double>, double> *yCloud,
66 int typeI);
67
70std::vector<std::vector<int>> halfNeighList(
71 double rcutoff, molSys::PointCloud<molSys::Point<double>, double> *yCloud,
72 int typeI = 1);
73
76
79std::vector<std::vector<int>> neighbourListByIndex(
81 std::vector<std::vector<int>> nList);
82
85std::vector<std::vector<int>> getNewNeighbourListByIndex(
86 molSys::PointCloud<molSys::Point<double>, double> *yCloud, double cutoff);
87
89int clearNeighbourList(std::vector<std::vector<int>> &nList);
90
91} // namespace nneigh
92
93#endif // __NEIGHBOURS_H_
File for containing generic or common 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.
std::vector< std::vector< int > > neighbourListByIndex(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList)
int clearNeighbourList(std::vector< std::vector< int > > &nList)
Erases memory for a vector of vectors for the neighbour list.
std::vector< std::vector< int > > halfNeighList(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI=1)
std::vector< std::vector< int > > neighListO(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI)
std::vector< std::vector< int > > getNewNeighbourListByIndex(molSys::PointCloud< molSys::Point< double >, double > *yCloud, double cutoff)
The main molecular system handler.
Functions for building neighbour lists. This namespace contains functions that build neighbour lists ...
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