<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Johannes,<br>
<br>
Thanks for the correction - you're right of course (when deltaX = 1
it's the same).<br>
<br>
To be closer to the gromacs code it's <br>
der = (y[N+1] - y[N-1]) * 0.5 * tabscale<br>
<br>
where <br>
tabscale = number of points per nm (or degree for angles/dihedrals).<br>
<br>
Ran.<br>
<br>
Johannes Kamp wrote:
<blockquote cite="mid4A6871B7.9090404@rwth-aachen.de" type="cite">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
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>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
gmx-users mailing list    <a class="moz-txt-link-abbreviated" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>
<a class="moz-txt-link-freetext" href="http://lists.gromacs.org/mailman/listinfo/gmx-users">http://lists.gromacs.org/mailman/listinfo/gmx-users</a>
Please search the archive at <a class="moz-txt-link-freetext" href="http://www.gromacs.org/search">http://www.gromacs.org/search</a> before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to <a class="moz-txt-link-abbreviated" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.
Can't post? Read <a class="moz-txt-link-freetext" href="http://www.gromacs.org/mailing_lists/users.php">http://www.gromacs.org/mailing_lists/users.php</a></pre>
</blockquote>
<br>
</body>
</html>