Loading...
Searching...
No Matches
CellList.h
Go to the documentation of this file.
1// Emacs: This is -*- C++ -*-
2
3#include "Vec.h"
4#include <vector>
5using std::vector;
6
7class Atoms;
8class SuperCell;
9struct Image;
10
12
18
19class CellList {
20public:
21 CellList(Atoms *a, double rMax);
22 void MakeNeighborList(int neighborList[], int indices[], int &nMax,
23 vector<Image> &images);
24 int GetNeighbors(Vec point, int *neighbors, int size) const;
25 bool AnyNeighbors(Vec point) const;
26
27private:
28 int nAtoms;
30 double rMax;
31 double rMax2;
33 int nCells[3];
37 const double *superCellHeights;
38 const bool *periodic;
39 vector<vector<int>> cells;
40 vector<int> cellIndices;
41};
The main list of atoms class.
Definition Atoms.h:36
Vec * positions
Definition CellList.h:35
const double * superCellHeights
Definition CellList.h:37
const bool * periodic
Definition CellList.h:38
int nTotalCells[4]
Definition CellList.h:34
double rMax
Definition CellList.h:30
Vec size
Definition CellList.h:32
void MakeNeighborList(int neighborList[], int indices[], int &nMax, vector< Image > &images)
int nAtoms
Definition CellList.h:28
double rMax2
Definition CellList.h:31
int GetNeighbors(Vec point, int *neighbors, int size) const
vector< int > cellIndices
Definition CellList.h:40
bool AnyNeighbors(Vec point) const
const SuperCell * superCell
Definition CellList.h:36
vector< vector< int > > cells
Definition CellList.h:39
CellList(Atoms *a, double rMax)
int nCells[3]
Definition CellList.h:33
int nAllAtoms
Definition CellList.h:29
Vec minimum
Definition CellList.h:32
The SuperCell defines the size, shape and boundary condx of a simulation.
Definition SuperCell.h:20
A 3-vector useful for postions etc.
Definition Vec.h:18
Represents atoms seen through the periodic boundaries.
Definition Image.h:7