Move foreign potential energy accumulation
authorBerk Hess <hess@kth.se>
Mon, 6 Jul 2020 15:14:31 +0000 (15:14 +0000)
committerChristian Blau <cblau.mail@gmail.com>
Mon, 6 Jul 2020 15:14:31 +0000 (15:14 +0000)
commitaf4703504734dd000872d1484e309220cecd8f08
treeb882ee6bf3e1dd2508b92c9212c0efa5ca966573
parent2f876de263efdf08daf160e7791434cd760ccd9b
Move foreign potential energy accumulation

The potential energy contributions to the foreign lambda
Hamiltonian differences were summed in sum_dhdl() which meant
that the foreign energy differences were not complete when
do_force() returns. Now there are summed in
accumulatePotentialEnergies() which is called instead of sum_epot().

Also consistently changed the lambda vector to ArrayRef in the force
routines and made it const.
14 files changed:
src/gromacs/gmxlib/nonbonded/nb_kernel.h
src/gromacs/listed_forces/listed_forces.cpp
src/gromacs/mdlib/enerdata_utils.cpp
src/gromacs/mdlib/enerdata_utils.h
src/gromacs/mdlib/force.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/mdrun/shellfc.cpp
src/gromacs/modularsimulator/energyelement.cpp
src/gromacs/nbnxm/kerneldispatch.cpp
src/gromacs/nbnxm/nbnxm.h