Problems with compute ti

Dear LAMMPS users,

I have a question about “compute ti”. This compute calculates, for each scaled pair potential with the form Us = f(lambda) * U_pair, its derivative with respect to lambda, which is given by:

dUs/d(lambda) = U_pair * df(lambda)/d(lambda) = [Us/f(lambda)] * df(lambda)/d(lambda).

In order to test this compute, I have chosen lj/cut pair style (U_pair = U_lj) and f(lambda) = lambda, with lambda varying between 0 and 1. For lambda != 0, compute ti works correctly. However, for lambda = 0, we have the problem to divide the scaled energy (Us) by zero. I think that line 174 [“if (value1 == 0.0) continue”] was added into compute_scalar() to solve it. Unfortunately, in this case, compute ti returns dUs/d(lambda) = 0, while the non-scaled energy (U_lj) is non zero. I expected that dUs/d(lambda) should not be zero too as Us = lambda*U_lj.

My question is: How can I get the correct value of dUs/d(lambda) for f(lambda) = 0 using compute ti or other command without make changes inside the source code?

I’m using the stable version of 11Aug17.

Thanks in advance,

Rodolfo.