c write (iout,*) "temp", temp
c call pdbout(i,temp,energia(0),energia(0),0.0d0,0.0d0)
#endif
- if (energia(0).ge.1.0d20) then
+ if (isnan(energia(0)) .or. energia(1).ge.1.0d20
+ & .or. energia(0).ge.1.0d20) then
write (iout,*) "NaNs detected in some of the energy",
& " components for conformation",ii+1
write (iout,*) "The Cartesian geometry is:"