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...
 
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

Communicatorcomm
 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

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

Member Function Documentation

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

Build the link cell lists.

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

Have the link cells been enabled.

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

Find the cell in which this position is contained.

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

Find the cell in which this position is contained.

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

Find a list of relevant atoms.

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

Set the value of the cutoff.

Member Data Documentation

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

The list of cells each atom is inside.

Communicator& PLMD::LinkCells::comm
private

Symbolic link to plumed communicator.

bool PLMD::LinkCells::cutoffwasset
private

Check that the link cells were set up correctly.

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

The atoms ordered by link cells.

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

The start of each block corresponding to each link cell.

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

The number of atoms in each link cell.

double PLMD::LinkCells::link_cutoff
private

The cutoff to use for the sizes of the cells.

Pbc PLMD::LinkCells::mypbc
private

The pbc we are using for link cells.

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

The number of cells in each direction.

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: