[gmx-users] The energy output code
Mark Abraham
Mark.Abraham at anu.edu.au
Wed Jun 21 14:40:24 CEST 2006
Shao Qing wrote:
> Thanks Mark for your reply. I think I have not express myself clearly.
> I do not plan to do this during the MD run but after the MD run.
> For example, I have two groups
> A 1 2 3 4
> B 5 6 7 8
> I want to calculate the enery between group A and group B, but need some
> additive criterion to make sure, say, the interaction enery between 1
> and 5 should be added to the sum or not.
> I wish to find the energy code of the gmx to output edr, then maybe I
> can modified it.
> I still cannot find the src code of the subroutine.
That's because there isn't one. Like I said, the energy is calculated
group-wise, and the data in the .edr file is only for intra and inter
group interactions. Do a "gmxdump -e file.edr | less" to see what I'm
talking about. You cannot find the electrostatic interaction for atom
234 with atom 564 from the .edr file unless you made them both a
separate group before the simulation - and if you did that for every
atom you'd have terrible overheads and huge .edr files.
What you want to do requires either post-processing recalculation along
the lines of Uwe's suggestion, or my pre-planning and code-modification
approach. The former requires that you calculate Coulomb interactions
manually, which may not be equivalent to those used in your simulations
(particularly if using PME or short cut-offs). Your call.
Mark
More information about the gromacs.org_gmx-users
mailing list