pele
Python energy landscape explorer
 All Classes Namespaces Functions Variables Typedefs
Public Member Functions | Protected Attributes
pele::CellListsLoop< visitor_t > Class Template Reference

#include <cell_lists.h>

List of all members.

Public Member Functions

 CellListsLoop (visitor_t &visitor, CellListsContainer const &container)
void loop_through_atom_pairs ()

Protected Attributes

visitor_t & m_visitor
pele::Array< long > const m_ll
pele::Array< long > const m_hoc
std::vector< std::pair< size_t,
size_t > > const & 
m_cell_neighbor_pairs

Detailed Description

template<class visitor_t>
class pele::CellListsLoop< visitor_t >

this does the looping over atom pairs within the cell lists framework.

This uses the visitor design pattern, in the same way that the Boost graph uses visitors for, e.g., breadth_first_search. http://www.boost.org/doc/libs/1_56_0/boost/graph/breadth_first_search.hpp

The visitor is called for every pair of atoms in the system. It is meant to be used for, e.g. accumulating the energy or the gradient.

We use a template rather than an interface because the visitor will be called many times over a short period and the additional overhead of an interface might be a problem.

Definition at line 154 of file cell_lists.h.


Constructor & Destructor Documentation

template<class visitor_t>
pele::CellListsLoop< visitor_t >::CellListsLoop ( visitor_t &  visitor,
CellListsContainer const &  container 
) [inline]

Definition at line 162 of file cell_lists.h.


Member Function Documentation

template<class visitor_t>
void pele::CellListsLoop< visitor_t >::loop_through_atom_pairs ( ) [inline]

Definition at line 170 of file cell_lists.h.


Member Data Documentation

template<class visitor_t>
std::vector<std::pair<size_t, size_t> > const& pele::CellListsLoop< visitor_t >::m_cell_neighbor_pairs [protected]

Definition at line 159 of file cell_lists.h.

template<class visitor_t>
pele::Array<long> const pele::CellListsLoop< visitor_t >::m_hoc [protected]

Definition at line 158 of file cell_lists.h.

template<class visitor_t>
pele::Array<long> const pele::CellListsLoop< visitor_t >::m_ll [protected]

Definition at line 157 of file cell_lists.h.

template<class visitor_t>
visitor_t& pele::CellListsLoop< visitor_t >::m_visitor [protected]

Definition at line 156 of file cell_lists.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs