Gromacs  2021.3
 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)
 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, const t_mdatoms &mdatoms)
 Set VSites and distribute VSite work over threads, should be called after DD partitioning.
 
void construct (ArrayRef< RVec > x, real dt, ArrayRef< RVec > v, const matrix box) 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,
real  dt,
ArrayRef< RVec v,
const matrix  box 
) const

Create positions of vsite atoms based for the local system.

Parameters
[in,out]xThe coordinates
[in]dtThe time step
[in,out]vWhen != nullptr, velocities for vsites are set as displacement/dt
[in]boxThe box
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: