[gmx-developers] Computing prot pot ener in the gmx code
David van der Spoel
spoel at xray.bmc.uu.se
Mon Jan 9 21:58:27 CET 2006
pascal.baillod at epfl.ch wrote:
> Hi!
>
> I am trying to get protein potential energies in order to carry out REMD
> simulations in function of the potential energy of a solute and not of the
> entire system. I checked the tgroup.c file and found the following:
>
>
> void sum_epot(t_grpopts *opts,t_groups *grps,real epot[])
> {
> int i;
>
> /* Accumulate energies */
> epot[F_COUL_SR] = sum_v(grps->estat.nn,grps->estat.ee[egCOULSR]);
> epot[F_LJ] = sum_v(grps->estat.nn,grps->estat.ee[egLJSR]);
> epot[F_LJ14] = sum_v(grps->estat.nn,grps->estat.ee[egLJ14]);
> epot[F_COUL14] = sum_v(grps->estat.nn,grps->estat.ee[egCOUL14]);
> epot[F_COUL_LR] += sum_v(grps->estat.nn,grps->estat.ee[egCOULLR]);
> epot[F_LJ_LR] += sum_v(grps->estat.nn,grps->estat.ee[egLJLR]);
> /* lattice part of LR doesnt belong to any group
> * and has been added earlier
> */
> epot[F_BHAM] = sum_v(grps->estat.nn,grps->estat.ee[egBHAMSR]);
> epot[F_BHAM_LR] = sum_v(grps->estat.nn,grps->estat.ee[egBHAMLR]);
>
> epot[F_EPOT] = 0;
> for(i=0; (i<F_EPOT); i++)
> if (i != F_DISRESVIOL && i != F_ORIRESDEV && i != F_DIHRESVIOL)
> epot[F_EPOT] += epot[i];
> }
>
> Could the potential energy of the protein be obtained with a new routine, that
> would look like
>
> void sum_epotPROT(t_grpopts *opts,t_groups *grps,real epot[])
> {
> (same as routine sum_epot above)
> }
>
> ...in which I have been told I would have to change the indexes X of
>
> grps->estat.nn,grps->estat.ee[X]
the array above is two-dimensional (check the sum_v routine).
>
> ...to 0, 1 and 2.
>
> But I cannot, I suppose, simply replace the original indexes egCOULSR, egLJSR,
> egLJ14 by 0, 1 and 2?
you need to sum the subset of all of these, e.g.
grps->estat.ee[egCOULSR][0] etc.
you will also have to treat PME in some way, which really is quite
complicated.
>
--
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. 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-developers
mailing list