Gromacs  2026.0-dev-20241204-d69d709
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::VirtualSitesHandler::Impl Class Reference

Description

Impl class for VirtualSitesHandler.

Public Member Functions

 Impl (const gmx_mtop_t &mtop, gmx_domdec_t *domdec, PbcType pbcType, ArrayRef< const RangePartitioning > updateGroupingPerMoleculeType)
 Constructor, domdec should be nullptr without DD.
 
int numInterUpdategroupVirtualSites () const
 Returns the number of virtual sites acting over multiple update groups.
 
void setVirtualSites (ArrayRef< const InteractionList > ilist, int numAtoms, int homenr, ArrayRef< const ParticleType > ptype)
 Set VSites and distribute VSite work over threads, should be called after DD partitioning.
 
void construct (ArrayRef< RVec > x, ArrayRef< RVec > v, const matrix box, VSiteOperation operation) const
 Create positions of vsite atoms based for the local system. More...
 
void spreadForces (ArrayRef< const RVec > x, ArrayRef< RVec > f, VirialHandling virialHandling, ArrayRef< RVec > fshift, matrix virial, t_nrnb *nrnb, const matrix box, gmx_wallcycle *wcycle)
 Spread the force operating on the vsite atoms on the surrounding atoms. More...
 

Member Function Documentation

void gmx::VirtualSitesHandler::Impl::construct ( ArrayRef< RVec x,
ArrayRef< RVec v,
const matrix  box,
VSiteOperation  operation 
) const

Create positions of vsite atoms based for the local system.

Parameters
[in,out]xThe coordinates
[in,out]vThe velocities, needed if operation requires it
[in]boxThe box
[in]operationWhether we calculate positions, velocities, or both
void gmx::VirtualSitesHandler::Impl::spreadForces ( ArrayRef< const RVec x,
ArrayRef< RVec f,
VirialHandling  virialHandling,
ArrayRef< RVec fshift,
matrix  virial,
t_nrnb *  nrnb,
const matrix  box,
gmx_wallcycle *  wcycle 
)

Spread the force operating on the vsite atoms on the surrounding atoms.

vsite should point to a valid object. The virialHandling parameter determines how virial contributions are handled. If this is set to Linear, shift forces are accumulated into fshift. If this is set to NonLinear, non-linear contributions are added to virial. This non-linear correction is required when the virial is not calculated afterwards from the particle position and forces, but in a different way, as for instance for the PME mesh contribution.


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