Gromacs
2024.4
|
#include <gromacs/mdtypes/forcerec.h>
Helper force buffers for ForceOutputs.
This class stores intermediate force buffers that are used internally in the force calculation and which are reduced into the output force buffer passed to the force calculation.
Public Member Functions | |
ForceHelperBuffers (bool haveDirectVirialContributions) | |
Constructs helper buffers. More... | |
bool | haveDirectVirialContributions () const |
Returns whether we have a direct virial contribution force buffer. | |
gmx::ArrayRef< gmx::RVec > | forceBufferForDirectVirialContributions () |
Returns the buffer for direct virial contributions. | |
gmx::ArrayRef< gmx::RVec > | shiftForces () |
Returns the buffer for shift forces, size c_numShiftVectors. | |
void | resize (int numAtoms) |
Resizes the direct virial contribution buffer, when present. | |
ForceHelperBuffers::ForceHelperBuffers | ( | bool | haveDirectVirialContributions | ) |
Constructs helper buffers.
When the forces that will be accumulated with help of these buffers have direct virial contributions, set the parameter to true, so an extra force buffer is available for these forces to enable correct virial computation.