Gromacs
2018.8
|
#include <gromacs/mdtypes/iforceprovider.h>
Interface for a component that provides forces during MD.
Modules implementing IMDModule generally implement this internally, and use IMDModule::initForceProviders() to register their implementation in ForceProviders.
The interface most likely requires additional generalization for use in other modules than the current electric field implementation.
The forces that are produced by force providers are not taken into account in the calculation of the virial. When applicable, the provider should compute its own virial contribution.
Public Member Functions | |
virtual void | calculateForces (const t_commrec *cr, const t_mdatoms *mdatoms, const matrix box, double t, const rvec *x, gmx::ForceWithVirial *forceWithVirial)=0 |
Computes forces. More... | |
|
pure virtual |
Computes forces.
[in] | cr | Communication record for parallel operations |
[in] | mdatoms | Atom information |
[in] | box | The box |
[in] | t | The actual time in the simulation (ps) |
[in] | x | The coordinates |
[in,out] | forceWithVirial | The forces and virial |
Implemented in gmx::anonymous_namespace{electricfield.cpp}::ElectricField.