[gmx-developers] innerc to forcebuf: Energy is still zero

Erik Lindahl lindahl at stanford.edu
Fri Apr 5 00:54:18 CEST 2002


>
>
>
>
>Dear Developers,
>
>I have been strugling to figure out why after I've added new pair
>potential 
>in to code, BHAM and new potential energies are appeared as zero, but
>not
>in case LJ.in my tests;
>- neighborhood lists are constructed 
>- correct loops selected,correct values of parameters passes in to loops
>- calculations and variables appeared proper during innerloops
>executions (from print statements)
>- as David pointed out above; only lj values printed in energy arrays.
>
>Do you have any idea for this strange bug that I may introduce,
>any comment would d be very helpful?.
>
Hi Mehmet,

I'm not quite sure what your problem is; is it that you don't get any 
energies from the inner loop with your new interaction?

>
>
>PS: I suspect with an other point at ns.c  when I choose LJ potential  I
>have such parameters 
>    and bHaveLJ:
>
>
>i is 0 bHaveLJ at ns.c 1 and frBHAM 0 frBHAMLJ 0
>BHAMA(fr->nbfp,fr->ntype,i,j) is 0.352207
>BHAMB(fr->nbfp,fr->ntype,i,j) is 2.721594
>BHAMC(fr->nbfp,fr->ntype,i,j) is 2.723626
>C6(fr->nbfp,fr->ntype,i,j)    is 2.723626
>C12(fr->nbfp,fr->ntype,i,j)   is 0.352207
>i is 0 bHaveLJ at ns.c 1 and frBHAM 0 frBHAMLJ 0
>BHAMA(fr->nbfp,fr->ntype,i,j) is 2.721594
>BHAMB(fr->nbfp,fr->ntype,i,j) is 0.795933
>BHAMC(fr->nbfp,fr->ntype,i,j) is 0.795933
>C6(fr->nbfp,fr->ntype,i,j)    is 2.721594
>C12(fr->nbfp,fr->ntype,i,j)   is 0.795933
>i is 1 bHaveLJ at ns.c 1 and frBHAM 0 frBHAMLJ 0
>BHAMA(fr->nbfp,fr->ntype,i,j) is 0.584641
>BHAMB(fr->nbfp,fr->ntype,i,j) is 0.000000
>BHAMC(fr->nbfp,fr->ntype,i,j) is 2.756883
>C6(fr->nbfp,fr->ntype,i,j)    is 2.721594
>C12(fr->nbfp,fr->ntype,i,j)   is 0.795933
>i is 1 bHaveLJ at ns.c 1 and frBHAM 0 frBHAMLJ 0
>BHAMA(fr->nbfp,fr->ntype,i,j) is 0.000000
>BHAMB(fr->nbfp,fr->ntype,i,j) is 0.000000
>BHAMC(fr->nbfp,fr->ntype,i,j) is 0.000000
>C6(fr->nbfp,fr->ntype,i,j)    is 2.756883
>C12(fr->nbfp,fr->ntype,i,j)   is 0.584641
>
>
>if I choose buck, why also LJ parameters passed? *Is this a bug or 
>could affect potential energy calculations.
>
No, the nonbonded (LJ or BHAM) parameters are stored in the array nbfp. 
If we use LJ there are two parameters for each pair, and but with BHAM 
there are three. The "function calls" above are actually C macros for 
performance. The results of the LJ macros aren't defined when you use 
BHAM, and vice versa.

Cheers,

Erik

>





More information about the gromacs.org_gmx-developers mailing list