Gromacs  2026.0-dev-20241106-9ba7f4d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Friends
gmx::EnergyGroupsPerCluster Class Reference

#include <gromacs/nbnxm/simd_energy_accumulator.h>

Description

Holds energy group indices for use in EnergyAccumulator<true, true>

Public Member Functions

 EnergyGroupsPerCluster (int numEnergyGroups, int iClusterSize)
 Constructor. More...
 
void setEnergyGroups (ArrayRef< const int > energyGroups)
 
void setEnergyGroups (ArrayRef< const int > indices, ArrayRef< const int32_t > atomInfo, const int mask, const int clusterOffset)
 Sets (part of) the energy groups starting at offset using indices. More...
 
void resizeEnergyGroups (int numAtoms)
 Reallocate the buffer.
 
int getEnergyGroup (int iCluster, int atomIndexInCluster)
 Returns the energy group for atom atomIndexInCluster in i-cluster iCLuster.
 

Friends

void EnergyAccumulator (const EnergyGroupsPerCluster &energyGroupsPerCluster)
 

Constructor & Destructor Documentation

gmx::EnergyGroupsPerCluster::EnergyGroupsPerCluster ( int  numEnergyGroups,
int  iClusterSize 
)

Constructor.

Parameters
numEnergyGroupsThe number of non-bonded energy groups
iClusterSizeThe size in atoms of an i-cluster

Member Function Documentation

void gmx::EnergyGroupsPerCluster::setEnergyGroups ( ArrayRef< const int >  energyGroups)

Sets all energy groups for a direct list of energy groups

Parameters
[in]energyGroupsList of energy groups, size should a multiple of the i-cluster size
void gmx::EnergyGroupsPerCluster::setEnergyGroups ( ArrayRef< const int >  indices,
ArrayRef< const int32_t >  atomInfo,
const int  mask,
const int  clusterOffset 
)
inline

Sets (part of) the energy groups starting at offset using indices.

Note that entries of indices are allowed to be -1, those get assigned energy group 0.

Parameters
[in]indicesAtom indices to set the energy groups for, size should be a multiple of the i-cluster size
[in]atomInfoList of atom info which should cover at least all indexed atoms
[in]maskMask to extract the energy group from an entry in atomInfo
[in]clusterOffsetThe cluster offset from where to start storing the energy groups

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