Public Member Functions | Private Member Functions | Private Attributes | List of all members
PLMD::LinkCells Class Reference

A class for doing link cells. More...

#include <LinkCells.h>

Public Member Functions

 LinkCells (Communicator &comm)
 
bool enabled () const
 Have the link cells been enabled. More...
 
void setCutoff (const double &lcut)
 Set the value of the cutoff. More...
 
double getCutoff () const
 Get the value of the cutoff. More...
 
void buildCellLists (const std::vector< Vector > &pos, const std::vector< unsigned > &indices, const Pbc &pbc)
 Build the link cell lists. More...
 
void retrieveNeighboringAtoms (const Vector &pos, unsigned &natomsper, std::vector< unsigned > &atoms) const
 Find a list of relevant atoms. More...
 

Private Member Functions

std::vector< unsigned > findMyCell (const Vector &pos) const
 Find the cell in which this position is contained. More...
 
unsigned findCell (const Vector &pos) const
 Find the cell in which this position is contained. More...
 

Private Attributes

Communicator & comm
 Symbolic link to plumed communicator. More...
 
bool cutoffwasset
 Check that the link cells were set up correctly. More...
 
double link_cutoff
 The cutoff to use for the sizes of the cells. More...
 
Pbc mypbc
 The pbc we are using for link cells. More...
 
std::vector< unsigned > ncells
 The number of cells in each direction. More...
 
std::vector< unsigned > nstride
 The number of cells to stride through to get the link cells. More...
 
std::vector< unsigned > allcells
 The list of cells each atom is inside. More...
 
std::vector< unsigned > lcell_starts
 The start of each block corresponding to each link cell. More...
 
std::vector< unsigned > lcell_tots
 The number of atoms in each link cell. More...
 
std::vector< unsigned > lcell_lists
 The atoms ordered by link cells. More...
 

Detailed Description

A class for doing link cells.

Constructor & Destructor Documentation

◆ LinkCells()

PLMD::LinkCells::LinkCells ( Communicator &  comm)
explicit

Member Function Documentation

◆ buildCellLists()

void PLMD::LinkCells::buildCellLists ( const std::vector< Vector > &  pos,
const std::vector< unsigned > &  indices,
const Pbc &  pbc 
)

Build the link cell lists.

◆ enabled()

bool PLMD::LinkCells::enabled ( ) const
inline

Have the link cells been enabled.

◆ findCell()

unsigned PLMD::LinkCells::findCell ( const Vector &  pos) const
private

Find the cell in which this position is contained.

◆ findMyCell()

std::vector< unsigned > PLMD::LinkCells::findMyCell ( const Vector &  pos) const
private

Find the cell in which this position is contained.

◆ getCutoff()

double PLMD::LinkCells::getCutoff ( ) const

Get the value of the cutoff.

◆ retrieveNeighboringAtoms()

void PLMD::LinkCells::retrieveNeighboringAtoms ( const Vector &  pos,
unsigned &  natomsper,
std::vector< unsigned > &  atoms 
) const

Find a list of relevant atoms.

◆ setCutoff()

void PLMD::LinkCells::setCutoff ( const double &  lcut)

Set the value of the cutoff.

Member Data Documentation

◆ allcells

std::vector<unsigned> PLMD::LinkCells::allcells
private

The list of cells each atom is inside.

◆ comm

Communicator& PLMD::LinkCells::comm
private

Symbolic link to plumed communicator.

◆ cutoffwasset

bool PLMD::LinkCells::cutoffwasset
private

Check that the link cells were set up correctly.

◆ lcell_lists

std::vector<unsigned> PLMD::LinkCells::lcell_lists
private

The atoms ordered by link cells.

◆ lcell_starts

std::vector<unsigned> PLMD::LinkCells::lcell_starts
private

The start of each block corresponding to each link cell.

◆ lcell_tots

std::vector<unsigned> PLMD::LinkCells::lcell_tots
private

The number of atoms in each link cell.

◆ link_cutoff

double PLMD::LinkCells::link_cutoff
private

The cutoff to use for the sizes of the cells.

◆ mypbc

Pbc PLMD::LinkCells::mypbc
private

The pbc we are using for link cells.

◆ ncells

std::vector<unsigned> PLMD::LinkCells::ncells
private

The number of cells in each direction.

◆ nstride

std::vector<unsigned> PLMD::LinkCells::nstride
private

The number of cells to stride through to get the link cells.


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