<!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.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV>David:</DIV>
<DIV><BR>&gt;<I> <BR></I>&gt;<I> / <BR></I>&gt;<I> /&gt;/&nbsp; &gt;/ Dear 
Gmx'ers:<BR></I>&gt;<I> /&gt;/ /&gt;/<BR></I>&gt;<I> /&gt;/ /&gt;/ As mentioned 
in the publication about shell water model, a shell<BR></I>&gt;<I> /&gt;/ /&gt;/ 
particle is connected to a dummy atom by a spring-like <BR></I>&gt;<I> 
connection with<BR></I>&gt;<I> /&gt;/ /&gt;/ the following 
relationship:<BR></I>&gt;<I> /&gt;/ /&gt;/<BR></I>&gt;<I> /&gt;/ /&gt;/ 1. 
K=sqr(qS)/(4*PHI*Epsilon*alpha),<BR></I>&gt;<I> /&gt;/ /&gt;/ 2. 
rsd=(4*PHI*Epsilon*alpha)*E / qS;&nbsp; (rsd is the distance 
between<BR></I>&gt;<I> /&gt;/ shell<BR></I>&gt;<I> /&gt;/ /&gt;/ and dummy 
particles at any moment, and E is refered to <BR></I>&gt;<I> electrical 
field/<BR></I>&gt;<I> <BR></I>&gt;<I>&nbsp; &gt;/ /&gt;/ 
strength).<BR></I>&gt;<I> /&gt;/ /&gt;/<BR></I>&gt;<I> /&gt;/ /&gt;/ Anyone can 
tell me where is the definition of two equations above,<BR></I>&gt;<I> /&gt;/ 
/&gt;/ especially in the case of* "isotropic polarization",* in GMX source</DIV>
<DIV></I>&gt;<I> /&gt;/ code.<BR></I>&gt;<I> /&gt;/ /&gt;/ Because in my 
simulation, what I want to polarized is not a water<BR></I>&gt;<I> /&gt;/ /&gt;/ 
molecule. So I need a definite instruction, any suggestion?<BR></I>&gt;<I> 
/&gt;/ /<BR></I>&gt;<I> /&gt;/&nbsp; 
&gt;gmx/src/gmxlib/bondfree.c<BR></I>&gt;<I> /&gt;/ <BR></I>&gt;<I> /&gt;/ In 
this file, I can only locate the definition of K, and where is<BR></I>&gt;<I> 
/&gt;/ the formula for calculating rsd? Pls see the following code, it 
is<BR></I>&gt;<I> /&gt;/ refered to the case of isotropic polarization, 
ok?<BR></I>&gt;<I> /rsd is the input for the equation, as it is just the 
instantaneous<BR></I>&gt;<I> distance between shell and 
particle.<BR></I>&gt;<I>&nbsp; &gt;/ <BR></I>&gt;<I> /&gt;/ <BR></I>&gt;<I> 
/&gt;/ /&gt;/ Secondly, how can I read the calculated value of spring constant 
<BR></I>&gt;<I> K by<BR></I>&gt;<I> /&gt;/ /&gt;/ GMX after I defined "alpha" 
and "qS"? Can "debug" realize it? If <BR></I>&gt;<I> yes,<BR></I>&gt;<I> /&gt;/ 
/&gt;/ how? Although I have used GMX for a long time, but that is the first
</I>&gt;<I> /&gt;/ /&gt;/ time for me to encounter such a 
problem.<BR></I>&gt;<I> /&gt;/ /<BR></I>&gt;<I> /&gt;/&nbsp; &gt;gmxdump -s 
topol.tpr | less<BR></I>&gt;<I> /&gt;/&nbsp; &gt;search for POL<BR></I>&gt;<I> 
/&gt;/ Yes, I can find the defined value for "polarization: alpha", is 
it<BR></I>&gt;<I> /&gt;/ possible for me to know the calculated value of spring 
constant K? If<BR></I>&gt;<I> /&gt;/ yes, how?<BR></I>&gt;<I> /<BR></I>&gt;<I> 
<BR></I>&gt;<I>&nbsp; &gt; It is not printed anywhere. If you want to see it you 
have to turn on<BR></I>&gt;<I>&nbsp; &gt; the debug flag for 
mdrun.<BR></I>&gt;<I> <BR></I>&gt;<I> Very sorry to bother you again, could you 
point it out much more <BR></I>&gt;<I> detailed? I have never used the "-debug" 
flag.<BR></I>&gt;<I> <BR></I>&gt;<I> For example, in original, I used "mdrun -v 
-s full -e full -o full -c <BR></I>&gt;<I> after_full -g full" to run my 
simulation.<BR></I>&gt;<I> <BR></I>&gt;<I> Where should "-debug" flag put in? 
And, where or which file can I find <BR></I>&gt;<I> the calculated value of 
spring constant K?<BR></I></DIV>
<DIV>&gt; mdrun -debug (other options)<BR>&gt; you will get a file mdrun.log 
contaning lots of debug information, <BR>&gt; search for ksh.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have tried "mdrun -debug", but I can not find out "ksh" item in 
mdrun.log. Because what I adopt is "isotropic polarization", maybe, there is no 
output for "ksh" in mdrun.log?&nbsp;At least, I can not find relevant 
information about&nbsp;the "ksh"&nbsp;output while debugging&nbsp;in the 
following code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;real polarize(int nbonds,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
t_iatom forceatoms[],t_iparams 
forceparams[],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rvec x[],rvec 
f[],t_forcerec *fr,t_graph *g,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; matrix 
box,real lambda,real *dvdlambda,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
t_mdatoms *md,int ngrp,real egnb[],real 
egcoul[],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_fcdata *fcd)<BR>{<BR>&nbsp; 
int&nbsp; i,m,ki,ai,aj,type;<BR>&nbsp; real 
dr,dr2,fbond,vbond,fij,vtot,ksh;<BR>&nbsp; rvec dx;<BR>&nbsp; ivec dt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; vtot = 0.0;<BR>&nbsp; for(i=0; (i&lt;nbonds); ) 
{<BR>&nbsp;&nbsp;&nbsp; type = forceatoms[i++];<BR>&nbsp;&nbsp;&nbsp; 
ai&nbsp;&nbsp; = forceatoms[i++];<BR>&nbsp;&nbsp;&nbsp; aj&nbsp;&nbsp; = 
forceatoms[i++];<BR>&nbsp;&nbsp;&nbsp; ksh&nbsp; = 
sqr(md-&gt;chargeT[aj])*ONE_4PI_EPS0/forceparams[type].polarize.alpha;<BR>&nbsp; 
<BR>&nbsp;&nbsp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bsp;&nbsp;&nbsp;&nbsp;&nbsp; 
f[ai][m]+=fij;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
f[aj][m]-=fij;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fr-&gt;fshift[ki][m]+=fij;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fr-&gt;fshift[CENTRAL][m]-=fij;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; 
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 59 TOTAL&nbsp;*/<BR>&nbsp; return 
vtot;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks and regards,</DIV>
<DIV>Xie Yinghong</DIV>
<DIV><BR>&nbsp;</DIV></BODY></HTML>