Re: [AMBER] Input case causing NaN in sander (and possibly pmemd) (Ambertools17)

From: David Case <>
Date: Mon, 29 May 2017 15:43:31 -0400

On Fri, May 19, 2017, Åke Sandgren wrote:
> One of our users have a input set that is generating "inf" in
> the call vdinvsqrt(icount, cache_r2, cache_df) in short_ene line 392

This sounds like a case where two atoms are on top of each other:

> delr2 ends up as 0 which is of course < filter_cut2
> This is then propagated to a NaN in the

> Eventually this problem propagates down to fill_charge_grid where
> fr1/2/3 are all NaN, causing k0, j00, i00 to become 2147483645, or there
> about, and finally i0 is used as index into q causing a segfault.

I agree that we should not get a segfault here, but would like to know
more about the actual reason that delr2 is zero.

Could you ask the user to use the cpptraj "checkoverlap" command to see
if there are close atomic contacts? That would help in narrowing down
the problem.
> I wonder if the delr2 < filter_cut2 in ew_directp.h should check that
> delr2 != 0 too?

This could be done, but we would have to see if it would have an impact
on performance -- I'm wary of putting extra if statements into inner loops.
(And while I agree in principle that programs should not segfault, there
are places in high-performance code where the (simple) cure may be worse
than the disease.

If the user doesn't have an obviously bad structure, see if you can send
files that would allow us to try to reproduce the problem.

Thanks for the report....dac

AMBER mailing list
Received on Mon May 29 2017 - 13:00:03 PDT
Custom Search