ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
NeighborList Class Reference

#include <neighbor_list.h>

Collaboration diagram for NeighborList:

Public Member Functions

 NeighborList ()=default
 ~NeighborList ()=default
void initialize (std::size_t ncentral_atoms, std::size_t pgsize)
void reset ()
int get_ncentral_atoms () const
int get_numneigh (int i) const
int * get_firstneigh (int i)
const int * get_firstneigh (int i) const
std::vector< int > get_neighbors_sorted_by_distance (int central_atom, const std::vector< double > &coordinates) const
 Return a distance-sorted copy of one atom's neighbors without changing the stored order.
PageAllocator & get_allocator ()
const PageAllocator & get_allocator () const
void set_neighbors (int i, const std::vector< int > &neighbors)

Private Attributes

int ncentral_atoms_ = 0
std::vector< int > numneigh_
std::vector< int * > firstneigh_
PageAllocator allocator_

Friends

class BinManager

Constructor & Destructor Documentation

◆ NeighborList()

NeighborList::NeighborList ( )
default

◆ ~NeighborList()

NeighborList::~NeighborList ( )
default

Member Function Documentation

◆ get_allocator() [1/2]

PageAllocator & NeighborList::get_allocator ( )
inline

◆ get_allocator() [2/2]

const PageAllocator & NeighborList::get_allocator ( ) const
inline

◆ get_firstneigh() [1/2]

int * NeighborList::get_firstneigh ( int i)
inline
Here is the caller graph for this function:

◆ get_firstneigh() [2/2]

const int * NeighborList::get_firstneigh ( int i) const
inline

◆ get_ncentral_atoms()

int NeighborList::get_ncentral_atoms ( ) const
inline
Here is the caller graph for this function:

◆ get_neighbors_sorted_by_distance()

std::vector< int > NeighborList::get_neighbors_sorted_by_distance ( int central_atom,
const std::vector< double > & coordinates ) const

Return a distance-sorted copy of one atom's neighbors without changing the stored order.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_numneigh()

int NeighborList::get_numneigh ( int i) const
inline
Here is the caller graph for this function:

◆ initialize()

void NeighborList::initialize ( std::size_t ncentral_atoms,
std::size_t pgsize )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void NeighborList::reset ( )
inline
Here is the caller graph for this function:

◆ set_neighbors()

void NeighborList::set_neighbors ( int i,
const std::vector< int > & neighbors )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BinManager

friend class BinManager
friend

Member Data Documentation

◆ allocator_

PageAllocator NeighborList::allocator_
private

◆ firstneigh_

std::vector<int*> NeighborList::firstneigh_
private

◆ ncentral_atoms_

int NeighborList::ncentral_atoms_ = 0
private

◆ numneigh_

std::vector<int> NeighborList::numneigh_
private

The documentation for this class was generated from the following files: