Hi there,
I have been testing the jax-md backend of PySAGES and I noticed while comparing with the jax-md NVT (Nose-Hoover) implementation that the bias application in its current state cannot be quite right. At least that is what I strongly suspect.
In the jax-md backend currently the force bias is applied once after every MD step function execution, i.e
if sampler_state.bias is not None: # bias the simulation
context_state = sampling_context_state.state
biased_forces = context_state.force + sampler_state.bias
context_state = dataclasses.replace(context_state, force=biased_forces)
sampling_context_state = sampling_context_state._replace(state=context_state)
However, inside jax-md the NVT ensemble is by default computed using the velocity verlet algorithm, which involves the calculation of the momentum at time t_n and t_(n+1/2) from the forces. Thus, the bias applied in PySAGES only correctly biases the first force evaluation but not the second one.
Can someone comment if this concern is valid? I noticed in some tests with a simple double-well potential that I get an error in the activation barrier by roughly a factor of 2 and I have the feeling that this is related to this inconsistency.
Best wishes,
Evgeny
Hi there,
I have been testing the jax-md backend of PySAGES and I noticed while comparing with the jax-md NVT (Nose-Hoover) implementation that the bias application in its current state cannot be quite right. At least that is what I strongly suspect.
In the jax-md backend currently the force bias is applied once after every MD step function execution, i.e
However, inside jax-md the NVT ensemble is by default computed using the velocity verlet algorithm, which involves the calculation of the momentum at time t_n and t_(n+1/2) from the forces. Thus, the bias applied in PySAGES only correctly biases the first force evaluation but not the second one.
Can someone comment if this concern is valid? I noticed in some tests with a simple double-well potential that I get an error in the activation barrier by roughly a factor of 2 and I have the feeling that this is related to this inconsistency.
Best wishes,
Evgeny