Gromacs  2026.0-dev-20241213-9ac17bb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
t_nblist Class Reference

#include <gromacs/mdtypes/nblist.h>

Description

A plain atom pair list, used only for perturbed non-bonded interactions.

A list of atom pairs stored as list of so-called j-atoms for each i-atom in the list. The list is constructed by calling addIEntry() and specifying a maximum number of j-entries that can be added. Then addJEntry() can be called to add j-atoms. For performance it can be good to call popIEntryWhenEmpty() after potentially adding j-atoms, to remove empty i-entries.

Classes

struct  IEntry
 An i-entry. More...
 
struct  JEntry
 A j-entry. More...
 

Public Member Functions

void addIEntry (const IEntry &iEntry, int maxJEntries)
 Adds a new i-entry with space for at most maxJEntries j-entries. More...
 
void addJEntry (const JEntry &jEntry)
 Adds a j-entry for the last i-entry.
 
void popIEntryWhenEmpty ()
 Checks whether the last i-entry has no j-entries and if so removes it.
 
void clear ()
 Clears the pair list.
 
gmx::ArrayRef< const IEntryiList () const
 Returns the list of i-entries.
 
gmx::ArrayRef< const JEntryjList (gmx::Index iEntry) const
 Returns the list of j-entries for i-entry iEntry.
 
gmx::ArrayRef< const JEntryflatJList () const
 Returns a concatenated list of all j-entries for all i-entries.
 
int numExclusionsWithinRlist () const
 Returns the number of excluded pairs within rlist at list creation.
 

Member Function Documentation

void t_nblist::addIEntry ( const IEntry iEntry,
int  maxJEntries 
)
inline

Adds a new i-entry with space for at most maxJEntries j-entries.

Note that this will replace the last entry instead when that is empty, i.e. has an empty list of j-entries.


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