<!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&nbsp;I have not express myself 
clearly.&nbsp;&nbsp;</DIV>
<DIV>&nbsp;I&nbsp;do not plan to do this during the MD run but after the&nbsp;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&nbsp;still cannot find the src code of the subroutine.</DIV>
<DIV>Or any other good method?</DIV>
<DIV>Thanks</DIV>
<DIV>&gt;&gt;Shao &nbsp;Qing &nbsp;wrote:</DIV>
<DIV>&gt;&gt;&nbsp;Gromacsers: &nbsp;</DIV>
<DIV>&gt;&gt; &nbsp;Hello, &nbsp;everyone. &nbsp;I &nbsp;want &nbsp;to 
&nbsp;calculate &nbsp;the &nbsp;interaction &nbsp;energy &nbsp;of 
&nbsp;molecules &nbsp;in &nbsp;certain &nbsp;region, &nbsp;like &nbsp;in 
&nbsp;the &nbsp;pore. &nbsp;Because &nbsp;the &nbsp;molecules &nbsp;can 
&nbsp;move &nbsp;inside &nbsp;the &nbsp;pore &nbsp;and &nbsp;outside &nbsp;it. 
&nbsp;A &nbsp;group &nbsp;is &nbsp;not &nbsp;suitable &nbsp;here, &nbsp;I 
&nbsp;guess. &nbsp;I &nbsp;do &nbsp;not &nbsp;find &nbsp;such &nbsp;tools 
&nbsp;in &nbsp;the &nbsp;gmx_tools, &nbsp;either. &nbsp;I &nbsp;want &nbsp;to 
&nbsp;change &nbsp;the &nbsp;code &nbsp;of &nbsp;the &nbsp;subroutine 
&nbsp;output &nbsp;energy &nbsp;in &nbsp;the &nbsp;mdrun &nbsp;to &nbsp;fulfill 
&nbsp;my &nbsp;aim. &nbsp;Could &nbsp;anyone &nbsp;tell &nbsp;me &nbsp;where 
&nbsp;the &nbsp;subroutine &nbsp;is? &nbsp;I &nbsp;mean, &nbsp;the 
&nbsp;subroutine &nbsp;to &nbsp;calculate &nbsp;the &nbsp;energy &nbsp;in 
&nbsp;the &nbsp;mdrun &nbsp;and &nbsp;output &nbsp;it &nbsp;to &nbsp;the 
&nbsp;edr.</DIV>
<DIV>&gt;&gt;&nbsp;Thanks &nbsp;in &nbsp;advance &nbsp; &nbsp;</DIV>
<DIV>
<DIV>Mark wrote</DIV></DIV>
<DIV>&gt; Caveat, &nbsp;I'm &nbsp;not &nbsp;expert &nbsp;enough &nbsp;to 
&nbsp;be &nbsp;sure &nbsp;what &nbsp;I'm &nbsp;saying &nbsp;is &nbsp;right, 
&nbsp;but &nbsp;I</DIV>
<DIV>think &nbsp;it &nbsp;right!</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt; It's &nbsp;not &nbsp;as &nbsp;simple &nbsp;as &nbsp;that. &nbsp;The 
&nbsp;energies &nbsp;(and &nbsp;forces) &nbsp;are &nbsp;computed</DIV>
<DIV>group-wise, &nbsp;so &nbsp;you &nbsp;need &nbsp;to &nbsp;construct &nbsp;a 
&nbsp;group &nbsp;back &nbsp;in &nbsp;the &nbsp;.top &nbsp;file</DIV>
<DIV>before &nbsp;evaluating &nbsp;the &nbsp;energy. &nbsp;The &nbsp;simplest 
&nbsp;way &nbsp;to &nbsp;do &nbsp;that &nbsp;would &nbsp;be &nbsp;to</DIV>
<DIV>decided &nbsp;in &nbsp;advance &nbsp;how &nbsp;many &nbsp;water 
&nbsp;molecules &nbsp;will &nbsp;be &nbsp;in &nbsp;the &nbsp;group, &nbsp;and 
&nbsp;at</DIV>
<DIV>each &nbsp;energy &nbsp;output &nbsp;step, &nbsp;recompute &nbsp;exactly 
&nbsp;which &nbsp;water &nbsp;molecules &nbsp;are</DIV>
<DIV>close &nbsp;enough &nbsp;to &nbsp;be &nbsp;part &nbsp;of &nbsp;the 
&nbsp;group, &nbsp;and &nbsp;fill &nbsp;the &nbsp;group &nbsp;data 
&nbsp;structure</DIV>
<DIV>with &nbsp;the &nbsp;corresponding &nbsp;indices. &nbsp;Then 
&nbsp;magically &nbsp;the &nbsp;energy &nbsp;for &nbsp;that &nbsp;group</DIV>
<DIV>will &nbsp;be &nbsp;calculated &nbsp;and &nbsp;appear &nbsp;in &nbsp;the 
&nbsp;.edr &nbsp;output.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt; Mark</DIV></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</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>&nbsp;</DIV></DIV>
<DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>_______________________________________________</DIV>
<DIV>gmx-users &nbsp;mailing &nbsp;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>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>End &nbsp;of &nbsp;gmx-users &nbsp;Digest, &nbsp;Vol &nbsp;26, &nbsp;Issue 
&nbsp;74</DIV>
<DIV>*****************************************</DIV></FONT></DIV></BODY></HTML>