QMCPACK
NeighborLists.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2018 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #ifndef QMCPLUSPLUS_NEIGHBORLIST_H
14 #define QMCPLUSPLUS_NEIGHBORLIST_H
15 
16 #include <vector>
17 #include "Particle/ParticleSet.h"
18 
19 namespace qmcplusplus
20 {
22 {
23 protected:
24  /// neighbor particle IDs of all the reference particles
25  std::vector<std::vector<int>> NeighborIDs;
26 
27 public:
28  /// constructor
29  NeighborLists(const ParticleSet& source) : NeighborIDs(source.getTotalNum()) {}
30 
31  /// get the neighbor list of the source particle
32  std::vector<int>& getNeighborList(int source) { return NeighborIDs[source]; }
33  const std::vector<int>& getNeighborList(int source) const { return NeighborIDs[source]; }
34 };
35 
36 } // namespace qmcplusplus
37 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
NeighborLists(const ParticleSet &source)
constructor
Definition: NeighborLists.h:29
const std::vector< int > & getNeighborList(int source) const
Definition: NeighborLists.h:33
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
std::vector< int > & getNeighborList(int source)
get the neighbor list of the source particle
Definition: NeighborLists.h:32
std::vector< std::vector< int > > NeighborIDs
neighbor particle IDs of all the reference particles
Definition: NeighborLists.h:25