issue with ave-spatial command?

Hi,

I am trying to get a temperature profile in a simulation cell using ave spatial. I perform a long equilibration step to establish a steady state temperature gradient using “heat”. Then I do my production run. Initially I was using the following:

fix mp2 all ave/spatial 100 20000 2000000 x lower 0.0025 v_temp file tmpfinal.profile units reduced
run 2000000

which output the desired temperature profile. I felt the data was a little noisy so I bumped up the number of samples as follows:

fix mp2 all ave/spatial 100 80000 8000000 x lower 0.0025 v_temp file tmpfinal.profile units reduced
run 8000000

and now I get a file that only contains the header info, with no data. I figured as long as Nfreq = Nsteps I should be OK. Am I running into some limit by setting Nrepeat so high? Just for kicks I tried

fix mp2 all ave/spatial 200 40000 8000000 x lower 0.0025 v_temp file tmpfinal.profile units reduced
run 8000000

And got no data output as well. Fortunately this is an LJ system, and it doesn’t take too long to run 8e6 steps!

Thanks.

You mention an equil run before the production run.
Are you starting the production run on a multiple
of Nfreq? If not, then you won't get any output
with fix ave/spatial until there is a window that
starts and ends on a multiple of Nfreq that is within
your production run.

E.g. I believe these commands:

run 1000
fix ave/spatial 100 20 2000
run 3000

will only give fix a/s output on step 4000, not on step 2000.
So if the 2nd run was run 2000, you would see no output.

Steve

No, it was set to 4000000 I think. I put a reset timestep = 0 command in there before start of production and am rerunning now. I am guessing that should fix it if what you describe is correct.

Thanks for the clue!

To be more precise, you will not see any output
on a multiple of Nfreq if you started the run
on a timestep later than the 1st timestep needed
to contribute to the Nfreq output. So my previous
example was correct, no output until step 4000.

But if you did this:

run 1000
fix ave/spatial 100 2 2000
run 3000

You would see output on step 2000, b/c
only timesteps 1900,2000 contribute to
that output, and the 2nd run includes them.

Steve