Gromacs  2025-dev-20240812-545ca5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
nbnxn_atomdata_output_t Struct Reference

#include <gromacs/nbnxm/atomdata.h>

Description

Struct that holds force and energy output buffers.

Public Member Functions

 nbnxn_atomdata_output_t (Nbnxm::KernelType kernelType, int numEnergyGroups, gmx::PinningPolicy pinningPolicy)
 Constructor. More...
 
 nbnxn_atomdata_output_t (nbnxn_atomdata_output_t &&) noexcept
 Move constructor.
 
 ~nbnxn_atomdata_output_t ()
 Destructor. More...
 

Public Attributes

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

Constructor & Destructor Documentation

nbnxn_atomdata_output_t::nbnxn_atomdata_output_t ( Nbnxm::KernelType  kernelType,
int  numEnergyGroups,
gmx::PinningPolicy  pinningPolicy 
)

Constructor.

Parameters
[in]kernelTypeType of non-bonded kernel
[in]numEnergyGroupsThe number of energy groups
[in]pinningPolicySets the pinning policy for all buffers used on the GPU
nbnxn_atomdata_output_t::~nbnxn_atomdata_output_t ( )
default
Initial value:
{ pinningPolicy }),
fshift({}, { pinningPolicy }),
Vvdw({}, { pinningPolicy }),
Vc({}, { pinningPolicy })
{
fshift.resize(gmx::c_numShiftVectors * DIM);
Vvdw.resize(numEnergyGroups * numEnergyGroups);
Vc.resize(numEnergyGroups * numEnergyGroups);
{
if (numEnergyGroups == 1)
{
accumulatorSingleEnergies = std::make_unique<EnergyAccumulator<false, true>>();
}
else
{
const int c_iClusterSize = Nbnxm::sc_iClusterSize(kernelType);
const int c_jClusterSize = Nbnxm::sc_jClusterSize(kernelType);
accumulatorGroupEnergies = std::make_unique<EnergyAccumulator<true, true>>(
numEnergyGroups, c_iClusterSize, c_jClusterSize);
}
}
}
Struct that holds force and energy output buffers.
Definition: atomdata.h:117
gmx::HostVector< real > Vvdw
Temporary Van der Waals group energy storage.
Definition: atomdata.h:139
static constexpr int sc_iClusterSize(const KernelType kernelType)
The nbnxn i-cluster size in atoms for the given NBNxM kernel type.
Definition: nbnxm_geometry.h:75
gmx::HostVector< real > Vc
Temporary Coulomb group energy storage.
Definition: atomdata.h:141
std::unique_ptr< gmx::EnergyAccumulator< true, true > > accumulatorGroupEnergies
Accumulator for energy output with multiple energy groups.
Definition: atomdata.h:146
static constexpr int sc_jClusterSize(const KernelType kernelType)
The nbnxn j-cluster size in atoms for the given NBNxM kernel type.
Definition: nbnxm_geometry.h:96
std::unique_ptr< gmx::EnergyAccumulator< false, true > > accumulatorSingleEnergies
Accumulator for energy output with a single energy group.
Definition: atomdata.h:144
nbnxn_atomdata_output_t(Nbnxm::KernelType kernelType, int numEnergyGroups, gmx::PinningPolicy pinningPolicy)
Constructor.
Definition: atomdata.cpp:114
gmx::HostVector< real > fshift
Shift force array, size c_numShiftVectors*DIM.
Definition: atomdata.h:137

Destructor.


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