Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::IForceProvider Class Referenceabstract

#include <gromacs/mdtypes/iforceprovider.h>

Description

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.

Todo:
Extend this interface with a virial container and flag if the virial is needed here

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...
 

Member Function Documentation

virtual void gmx::IForceProvider::calculateForces ( const t_commrec *  cr,
const t_mdatoms mdatoms,
const matrix  box,
double  t,
const rvec *  x,
gmx::ForceWithVirial forceWithVirial 
)
pure virtual

Computes forces.

Parameters
[in]crCommunication record for parallel operations
[in]mdatomsAtom information
[in]boxThe box
[in]tThe actual time in the simulation (ps)
[in]xThe coordinates
[in,out]forceWithVirialThe forces and virial

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