Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::ForceWithShiftForces Class Reference

#include <gromacs/mdtypes/forceoutput.h>

Description

Container for force and virial for algorithms that compute shift forces for virial calculation.

This force output class should be used when computing forces whos virial contribution is computed using the "single sum virial" algorithm (see the reference manual for details). To handle the virial contributions of forces working between periodic images correctly, so-called "shift forces" need to be accumulated for the different periodic images.

Public Member Functions

 ForceWithShiftForces (const gmx::ArrayRefWithPadding< gmx::RVec > &force, const bool computeVirial, const gmx::ArrayRef< gmx::RVec > &shiftForces)
 Constructor. More...
 
gmx::ArrayRef< gmx::RVecforce ()
 Returns an arrayref to the force buffer without padding.
 
gmx::ArrayRef< const gmx::RVecforce () const
 Returns a const arrayref to the force buffer without padding.
 
bool computeVirial () const
 Returns whether the virial needs to be computed.
 
gmx::ArrayRef< gmx::RVecshiftForces ()
 Returns the shift forces buffer.
 
gmx::ArrayRef< const gmx::RVecshiftForces () const
 Returns a const shift forces buffer.
 
bool & haveSpreadVsiteForces ()
 Returns a reference to the boolean which tells whether we have spread forces on vsites.
 

Constructor & Destructor Documentation

gmx::ForceWithShiftForces::ForceWithShiftForces ( const gmx::ArrayRefWithPadding< gmx::RVec > &  force,
const bool  computeVirial,
const gmx::ArrayRef< gmx::RVec > &  shiftForces 
)
inline

Constructor.

Parameters
[in]forceA force buffer that will be used for storing forces
[in]computeVirialTrue when algorithms are required to provide their virial contribution (for the current force evaluation)
[in]shiftForcesA shift forces buffer of size c_numShiftVectors, only used with computeVirial = true

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