# [gmx-users] Some simple questions about using -rerun in mdrun for energy between two groups

Sheng Bi chrishengbee at hust.edu.cn
Tue Apr 19 03:45:56 CEST 2016

```

> -----Original Messages-----
> From: "Mark Abraham" <mark.j.abraham at gmail.com>
> Sent Time: Tuesday, April 19, 2016
> To: gmx-users at gromacs.org, gromacs.org_gmx-users at maillist.sys.kth.se
> Cc:
> Subject: Re: [gmx-users] Some simple questions about using -rerun in mdrun for energy between two groups
>
> Hi,
>
> This just works on the original trajectory if you use energy groups in the
> rerun tpr. Whether the numbers are useful is another matter :-)
>
> Mark
>
> On Mon, 18 Apr 2016 18:27 Sheng Bi <chrishengbee at hust.edu.cn> wrote:
>
> > Dear GMX Users
> > I have some questions when using -rerun in mdrun to get some specific
> > energy for my groups. Let me describe my question in this way.
> > I have a system containing some groups which include A and B and others.
> > My goal is to calculate the energy between A and B.
> > So Here is my steps:
> > first, I use gmx trjconv to get trajectory contains only A and B called
> > A_B.xtc.
> > Second, I grompp a new tpr which is also only contain group A and B called
> > A_B.tpr.
> > Third, I use mdrun -rerun A_B.xtc -s A_B.tpr -v -deffnm energy_A_B
> > Last, I use gmx energy -f energy_A_B.edr and choose "Total Energy" to get
> > total energy of A_B system.
> > My question is, by this way, I can get the total energy (name it E_total),
> > but in my opinion this energy is composed of the energy
> >
> > between A and A (name it E_A_A), energy between B and B (name it E_B_B),
> > and energy between A and B (name it E_A_B). I only care
> >
> > about E_A_B. By now, I have to repeat above four steps to get E_A_A, and
> > E_B_B, then use E_total minus E_A_A and E_B_B to get E_A_B.
> >
> > This is a very tedious work.
> > I am not quite familiar with -rerun, Is there any ingenious method to get
> > E_A_B ? I am not quite familiar with -rerun?
> > Thanks
> >
> > Sheng bi
> >
> >
> >
> > --
> > PhD student
> > State Key Laboratory of Coal Combustion,
> > School of Energy and Power Engineering,
> > Huazhong University of Science and Technology (HUST),
> > Room 302 Power Building,
> > 1037 Luoyu Road, Wuhan, Hubei 430074 China
> > Email: chrishengbee at hust.edu.cn
> > Phone: (86)27-87548122
> > http://itp.energy.hust.edu.cn
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.

Yes, you are right.
Thank you Mark:)
--
PhD student
State Key Laboratory of Coal Combustion,
School of Energy and Power Engineering,
Huazhong University of Science and Technology (HUST),
Room 302 Power Building,
1037 Luoyu Road, Wuhan, Hubei 430074 China
Email:chrishengbee at hust.edu.cn
Phone: (86)27-87548122
http://itp.energy.hust.edu.cn

```