Specifying format for fix ave/correlate output

Hello all,

I have a fix which correlates the result of a compute (input script snippet below:)

compute cc1 all chunk/atom molecule

compute myChunk all dipole/chunk cc1

variable chunk_dipole_x equal sum(c_myChunk[1])

variable chunk_dipole_y equal sum(c_myChunk[2])

variable chunk_dipole_z equal sum(c_myChunk[3])

variable total_chunk_dipole equal v_chunk_dipole_x+v_chunk_dipole_y+v_chunk_dipole_z

fix 25 all ave/correlate 1 1 1 v_total_chunk_dipole type full file mu_total.correlated

The output in the file mu_total.correlated looks like

Time-correlated data for fix 25

Timestep Number-of-time-windows

Index Time Delta N count v_total_chunk_dipole*v_total_chunk_dipole

0 1

1 0 1 0.522154

1 1

1 0 2 0.522679

2 1

1 0 2 0.523761

3 1

1 0 2 0.524885

4 1

1 0 2 0.526009

I would like to be able to use the value for “v_total_chunk_dipole*v_total_chunk_dipole” from mu-total.correlated (i.e. the fourth column from the file) in a fix print, so as to be able to more easily process the data after my simulations have finished, but am having trouble figuring it out.

Any help with this would be greatly appreciated.

Thank you,

L

Fix ave/correlate produces an array of internal values (see its doc page).

Variables and thus the fix print command can access those values,

so you should be able to do what you are asking.

Or learn/use Python to massage the output file from fix ave/correlate.

It’s incredibly powerful for things like that.

Steve