# [gmx-users] g_energy -fee

Ilya Chorny ichorny at maxwell.compbio.ucsf.edu
Wed Sep 17 21:19:01 CEST 2003

On Wed, 2003-09-17 at 01:34, David van der Spoel wrote:
> On Wed, 2003-09-17 at 09:30, Ilya Chorny wrote:
> > I guess I need to  be more specific. How does it calculate the free energy?
> >
>
> g_energy -h :
>
> With -fee an estimate is calculated for the free-energy difference with
> an
> ideal gas state:

Every time I run -fee option it gives me an inf.

g_energy -f arrun_long.edr -fee -fetemp 300

Energy                      Average       RMSD     Fluct.      Drift
-------------------------------------------------------------------------------
Potential                   -138079    518.909    518.029  -0.629159

Tot-Drift  -kT ln<e^(E/kT)>

-104.593         inf

Is this the free energy between the ideal gas and the system and not the
other way around as described below.

>   Delta A = A(N,V,T) - A_idgas(N,V,T) = kT ln < e^(Upot/kT) >
>   Delta G = G(N,p,T) - G_idgas(N,p,T) = kT ln < e^(Upot/kT) >
> where k is Boltzmann's constant, T is set by -fetemp andthe average is
> over the
> ensemble (or time in a trajectory). Note that this is in principle only
> correct
> when averaging over the whole (Boltzmann) ensemble and using the
> potential
> energy. This also allows for an entropy estimate using:
>   Delta S(N,V,T) = S(N,V,T) - S_idgas(N,V,T) = (<Upot> - Delta A)/T
>   Delta S(N,p,T) = S(N,p,T) - S_idgas(N,p,T) = (<Upot> + pV - Delta G)/T

>
> When a second energy file is specified (-f2), a free energy difference
> is

How does one generate a second energy file for the with EB energies from
the same trajectory in gromacs? mdrun does not give an option to write a
second energy file with the perturbed configuration.? I would really
like to use this to do FEP calcs. I have gotten around this with
dv/dlambda equal to deltaE between the two states if the mutation is
just in the LJC(lennard Jones) potential

> calculated dF = -kT ln < e ^ -(EB-EA)/kT >A , where EA and EB are the
> energies
> from the first and second energy files, and the average is over the
> ensemble A.
> NOTE that the energies must both be calculated from the same trajectory.
>
> O
>
>
> > Thanks
> >
> > Ilya
> >
> >
> >
> > -----Original Message-----
> > From: gmx-users-admin at gromacs.org [mailto:gmx-users-admin at gromacs.org]On
> > Behalf Of David van der Spoel
> > Sent: Wednesday, September 17, 2003 12:45 AM
> > To: gmx-users at gromacs.org
> > Subject: Re: [gmx-users] g_energy -fee
> >
> >
> > On Wed, 2003-09-17 at 01:17, Ilya Chorny wrote:
> > > Could someone explain to what the -fee does in g_energy.
> > >
> > Have you run
> > g_energy -h ?
> > >
> > > Thanks
> > >
> > > Ilya
> > >
> > >
> > > _______________________________________________
> > > gmx-users mailing list
> > > gmx-users at gromacs.org
> > > http://www.gromacs.org/mailman/listinfo/gmx-users
> > > Please don't post (un)subscribe requests to the list. Use the
> > > www interface or send it to gmx-users-request at gromacs.org.