Project

General

Profile

Bug #384

tabulated potentials derivative not interpolated correctly in some cases

Added by M. Sandal almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Created an attachment (id=411)
.mdp of the run

There is a relevant thread on the gmx-users mailing list:
http://www.mail-archive.com/gmx-users@gromacs.org/msg27392.html

David van der Spoel asked me there to report a bug here.

In trying to use a tabulated potential with GROMACS 4.0.5, I noticed mdrun warnings about deviations of my table from the estimated numerical derivative, of this kind:

"WARNING: For the 268 non-zero entries for table 2 in
table_10_70_0.4_1_C-alpha_C-alpha.xvg the forces deviate on average
120138% from minus the numerical derivative of the potential"

The command line is (as launched from a python script I use):

/home/ms872/software/bin/mdrun -v -s
$STARTDIR/'''+top_name+'_fullmd_'+jobname+'''.tpr -o
$STARTDIR/'''+top_name+'_'+jobname+'''.trr -x
$STARTDIR/'''+top_name+'_'+jobname+'''.xtc -c
$STARTDIR/'''+top_name+'_final_'+jobname+'''.gro -e
$STARTDIR/'''+top_name+'_minbox_'+jobname+'''.edr -table '''+table+'''
-tablep '''+tablep+''' 2>&1 > $STARTDIR/output_'''+jobname+'''.txt -debug 1

The input table is like this:
as you can see, the derivative values of the repulsion are monotonically negative.

...
0.324 0 0 0 0 19.057170805 -4903.66757218
0.325 0 0 0 0 14.5544681537 -4122.12982071
0.326 0 0 0 0 10.7761004826 -3452.22019522
0.327 0 0 0 0 7.61823859882 -2878.71133959
0.328 0 0 0 0 4.99123976902 -2388.40876887
0.329 0 0 0 0 2.81775232212 -1969.88234765
0.33 0 0 0 0 1.03107071308 -1613.23304761
...

And the rtab.xvg outputted by mdrun is like this: signs are oscillating every few values:
...
3.2873699069e-01 3.0300402641e+00 -2.9821022949e+03
3.2893705368e-01 2.7424881458e+00 4.5555401611e+02
3.2913714647e-01 2.9011108875e+00 -6.1965881348e+02
3.2933723927e-01 2.5153810978e+00 -2.9490820312e+03
3.2953730226e-01 1.8357653618e+00 -3.5592436523e+03
3.2973739505e-01 1.2058072090e+00 -2.4505161133e+03
3.2993748784e-01 9.6973133087e-01 3.7754727173e+02
3.3013758063e-01 1.1429694891e+00 8.3080635071e+01
3.3033764362e-01 9.9677509069e-01 -1.3973664551e+03
3.3053773642e-01 6.4262789488e-01 -1.9951014404e+03
3.3073782921e-01 2.5727045536e-01 -1.7099414062e+03
3.3093789220e-01 1.7271757126e-02 -5.4204510498e+02
...

Now, the table I used was wrong indeed (see attachment for full tables, good and wrong), but in the attractive part (it had the wrong sign). When I correct the table, the sign oscillation in the repulsive part go away.

There is also a small positive part in the derivative part of the rtab14.xvg, which is, in my system, the default LJ (table.xvg):

rtab14.xvg excerpt:
...
3.7760000676e-02 0.0000000000e+00 0.0000000000e+00
3.8079999387e-02 3.3338824642e+14 8.2109411802e+18 <-positive
3.8400001824e-02 7.3433434198e+15 3.3617108423e+19
3.8720004261e-02 2.0579002939e+16 4.7121167299e+19
3.9040002972e-02 3.6231459346e+16 4.8723151343e+19
3.9360001683e-02 5.0492120863e+16 3.8423506956e+19
3.9680000395e-02 5.9552762396e+16 1.6221962559e+19
3.9999999106e-02 5.9604645601e+16 -1.7881392787e+19 <-here begin the negatives
4.0320001543e-02 5.4162767418e+16 -1.6154702134e+19
4.0640003979e-02 4.9250029206e+16 -1.4573871595e+19
4.0960002691e-02 4.4819873519e+16 -1.3138938552e+19
...

This remains, no matter what I do to the custom table.

fullmd.mdp (1.9 KB) fullmd.mdp .mdp of the run M. Sandal, 01/08/2010 08:31 PM
rtab14.xvg (394 KB) rtab14.xvg rtab14 , coming from table6-12.xvg M. Sandal, 01/08/2010 08:32 PM
rtab_GOOD.xvg (580 KB) rtab_GOOD.xvg rtab as coming from correct table M. Sandal, 01/08/2010 08:33 PM
rtab_WRONG.xvg (579 KB) rtab_WRONG.xvg rtab as coming from incorrect table M. Sandal, 01/08/2010 08:33 PM
table_C-alpha_C-alpha_GOOD.xvg (116 KB) table_C-alpha_C-alpha_GOOD.xvg correct table M. Sandal, 01/08/2010 08:33 PM
table_C-alpha_C-alpha_WRONG.xvg (117 KB) table_C-alpha_C-alpha_WRONG.xvg incorrect table M. Sandal, 01/08/2010 08:34 PM

History

#1 Updated by M. Sandal almost 10 years ago

Created an attachment (id=412)
rtab14 , coming from table6-12.xvg

#2 Updated by M. Sandal almost 10 years ago

Created an attachment (id=413)
rtab as coming from correct table

#3 Updated by M. Sandal almost 10 years ago

Created an attachment (id=414)
rtab as coming from incorrect table

#4 Updated by M. Sandal almost 10 years ago

Created an attachment (id=415)
correct table

#5 Updated by M. Sandal almost 10 years ago

Created an attachment (id=416)
incorrect table

#6 Updated by Berk Hess almost 10 years ago

I don't understand your problem.
The input file marked WRONG has the wrong sign and gives
an oscillating force.
The input file marked GOOD is correct and rtab_GOOD.xvg
has no oscillations.
So I don't see any problem.
Or does rtab_WRONG.xvg come out of the run with input file GOOD?

Berk

#7 Updated by Berk Hess almost 10 years ago

Could you please answer if there is a problem in Gromacs or not?
So we can fix or close this bug?

Thanks,

Berk

#8 Updated by Berk Hess over 9 years ago

No answer for more than a month and I can not reproduce the bug,
I will close it.

Berk

Also available in: Atom PDF