I'm working with a student who is trying to implement a sinusoidal
transverse force simulation for calculating viscosities in MD simulation.
We can use Fix ave/spatial to calculate the streaming velocity of particles
in a cubic cell and output these histogrammed average velocities
over space and time to a file.
What we require is the ability to call the velocities of individual bins
for further computes. Specifically to subtract these numbers (the
histogrammed streaming velocities) from absolute atomic velocities on the
fly in order to derive average peculiar velocities.
In the example below we have tried calling the streaming velocities with
f_streamvel[I][J] at intervals of Nfreq, which returns an error.
“Thermo fix array is accessed out-of-range”, when called within a Thermo
Does any one have any thoughts on how we could do this? The next possible
step would be to write a new fix, based on Fix ave/spatial.
But doing this with fixes/ computes will probably be more flexible & less