Gromacs
2021-beta2-UNCHECKED
|
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... | |
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.
[in,out] | x | The coordinates |
[in] | dt | The time step |
[in,out] | v | When != nullptr, velocities for vsites are set as displacement/dt |
[in] | box | The 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.