I’d like to implement an algorithm that creates a time correlated force on LAMMPS. My code produces a string that stores in each space the force sequence. However I have no idea how to create a routine that, for each time step, returns one of the elements of the string.
I’d like to know if has anybody here tried before to implement like a “fix” that creates some sort of string that can be used or changed while LAMMPS is running.
There is a fix ave/correlate which does time correlations. If
you want something different in your own fix, then you need
to answer "returns it to what?"
I think what Alexandre meant was that the force at time t would depend
on the force at t_0, t_-1, t_-2, etc or that the force depends on its
'memory' of its previous values.
If you are writing the fix, you can store whatever you want (old forces,
but why in a string?), and you can compute whatever you want (like
a new force). So I'm not clear what question is remaining ...
It’s like Zhun-Yong said. I had some problems finding the parameter for timesteps (I haven’t seen the update.h before), but I think I’ve solved the problem. Anyway, I’ll check the fix ave/correlate.