HvD: Problems arose in the TDDFT Gradients in that in some cases the gradient evaluated to NaN in particular with the autodiff code.  It turns out that this problem was related to the tol_rho setting. Higher orders of differentiation of quantities taken to fractional powers lead to expressions with more severe singularities. Setting very tight cut-offs may then lead to floating point exceptions.  Hence I am relaxing the density cut-off to 1.0e-10 which is routinely used in the NWDFT code. This was sufficient to avoid the NaNs in the test cases I was working with and produced the correct results instead (correct compared to the Maxima generated code and the original hand written code).
HvD: Problems arose in the TDDFT Gradients in that in some cases the
gradient evaluated to NaN in particular with the autodiff code. 
It turns out that this problem was related to the tol_rho setting. Higher
orders of differentiation of quantities taken to fractional powers lead
to expressions with more severe singularities. Setting very tight cut-offs
may then lead to floating point exceptions. 
Hence I am relaxing the density cut-off to 1.0e-10 which is routinely used
in the NWDFT code. This was sufficient to avoid the NaNs in the test cases
I was working with and produced the correct results instead (correct compared
to the Maxima generated code and the original hand written code).





rangsimanketkaew/NWChem