Project

General

Profile

Bug #396

nan in g_anaeig entropy because of sqr instead of dsqr

Added by Jochen Hub almost 10 years ago. Updated over 9 years ago.

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

Description

The line

kteh = kt*exp(2.0)/sqr(hbar)*AMU*sqr(NANO);

in the calc_entropy_schlitter routine in gmx_anaeig.c should be

kteh = kt*exp(2.0)/dsqr(hbar)*AMU*dsqr(NANO);
^^^ ^^^

Otherwise the kheh is nan since sqr(hbar) = 0 in single precision.

Cheers,

Jochen

History

#1 Updated by David van der Spoel over 9 years ago

Fixed by writing out the square.

Also available in: Atom PDF