votca 2024-dev
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Member Functions | Protected Attributes | List of all members
votca::csg::NBList_3Body Class Reference

Neighbour list class for 3 body interactions. More...

#include <nblist_3body.h>

Inheritance diagram for votca::csg::NBList_3Body:
Inheritance graph
[legend]
Collaboration diagram for votca::csg::NBList_3Body:
Collaboration graph
[legend]

Classes

class  Functor
 
class  FunctorMember
 Functor for member functions. More...
 
class  FunctorNonMember
 Functor for non-member functions. More...
 

Public Member Functions

 NBList_3Body ()
 
 ~NBList_3Body () override
 
virtual void Generate (BeadList &list1, BeadList &list2, BeadList &list3, bool do_exclusions=true)
 
virtual void Generate (BeadList &list1, BeadList &list2, bool do_exclusions=true)
 
virtual void Generate (BeadList &list, bool do_exclusions=true)
 
void setCutoff (const double cutoff)
 
double getCutoff ()
 get the cutoff for the neighbour search
 
template<typename T >
void SetMatchFunction (T *object, bool(T::*fkt)(Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &, const double dist12, const double dist13, const double dist23))
 match function for class member functions
 
void SetMatchFunction (bool(*fkt)(Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &, const double dist12, const double dist13, const double dist23))
 match function for static member functions or plain functions
 
template<typename triple_type >
void setTripleType ()
 function to use a user defined triple type
 
- Public Member Functions inherited from votca::csg::TripleList< Bead *, BeadTriple >
 TripleList ()=default
 
virtual ~TripleList ()
 
void AddTriple (BeadTriple *t)
 
iterator begin ()
 
iterator end ()
 
std::vector< BeadTriple * >::size_type size ()
 
BeadTriplefront ()
 
BeadTripleback ()
 
bool empty ()
 
void Cleanup ()
 
BeadTripleFindTriple (Bead * e1, Bead * e2, Bead * e3)
 

Static Public Member Functions

static bool match_always (Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &, const double, const double, const double)
 standard match function
 

Protected Types

using triple_creator_t = BeadTriple *(*)(Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &)
 

Static Protected Member Functions

template<typename triple_type >
static BeadTriplebeadtriple_create_policy (Bead *bead1, Bead *bead2, Bead *bead3, const Eigen::Vector3d &r12, const Eigen::Vector3d &r13, const Eigen::Vector3d &r23)
 policy function to create new bead types
 

Protected Attributes

double cutoff_
 cutoff (at the moment use only one cutoff value)
 
bool do_exclusions_
 take into account exclusions from topolgoy
 
triple_creator_t triple_creator_
 the current bead pair creator function
 
std::unique_ptr< Functormatch_function_
 

Additional Inherited Members

- Public Types inherited from votca::csg::TripleList< Bead *, BeadTriple >
using iterator = typename std::vector< BeadTriple * >::iterator
 
using element_t = Bead *
 
using triple_t = BeadTriple
 

Detailed Description

Neighbour list class for 3 body interactions.

Implements a simple N^3 neighbour search and stores 3body neigbourlist with triple structure.

User defined criteria can be added by SetMatchFunction. To only get every pair listed once, the SetMatchFunction can be used and always return that the pair is not stored.

Definition at line 42 of file nblist_3body.h.

Member Typedef Documentation

◆ triple_creator_t

using votca::csg::NBList_3Body::triple_creator_t = BeadTriple *(*)(Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &)
protected

Definition at line 126 of file nblist_3body.h.

Constructor & Destructor Documentation

◆ NBList_3Body()

votca::csg::NBList_3Body::NBList_3Body ( )

Definition at line 28 of file nblist_3body.cc.

◆ ~NBList_3Body()

votca::csg::NBList_3Body::~NBList_3Body ( )
overridedefault

Member Function Documentation

◆ beadtriple_create_policy()

template<typename triple_type >
static BeadTriple * votca::csg::NBList_3Body::beadtriple_create_policy ( Bead bead1,
Bead bead2,
Bead bead3,
const Eigen::Vector3d &  r12,
const Eigen::Vector3d &  r13,
const Eigen::Vector3d &  r23 
)
inlinestaticprotected

policy function to create new bead types

Definition at line 117 of file nblist_3body.h.

◆ Generate() [1/3]

virtual void votca::csg::NBList_3Body::Generate ( BeadList list,
bool  do_exclusions = true 
)
inlinevirtual

Generate the 3body neighbour list based on a single bead list (nblist will have the structure bead type 1, bead type 1, bead type 1)

Reimplemented in votca::csg::NBListGrid_3Body.

Definition at line 60 of file nblist_3body.h.

◆ Generate() [2/3]

void votca::csg::NBList_3Body::Generate ( BeadList list1,
BeadList list2,
BeadList list3,
bool  do_exclusions = true 
)
virtual

Generate the 3body neighbour list based on three bead lists (e.g. bead types)

experimental: at the moment exclude interaction as soon as one of the three pairs (1,2) (1,3) (2,3) is excluded!

Reimplemented in votca::csg::NBListGrid_3Body.

Definition at line 35 of file nblist_3body.cc.

◆ Generate() [3/3]

virtual void votca::csg::NBList_3Body::Generate ( BeadList list1,
BeadList list2,
bool  do_exclusions = true 
)
inlinevirtual

Generate the 3body neighbour list based on two bead lists (e.g. bead types) Experimental: here the second and the third bead list are the same (nblist will have the structure bead type 1, bead type 2, bead type 2)

Reimplemented in votca::csg::NBListGrid_3Body.

Definition at line 54 of file nblist_3body.h.

◆ getCutoff()

double votca::csg::NBList_3Body::getCutoff ( )
inline

get the cutoff for the neighbour search

Definition at line 68 of file nblist_3body.h.

◆ match_always()

static bool votca::csg::NBList_3Body::match_always ( Bead ,
Bead ,
Bead ,
const Eigen::Vector3d &  ,
const Eigen::Vector3d &  ,
const Eigen::Vector3d &  ,
const double  ,
const double  ,
const double   
)
inlinestatic

standard match function

Definition at line 99 of file nblist_3body.h.

◆ setCutoff()

void votca::csg::NBList_3Body::setCutoff ( const double  cutoff)
inline

set the cutoff for the neighbour search to do: at the moment use only one single cutoff value

Definition at line 66 of file nblist_3body.h.

◆ SetMatchFunction() [1/2]

void votca::csg::NBList_3Body::SetMatchFunction ( bool(*)(Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &, const double dist12, const double dist13, const double dist23)  fkt)
inline

match function for static member functions or plain functions

Definition at line 205 of file nblist_3body.h.

◆ SetMatchFunction() [2/2]

template<typename T >
void votca::csg::NBList_3Body::SetMatchFunction ( T *  object,
bool(T::*)(Bead *, Bead *, Bead *, const Eigen::Vector3d &, const Eigen::Vector3d &, const Eigen::Vector3d &, const double dist12, const double dist13, const double dist23)  fkt 
)
inline

match function for class member functions

SetMatchFunction can be used to specify additional criteria, weather three beads are added to the list of triples or not. The function gets the three beads and the distance vectors between the beads as argument. If a triple should be added, the function should return true, otherwise false.

This function can also be used, in a situation where each triple needs only to be processed once, but the total number of triples is to big to be stored in memory, e.g. to calculate rdf for huge systems. In this case, set a match function which always returns false (->no triple is added), and do the processing in the match function.

Definition at line 196 of file nblist_3body.h.

◆ setTripleType()

template<typename triple_type >
void votca::csg::NBList_3Body::setTripleType

function to use a user defined triple type

Definition at line 191 of file nblist_3body.h.

Member Data Documentation

◆ cutoff_

double votca::csg::NBList_3Body::cutoff_
protected

cutoff (at the moment use only one cutoff value)

Definition at line 111 of file nblist_3body.h.

◆ do_exclusions_

bool votca::csg::NBList_3Body::do_exclusions_
protected

take into account exclusions from topolgoy

Definition at line 113 of file nblist_3body.h.

◆ match_function_

std::unique_ptr<Functor> votca::csg::NBList_3Body::match_function_
protected

Definition at line 187 of file nblist_3body.h.

◆ triple_creator_

triple_creator_t votca::csg::NBList_3Body::triple_creator_
protected

the current bead pair creator function

Definition at line 131 of file nblist_3body.h.


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