[gmx-users] potential energy in force.c

Pradip Kumar Biswas p.biswas at csuohio.edu
Wed Nov 17 01:21:17 CET 2004


On Nov 16, 2004, at 6:02 PM, Nguyen Hoang Phuong wrote:

>
> Dear All,
>
> at the end of the code /src/mdlib/force.c there is a variable
> epot[F_EPOT] which is calculated as
>
>  for(i=0; (i<F_EPOT); i++)
>     if (i != F_DISRES)
>       epot[F_EPOT]+=epot[i];
>

At this stage,  epot[F_EPOT] contains only the sum of energies
corresponding to Bonded interactions. Total potential energy is arrived 
at
summing with it the Coulomb, LJ etc.  To see the total potential energy,
  you should also print there:

*(grps->estat.ee[egCOUL])

*(grps->estat.ee[egLJ])

which correspond to coulomb and LJ, respectively and sum them up with 
epot[F_EPOT] to get the total potential energy. Depending on your 
system
you may also have *(grps->estat.ee[egCOUL14]),   
*(grps->estat.ee[egLJ14])
etc.

P. K. Biswas
CSU, Ohio.

>
> Is epot[F_EPOT] the total potential energy of the system?
>
> I print this value by changing the above lines to
>
> for(i=0; (i<F_EPOT); i++){
>     if (i != F_DISRES)
>       epot[F_EPOT]+=epot[i];
>   }
>
> printf("%lf\n",epot[F_EPOT]);
>
> I compare this value with the total potential energy of the system
> obtained by the program g_energy, however they are quite different 
> with each other. Am I
> missing something?
>
> Thanks a lot in advance for any explaination,
>
> Phuong
>
> _______________________________________________
> 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.
>




More information about the gromacs.org_gmx-users mailing list