Gromacs  2027.0-dev-20261112-5a4f586
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
gmx::nbnxm_atomdata_output_t Struct Reference

#include <gromacs/nbnxm/atomdata.h>

Description

Struct that holds force and energy output buffers.

Public Member Functions

 nbnxm_atomdata_output_t (NbnxmKernelType kernelType, int numEnergyGroups, const HostAllocationPolicy &hostAllocationPolicy)
 Constructor. More...
 
 nbnxm_atomdata_output_t (nbnxm_atomdata_output_t &&) noexcept
 Move constructor.
 
 ~nbnxm_atomdata_output_t ()
 Destructor. More...
 

Public Attributes

HostVector< real > f
 f, size natoms*fstride
 
HostVector< real > fshift
 Shift force array, size c_numShiftVectors*DIM.
 
HostVector< real > Vvdw
 Temporary Van der Waals group energy storage.
 
HostVector< real > Vc
 Temporary Coulomb group energy storage.
 
std::unique_ptr
< EnergyAccumulator< false,
true > > 
accumulatorSingleEnergies
 Accumulator for energy output with a single energy group.
 
std::unique_ptr
< EnergyAccumulator< true,
true > > 
accumulatorGroupEnergies
 Accumulator for energy output with multiple energy groups.
 

Constructor & Destructor Documentation

gmx::nbnxm_atomdata_output_t::nbnxm_atomdata_output_t ( NbnxmKernelType  kernelType,
int  numEnergyGroups,
const HostAllocationPolicy &  hostAllocationPolicy 
)

Constructor.

Parameters
[in]kernelTypeType of non-bonded kernel
[in]numEnergyGroupsThe number of energy groups
[in]hostAllocationPolicySets the host allocation policy for all buffers used on the GPU
gmx::nbnxm_atomdata_output_t::~nbnxm_atomdata_output_t ( )
default
Initial value:
{ hostAllocationPolicy }),
fshift(c_numShiftVectors * DIM, { hostAllocationPolicy }),
Vvdw(numEnergyGroups * numEnergyGroups, { hostAllocationPolicy }),
Vc(numEnergyGroups * numEnergyGroups, { hostAllocationPolicy })
{
{
if (numEnergyGroups == 1)
{
accumulatorSingleEnergies = std::make_unique<EnergyAccumulator<false, true>>();
}
else
{
const int c_iClusterSize = sc_iClusterSize(kernelType);
const int c_jClusterSize = sc_jClusterSize(kernelType);
accumulatorGroupEnergies = std::make_unique<EnergyAccumulator<true, true>>(
numEnergyGroups, c_iClusterSize, c_jClusterSize);
}
}
}
static constexpr int sc_iClusterSize(const NbnxmKernelType kernelType)
The nbnxm i-cluster size in atoms for the given NBNxM kernel type.
Definition: nbnxm_geometry.h:73
HostVector< real > Vc
Temporary Coulomb group energy storage.
Definition: atomdata.h:135
nbnxm_atomdata_output_t(NbnxmKernelType kernelType, int numEnergyGroups, const HostAllocationPolicy &hostAllocationPolicy)
Constructor.
Definition: atomdata.cpp:116
HostVector< real > Vvdw
Temporary Van der Waals group energy storage.
Definition: atomdata.h:133
std::unique_ptr< EnergyAccumulator< false, true > > accumulatorSingleEnergies
Accumulator for energy output with a single energy group.
Definition: atomdata.h:138
static constexpr int sc_jClusterSize(const NbnxmKernelType kernelType)
The nbnxm j-cluster size in atoms for the given NBNxM kernel type.
Definition: nbnxm_geometry.h:93
std::unique_ptr< EnergyAccumulator< true, true > > accumulatorGroupEnergies
Accumulator for energy output with multiple energy groups.
Definition: atomdata.h:140
HostVector< real > fshift
Shift force array, size c_numShiftVectors*DIM.
Definition: atomdata.h:131

Destructor.


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