Generalize IForceProvider
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 25 Jun 2017 14:24:01 +0000 (17:24 +0300)
committerErik Lindahl <erik.lindahl@gmail.com>
Thu, 29 Jun 2017 17:46:49 +0000 (19:46 +0200)
commitd4f0fd5ba8fd8c4918112bbba15013178dac04a9
tree7294fe52975a3bcad9cb09756f1555fc885cf622
parentb6ca71b4537244544c25e57c858fd8bf13abd97b
Generalize IForceProvider

- Remove knowledge of individual modules from t_forcerec, and hide the
  number of modules, and whether they contribute to a virial or not,
  behind a generic interface.
- Improve hard-to-understand initialization of separate f_novirsum,
  resolving some TODOs.
- Add some parameters that probably make sense for other modules beyond
  the electric field one.

This also makes the requirement for all modules to have the same
parameters for the calculateForces() call explicit.

Change-Id: I4952515c4b707ba458fd267565fd000532ec281e
13 files changed:
docs/doxygen/lib/mdmodules.md
src/gromacs/applied-forces/electricfield.cpp
src/gromacs/applied-forces/tests/electricfield.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdrunutility/mdmodules.cpp
src/gromacs/mdrunutility/mdmodules.h
src/gromacs/mdtypes/forcerec.h
src/gromacs/mdtypes/iforceprovider.cpp [new file with mode: 0644]
src/gromacs/mdtypes/iforceprovider.h
src/gromacs/mdtypes/imdmodule.h
src/programs/mdrun/runner.cpp