votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::PeriodicCells Class Reference

Periodic orthorhombic cell list for neighbour searches. More...

#include <stochasticnetwork.h>

Collaboration diagram for votca::xtp::PeriodicCells:

Public Member Functions

 PeriodicCells (const Eigen::Vector3d &box, double radius, const std::vector< Eigen::Vector3d > &points)
 box lengths and the largest search radius used with Within()
Eigen::Vector3d Connection (const Eigen::Vector3d &r1, const Eigen::Vector3d &r2) const
 shortest periodic connection r2 - r1
void Within (const Eigen::Vector3d &p, double radius, const std::function< void(Index, const Eigen::Vector3d &, double)> &f) const
std::vector< Index > Nearest (Index i, Index l) const
std::vector< Index > NearestTo (const Eigen::Vector3d &p, Index l) const
 indices of the l points nearest to any position p
Index NumberOfPoints () const

Private Member Functions

Index CellIndex (const Eigen::Vector3d &p, std::array< Index, 3 > &c) const
template<class F>
void Shell (const std::array< Index, 3 > &c, Index s, F &&f) const

Private Attributes

Eigen::Vector3d box_
std::array< Index, 3 > n_
Eigen::Vector3d cell_
const std::vector< Eigen::Vector3d > & points_
std::vector< Index > start_
std::vector< Index > members_

Detailed Description

Periodic orthorhombic cell list for neighbour searches.

Definition at line 74 of file stochasticnetwork.h.

Constructor & Destructor Documentation

◆ PeriodicCells()

votca::xtp::PeriodicCells::PeriodicCells ( const Eigen::Vector3d & box,
double radius,
const std::vector< Eigen::Vector3d > & points )

box lengths and the largest search radius used with Within()

Definition at line 100 of file stochasticnetwork.cc.

Member Function Documentation

◆ CellIndex()

Index votca::xtp::PeriodicCells::CellIndex ( const Eigen::Vector3d & p,
std::array< Index, 3 > & c ) const
private

Definition at line 141 of file stochasticnetwork.cc.

◆ Connection()

Eigen::Vector3d votca::xtp::PeriodicCells::Connection ( const Eigen::Vector3d & r1,
const Eigen::Vector3d & r2 ) const

shortest periodic connection r2 - r1

Definition at line 174 of file stochasticnetwork.cc.

◆ Nearest()

std::vector< Index > votca::xtp::PeriodicCells::Nearest ( Index i,
Index l ) const

indices of the l points nearest to point i (including i itself), ties broken by index

Definition at line 214 of file stochasticnetwork.cc.

◆ NearestTo()

std::vector< Index > votca::xtp::PeriodicCells::NearestTo ( const Eigen::Vector3d & p,
Index l ) const

indices of the l points nearest to any position p

Definition at line 218 of file stochasticnetwork.cc.

◆ NumberOfPoints()

Index votca::xtp::PeriodicCells::NumberOfPoints ( ) const
inline

Definition at line 92 of file stochasticnetwork.h.

◆ Shell()

template<class F>
void votca::xtp::PeriodicCells::Shell ( const std::array< Index, 3 > & c,
Index s,
F && f ) const
private

Definition at line 152 of file stochasticnetwork.cc.

◆ Within()

void votca::xtp::PeriodicCells::Within ( const Eigen::Vector3d & p,
double radius,
const std::function< void(Index, const Eigen::Vector3d &, double)> & f ) const

calls f(j, connection, distance) for all points within radius of p (radius <= the radius given at construction)

Definition at line 191 of file stochasticnetwork.cc.

Member Data Documentation

◆ box_

Eigen::Vector3d votca::xtp::PeriodicCells::box_
private

Definition at line 95 of file stochasticnetwork.h.

◆ cell_

Eigen::Vector3d votca::xtp::PeriodicCells::cell_
private

Definition at line 97 of file stochasticnetwork.h.

◆ members_

std::vector<Index> votca::xtp::PeriodicCells::members_
private

Definition at line 100 of file stochasticnetwork.h.

◆ n_

std::array<Index, 3> votca::xtp::PeriodicCells::n_
private

Definition at line 96 of file stochasticnetwork.h.

◆ points_

const std::vector<Eigen::Vector3d>& votca::xtp::PeriodicCells::points_
private

Definition at line 98 of file stochasticnetwork.h.

◆ start_

std::vector<Index> votca::xtp::PeriodicCells::start_
private

Definition at line 99 of file stochasticnetwork.h.


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