Template Class CellLists#
Defined in File cell_lists.hpp
Class Documentation#
-
template<typename distance_policy = periodic_distance<3>>
class CellLists# cell list currently only work with box of equal side lengths cell lists are currently not implemented for non cubic boxes: in that case m_ncellx should be an array rather than a scalar and the definition of ncells and rcell would change to array.
This implies that in all the function these would need to be replace with the correct array element. This adds room for errors so in this first implementation we do not account for that scenario
Public Functions
-
inline ~CellLists()#
- std::shared_ptr<distance_policy> const &dist,
- pele::Array<double> const &boxv,
- const double rcut,
- const double ncellx_scale = 1.0,
- const bool balance_omp = true
constructor
ncellx_scale scales the number of cells. The number of cells in each direction is computed from ncellx_scale * box_length / rcut
-
template<class callback_class>
inline CellListsLoop<callback_class, distance_policy> get_atom_pair_looper( - callback_class &callback
return the class which loops over the atom pairs with a callback function
-
inline size_t get_nr_cells() const#
return the total number of cells
-
inline size_t get_nr_cellsx() const#
return the number of cells in the x direction
Public Static Attributes
-
static const size_t m_ndim = distance_policy::_ndim#
Protected Functions
-
void print_warnings(const size_t natoms)#
-
void build_cell_neighbors_list()#
build the list of neighboring cells.
-
void reset_container(pele::Array<double> const &coords)#
remove all atoms and re-add them to the right cells according to the new coordinates
Protected Attributes
-
bool m_initialized#
-
pele::LatticeNeighbors<distance_policy> m_lattice_tool#
-
std::vector<SafePushQueue<std::array<size_t, 2>>> add_atom_queue#
-
CellListsContainer<m_ndim> m_container#
m_container is the class which hold the actual cell lists
it also manages iterating through the pairs of atoms
-
inline ~CellLists()#