OpenMD 3.0
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 63 of file PairList.hpp.

Constructor & Destructor Documentation

◆ PairList()

OpenMD::PairList::PairList ( )
inline

Definition at line 65 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 68 of file PairList.cpp.

Referenced by OpenMD::SimInfo::addInteractionPairs().

◆ 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 95 of file PairList.cpp.

◆ addPairs() [2/2]

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

Definition at line 84 of file PairList.cpp.

◆ getPairList()

int * OpenMD::PairList::getPairList ( )

Returns the pairs in a plain array.

Definition at line 53 of file PairList.cpp.

◆ getSize()

int OpenMD::PairList::getSize ( )

Returns the number of pairs in the list.

Definition at line 152 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 140 of file PairList.cpp.

◆ removePair()

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

Remove a pair from PairList class.

Definition at line 104 of file PairList.cpp.

Referenced by OpenMD::SimInfo::removeInteractionPairs().

◆ 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 131 of file PairList.cpp.

◆ removePairs() [2/2]

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

Definition at line 120 of file PairList.cpp.

Friends And Related Symbol Documentation

◆ operator<<

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

write out the exclusion list to an ostream

Definition at line 154 of file PairList.cpp.


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