temp/profile output

Dear all

Is there any way to get the temp of each bin in temp/profile command?
(Not the temp of whole group)

best regards

no, but you can use fix ave/spatial to do that. See
the fix thermal/conductivity doc page for an example
of input script commands for that.


thanks Steve

yes but I want to subtract the bias velocity before spatial averaging.
In order to use fix ave/spatial, how can I define a per/atom quantity equal to each atom velocity minus the mean velocities of the all?


I don't think there is a simple way to do that (e.g. with a variable)
for lots of bins. Possibly you could use fix ave/spatial twice.
Once to compute the mean velocity. A variable would then
define a per-atom quantity that was the atom minus the
corresponding bin velocity. Then you could spatially
average that variable in a 2nd fix ave/spatial.


I did that as follow:


fix vp2 mobile ave/spatial 1 100000 100000 y 0.0 .35 vx norm all file vel2.txt

variable vxb atom f_vp2[4][4]
variable vm atom (vx-v_vxb)^2
fix vp2p mobile ave/spatial 1 100000 100000 y 0.0 .35 v_vm norm all file pvel2.txt
but the following error occurs after the 1st step:

“ERROR: Variable formula fix array is accessed out-of-range”

any comment is appreciated

Atoms can be (slightly) outside the simulation box,
so you need to insure they are put in a valid bin in your

A better way to do this is probably to add code,
e.g. to compute temp/profile, to tally the per-bin
velocity and temperature as an optional output.
I'll take a look at what this would take.


Dear Fahim,

another way to do that may be to write the total velocity as fix ave/spatial does, and then subtract the mean value from output file values with some small program in, e.g., C.


24.10.12, 18:41, "Fahim Faraji" <[email protected]...>":

Dear Steve and Oleg

thanks for comments
off course Oleg! I used to do that. but manual post processing is always tedious!
and it seems a good idea that the temp/profile command will be developed and output
the temperature of each bin.


It's a good suggestion. I'll put it on the list.


Just added this as an option to the compute temp/profile
command - see the "out" option and the 29Nov12 patch.