Hello,
I am trying to apply forces (that follow normal distribution and consistent along time step) to atoms. I was using following code, which generated normal distribution forces for each atom, but changed for every time step.
variable meanF equal 0.0
variable sigF equal 1e-3
variable fpx atom normal(v_meanF,v_sigF,123)
variable fpy atom normal(v_meanF,v_sigF,123)
variable fpz atom normal(v_meanF,v_sigF,123)
fix kick all addforce v_fpx v_fpy v_fpz
So, I added a line using fix store/state so that I can fix (freeze) the force along the time step. In other words, I want to sample forces for each atom following normal distribution and use that force along the simulation (consistent along the time step).
fix storeF all store/state 0 v_fpx v_fpy v_fpz
run 10
I also did run 10 since the documentation said that the atom style variables will not be stored immediately after the fix command is called. However, I found out from the log file that the forces applied are not consistent with time, rather different forces were being applied at different time steps.
Could you recommend some possible methods to resolve this problem?
The final code I am using now is
variable meanF equal 0.0
variable sigF equal 1e-3
variable fpx atom normal(v_meanF,v_sigF,123)
variable fpy atom normal(v_meanF,v_sigF,123)
variable fpz atom normal(v_meanF,v_sigF,123)
fix storeF all store/state 0 v_fpx v_fpy v_fpz
run 10
fix kick all addforce v_fpx v_fpy v_fpz
Thank you.