Simulating a speckle force in lammps

Dear lammps mailing list users
I want to simulate a speckle force using LAMMPS, which is simply a constant random force. i.e when the simulation is initialized each atom gets D random numbers (where D is the dimension) and those random are constant forces applied on it through out the simulation, But don’t know exactly how to do it in lammps, and I am a bit lost on where to begin doing such a thing in LAMMPS.

My first thought was to change fix addforce that on setup i dynamically allocate a large array with fixed random numbers and just add those values instead of xvalue,yvalue etc… but its size will have to change over time since in parallel the forces are iterated on nlocal.
Maybe as a work around to that I can just bcast the array to all procs but on a large simulation I am guessing that can be very memory consuming.
Any help on how to do such a thing will be highly appreciated

Thank you !

Taj

Dear lammps mailing list users
I want to simulate a speckle force using LAMMPS, which is simply a constant random force. i.e when the simulation is initialized each atom gets D random numbers (where D is the dimension) and those random are constant forces applied on it through out the simulation, But don’t know exactly how to do it in lammps, and I am a bit lost on where to begin doing such a thing in LAMMPS.

How about using fix addforce with an atom style variable?

My first thought was to change fix addforce that on setup i dynamically allocate a large array with fixed random numbers and just add those values instead of xvalue,yvalue etc… but its size will have to change over time since in parallel the forces are iterated on nlocal.
Maybe as a work around to that I can just bcast the array to all procs but on a large simulation I am guessing that can be very memory consuming.

This doesn’t sound like a good idea at all and very convoluted.

And the atom-style variables have a random() function that can be used.
See the variable doc page.

Steve