<DIV>XAvier, thanks for your reply.</DIV>
<DIV> the numberical derivative -f'(n)=dy/dx=-(y(n+1)-y(n-1))/(n+1)-(n-1).</DIV>
<DIV>so -f'(n)=-(y(n+1)-y(n-1))/2. Is it wrong?<BR><BR><BR>On Nov 9, 2010, at 7:12 AM, Z.Xiao wrote:<BR><BR>> Dear all gmxers,<BR>> I meet some problems when I use the tabulated bonded potential.<BR>> My original function is a sum of An*cos(x)^n (n=1-8).For short here <BR>> I replaced it by cos(x).<BR>> if f(x)=cos(x),then -f'(x)=sin(x).and the numberical derivative - <BR>> f'(x)=-(y(n+1)-y(n-1))/2.<BR>here you should have dy/dx, re you really doing this?<BR>> but there are great discrepancy between the two -f'(x).<BR>> which is right?<BR>> and if mdrun with the derivative of original function I would met a <BR>> warning:the forces deviate<BR>> on average 207% from minus the numerical derivative of the <BR>> potential.but mdrun with the the<BR>> numberical derivative there is no warning.<BR>><BR>><BR>> -- <BR><BR></DIV>
<DIV></DIV><PRE> </PRE><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>