[gmx-users] Which variable represents the potential energy ?

David spoel at xray.bmc.uu.se
Sun Dec 7 21:53:01 CET 2003

On Sun, 2003-12-07 at 19:00, masakatsu-ito at aist.go.jp wrote:
> Hi, David.
> Thanks to your advice, my REM program seems to work well.  My REMD
> program, however, is not yet completely implemented, because I still
> cannot find a way to deal with an integrator in update() function of
> So I am trying to use my code instead of update() for integrating
> EOM. That is, my REMD framework would pass the atom positions to
> do_force() function of GROMACS, and would receive the the potential
> energy and force vector.  Then my framework integrates equations of
> motion with the Gaussian thermostatting technique.
> Now I am writing an adaptor function which transmit the atom positions
> and transfers the potential energy and force vector.  Most of this
> adaptor code is taken from do_md() function.
> So I have a favor to ask of you and any of GROMACS people.  Would you
> kindly tell me which part of do_md() is responsible for dealing with
> the periodic boundary condition? I think I have to shift an atom
> position when the atom happens to cross the boundary of a box. But I
> cannot find which function shift atom positions in do_md().

part of it is in force.c 
part of it is in update.c

I doubt whether your code should be doing any PBC. Why do you think

> The other question is about sum_epot(). Would you kindly tell me why
> sum_epot() is not called immediately after calling do_force() in
> do_md() function? Should I call another function between do_force()
> and sum_epot() to get the potential energy?
because there are corrections which depend on virial (long range
corrections) which should be summed first, in particular when running in

David van der Spoel, PhD, Assist. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel

More information about the gromacs.org_gmx-users mailing list