[gmx-developers] tabulated potential energy=nan for r=0 nm and charged atoms

Berk Hess hess at cbr.su.se
Mon May 9 17:03:50 CEST 2011


Hi,

In the innerloop r is calculated as rsquared*invsqrt(rsquared).

Berk

On 05/09/2011 04:54 PM, chris.neale at utoronto.ca wrote:
> Dear Developers:
>
> I find that even when tabulated potentials specify f(x)=0 and -f'(x)=0 
> for x=0, I still get a coulomb(SR) energy=nan when two charges occupy 
> the exact same spot.
>
> Both the manual 4.5.4 page 151 equation 6.23 and the gromacs_nb.pdf 
> tabulated potentials tutorial ( 
> http://www.gromacs.org/Documentation/How-tos/Tabulated_Potentials ) 
> indicate that setting f(x)=0 and -f'(x)=0 for x=0 should lead to an 
> energy of zero in this case.
>
> Is this a bug or a case of WYSIWYG? Can anybody offer any hints on 
> where I might start searching through the source code with printf 
> statements to see where the nan develops? I'm guessing there is some 
> if(r>0) in the code that doesn't technically need to be there.
>
> More information and a test system is available in my users-list post 
> for which I received no responses:
> http://lists.gromacs.org/pipermail/gmx-users/2011-May/061140.html
>
> Thank you very much,
> Chris.
>




More information about the gromacs.org_gmx-developers mailing list