OpenMD 3.2
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::PairList Class Reference

PairList class maintains a general purpose list of atom pairs using the global indices of the atoms. More...

#include "brains/PairList.hpp"

Public Member Functions

void addPair (int i, int j)
 Adds a pair into this PairList class.
void addPairs (std::set< int > &set1, std::set< int > &set2)
template<typename IterType1, typename IterType2>
void addPairs (IterType1 iter1_first, IterType1 iter1_last, IterType2 iter2_first, IterType2 iter2_last)
void removePair (int i, int j)
 Remove a pair from PairList class.
void removePairs (std::set< int > &set1, std::set< int > &set2)
template<typename IterType1, typename IterType2>
void removePairs (IterType1 iter1_first, IterType1 iter1_last, IterType2 iter2_first, IterType2 iter2_last)
bool hasPair (int i, int j)
 Checks whether pair (i, j) is in this PairList class.
int getSize ()
 Returns the number of pairs in the list.
int getSizeOfPairList ()
 Returns the size of PairList.
int * getPairList ()
 Returns the pairs in a plain array.

Friends

std::ostream & operator<< (std::ostream &o, PairList &e)
 write out the exclusion list to an ostream

Detailed Description

PairList class maintains a general purpose list of atom pairs using the global indices of the atoms.

This structure is the general form for exclude lists as well as 1-4, 1-3, and 1-2 lists.

Definition at line 66 of file PairList.hpp.

Constructor & Destructor Documentation

◆ PairList()

OpenMD::PairList::PairList ( )
inline

Definition at line 68 of file PairList.hpp.

Member Function Documentation

◆ addPair()

void OpenMD::PairList::addPair ( int i,
int j )

Adds a pair into this PairList class.

Definition at line 71 of file PairList.cpp.

◆ addPairs() [1/2]

template<typename IterType1, typename IterType2>
void OpenMD::PairList::addPairs ( IterType1 iter1_first,
IterType1 iter1_last,
IterType2 iter2_first,
IterType2 iter2_last )

Definition at line 98 of file PairList.cpp.

◆ addPairs() [2/2]

void OpenMD::PairList::addPairs ( std::set< int > & set1,
std::set< int > & set2 )

Definition at line 87 of file PairList.cpp.

◆ getPairList()

int * OpenMD::PairList::getPairList ( )

Returns the pairs in a plain array.

Definition at line 56 of file PairList.cpp.

◆ getSize()

int OpenMD::PairList::getSize ( )

Returns the number of pairs in the list.

Definition at line 155 of file PairList.cpp.

◆ hasPair()

bool OpenMD::PairList::hasPair ( int i,
int j )

Checks whether pair (i, j) is in this PairList class.

Definition at line 143 of file PairList.cpp.

Referenced by OpenMD::ForceMatrixDecomposition::distributeInitialData().

◆ removePair()

void OpenMD::PairList::removePair ( int i,
int j )

Remove a pair from PairList class.

Definition at line 107 of file PairList.cpp.

◆ removePairs() [1/2]

template<typename IterType1, typename IterType2>
void OpenMD::PairList::removePairs ( IterType1 iter1_first,
IterType1 iter1_last,
IterType2 iter2_first,
IterType2 iter2_last )

Definition at line 134 of file PairList.cpp.

◆ removePairs() [2/2]

void OpenMD::PairList::removePairs ( std::set< int > & set1,
std::set< int > & set2 )

Definition at line 123 of file PairList.cpp.

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
PairList & e )
friend

write out the exclusion list to an ostream

Definition at line 157 of file PairList.cpp.

References operator<<.

Referenced by operator<<.


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