Gromacs
2022.2
|
#include <gromacs/listed_forces/listed_forces_gpu_impl.h>
Implements GPU bondeds.
Public Member Functions | |
Impl (const gmx_ffparams_t &ffparams, float electrostaticsScaleFactor, const DeviceContext &deviceContext, const DeviceStream &deviceStream, gmx_wallcycle *wcycle) | |
Constructor. | |
~Impl () | |
Destructor, non-default needed for freeing device-side buffers. | |
void | updateInteractionListsAndDeviceBuffers (ArrayRef< const int > nbnxnAtomOrder, const InteractionDefinitions &idef, void *xqDevice, DeviceBuffer< RVec > forceDevice, DeviceBuffer< RVec > fshiftDevice) |
Update lists of interactions from idef suitable for the GPU, using the data structures prepared for PP work. More... | |
void | setPbc (PbcType pbcType, const matrix box, bool canMoleculeSpanPbc) |
Update PBC data. More... | |
template<bool calcVir, bool calcEner> | |
void | launchKernel () |
Launches bonded kernel on a GPU. | |
bool | haveInteractions () const |
Returns whether there are bonded interactions assigned to the GPU. | |
void | launchEnergyTransfer () |
Launches the transfer of computed bonded energies. | |
void | waitAccumulateEnergyTerms (gmx_enerdata_t *enerd) |
Waits on the energy transfer, and accumulates bonded energies to enerd . | |
void | clearEnergies () |
Clears the device side energy buffer. | |
void gmx::ListedForcesGpu::Impl::setPbc | ( | PbcType | pbcType, |
const matrix | box, | ||
bool | canMoleculeSpanPbc | ||
) |
void gmx::ListedForcesGpu::Impl::updateInteractionListsAndDeviceBuffers | ( | ArrayRef< const int > | nbnxnAtomOrder, |
const InteractionDefinitions & | idef, | ||
void * | xqDevice, | ||
DeviceBuffer< RVec > | forceDevice, | ||
DeviceBuffer< RVec > | fshiftDevice | ||
) |
Update lists of interactions from idef suitable for the GPU, using the data structures prepared for PP work.
Intended to be called after each neighbour search stage. Copies the bonded interactions assigned to the GPU to device data structures, and updates device buffers that may have been updated after search.