[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo] Bug in tab.h?

From: Mehmet Sayar
Subject: Re: [ESPResSo] Bug in tab.h?
Date: Tue, 04 Aug 2009 18:24:10 +0300
User-agent: Thunderbird (X11/20090608)

Hi Axel, Salvador, and Zunjing,

I also agree with Zunjing that there is a bug in tabulated bonded potential.

According to the documentation the tabulated potential file should contain:
r, -(dV/dr)/r, and V. And this format is the same for both tabulated bonded and tabulated nonbonded potentials.

Assuming that we stick with this convention, I fixed the tabulated bonded 
        1) On line 546 it should read
                force[i] = fac*dx[i]

        2) On line 543 it should read
                fac = bonded_tab_force_lookup(dist, iaparams);

The first bug was already mentioned by Zunjing. The second bug is related to the definition of the tabulated force file. The force is already divided by "r" in the file. So there is no need to rescale it in tab.h

I committed the above changes to the cvs.

Greetings from Istanbul,


Axel Arnold wrote:
On Friday 24 July 2009 22:29, Jacob Kirkensgaard wrote:
hi salvador/zunjing

I looked at it again: wasn't the bug Zunjing mentioned only in the
tabulated bonded interactions, and not the non-bonded? If so, then it
wouldn't affect what you mention Salvador (I guess)? Can you comment

If so, the problem might be in the ljcos2 - some time ago Ira Cooke

wrote this to me:
The lj-cos2 potential is an
alternative way to describe the potentials (ie using a formula
instead of a lookup table).  Ben Reynolds (still working with Markus
Deserno) implemented it and it might work properly now .. but then
again it might not work .. I haven't tested it so I wouldn't use it.
Does anyone know if this potential is working properly???


why don't you just test whether the potential/force have the form you need? A potential in Espresso is really only about calculating the energy/force, so if you simply make a small script that puts two particles at different distances, you can easily generate a plot of the potential and figure out whether it is what you need. In this case, the potential works properly. This applies both to the tabulated and ljcos2.


Mehmet Sayar - Assist. Prof.  Koc University
Email:address@hidden        Dept. Mechanical Eng.
Phone:+90-212-338-1840        Rumelifeneri Yolu, Sariyer
Fax:  +90-212-338-1548        34450 Istanbul, Turkey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]