<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Ran,<br>
<br>
are you sure the derivative is calculated as:<br>
der = (y[N+1] - y[N-1]) * 0.5 * deltaX<br>
<br>
and not as:<br>
der = (y[N+1] - y[N-1]) * 0.5 / deltaX ?<br>
<br>
The last calculation makes a little more sense to me...<br>
<br>
-Johannes<br>
<br>
<br>
<blockquote cite="mid:20090721140956.3F63F246CA@struktbio205.bmc.uu.se"
 type="cite">
  <blockquote cite="mid280792.44938.qm@web15302.mail.cnb.yahoo.com"
 type="cite">
    <div
 style="font-family: garamond,'new york',times,serif; font-size: 12pt;">
    <div>
    <div
 style="font-family: garamond,new york,times,serif; font-size: 12pt;">
    <div
 style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Ran
Friedman wrote:
    <blockquote type="cite"> Hi,<br>
      <br>
The numerical derivative for the Nth value y[N] is calculated as:<br>
der = y[N+1] - y[N-1] * 0.5 * deltaX<br>
    </blockquote>
Correction:<br>
der = (y[N+1] - y[N-1]) * 0.5 * deltaX
    <blockquote type="cite">where y
is the potential deltaX is the difference between two
successive values in your input (e.g., 1 if you have a table that goes
from -180 to 180 with 361 values).<br>
      <br>
I don't think you can print the number without changing the code, but
it's not difficult to calculate. You can plot your forces and -der and
see where they deviate. <br>
      <br>
Ran.<br>
    </blockquote>
    </div>
    </div>
    </div>
    </div>
  </blockquote>
</blockquote>
</body>
</html>