<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.3790.418" name=GENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:ËÎÌå;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@ËÎÌå";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana color=#0000ff size=2>
<DIV>Thanks Mark for your reply. I think I have not express myself
clearly. </DIV>
<DIV> I do not plan to do this during the MD run but after the MD
run. </DIV>
<DIV>For example, I have two groups </DIV>
<DIV>A 1 2 3 4 </DIV>
<DIV>B 5 6 7 8</DIV>
<DIV>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. </DIV>
<DIV>I wish to find the energy code of the gmx to output edr, then maybe I can
modified it.</DIV>
<DIV>I still cannot find the src code of the subroutine.</DIV>
<DIV>Or any other good method?</DIV>
<DIV>Thanks</DIV>
<DIV>>>Shao Qing wrote:</DIV>
<DIV>>> Gromacsers: </DIV>
<DIV>>> Hello, everyone. I want to
calculate the interaction energy of
molecules in certain region, like in
the pore. Because the molecules can
move inside the pore and outside it.
A group is not suitable here, I
guess. I do not find such tools
in the gmx_tools, either. I want to
change the code of the subroutine
output energy in the mdrun to fulfill
my aim. Could anyone tell me where
the subroutine is? I mean, the
subroutine to calculate the energy in
the mdrun and output it to the
edr.</DIV>
<DIV>>> Thanks in advance </DIV>
<DIV>
<DIV>Mark wrote</DIV></DIV>
<DIV>> Caveat, I'm not expert enough to
be sure what I'm saying is right,
but I</DIV>
<DIV>think it right!</DIV>
<DIV> </DIV>
<DIV>> It's not as simple as that. The
energies (and forces) are computed</DIV>
<DIV>group-wise, so you need to construct a
group back in the .top file</DIV>
<DIV>before evaluating the energy. The simplest
way to do that would be to</DIV>
<DIV>decided in advance how many water
molecules will be in the group, and
at</DIV>
<DIV>each energy output step, recompute exactly
which water molecules are</DIV>
<DIV>close enough to be part of the
group, and fill the group data
structure</DIV>
<DIV>with the corresponding indices. Then
magically the energy for that group</DIV>
<DIV>will be calculated and appear in the
.edr output.</DIV>
<DIV> </DIV>
<DIV>> Mark</DIV></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV align=left>
<DIV align=left><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV>
<DIV><FONT face=Verdana size=2> </DIV></DIV>
<DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>------------------------------</DIV>
<DIV> </DIV>
<DIV>_______________________________________________</DIV>
<DIV>gmx-users mailing list</DIV>
<DIV>gmx-users@gromacs.org</DIV>
<DIV><A
href="http://www.gromacs.org/mailman/listinfo/gmx-users">http://www.gromacs.org/mailman/listinfo/gmx-users</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>End of gmx-users Digest, Vol 26, Issue
74</DIV>
<DIV>*****************************************</DIV></FONT></DIV></BODY></HTML>