writing per-atom vector to a file

Thank you so much for your explanations.

Actually, I have been successful in exporting the global scalars into the log file. However, I have many parameters to calculate (for different groups of atoms), and log file will get very big and difficult to work with. This is why I’m interested in writing each family of outputs to files.

The decimal precision?
I used ave/time for averaging over a period of 1 (Nice idea :slight_smile: ). However, it reduces the decimal numbers precision. That is I exported the output of the same parameter using ave/time and thermo_style custom, but in the former, the numbers are rounded:

compute cent1 R1 centro/atom fcc
fix cent1 R1 ave/atom 5 99 500 c_cent1
compute cent11 R1 reduce ave f_cent1

compute cent2 R2 centro/atom fcc
fix cent2 R2 ave/atom 5 99 500 c_cent2
compute cent22 R2 reduce ave f_cent2

compute cent3 R3 centro/atom fcc
fix cent3 R3 ave/atom 5 99 500 c_cent3
compute cent33 R3 reduce ave f_cent3

fix cent all ave/time 1 1 500 c_cent11 c_cent22 c_cent33 file tmp.cent11 mode scalar

fix ave/time log File
cent11 cent22 cent33 cent11 cent22 cent33
0 0 0 0 0 0 0
500 12.4682 0.000348329 17.647 12.468158 0.000348329 17.647032
1000 12.4681 0.000350504 17.6469 12.468078 0.000350504 17.646918
1500 12.468 0.000351063 17.6468 12.46801 0.000351063 17.646822
2000 12.4679 0.000356231 17.6466 12.467868 0.000356231 17.646618
2500 12.4673 0.000360542 17.6458 12.467272 0.000360542 17.645774
3000 12.4675 0.000366515 17.646 12.467465 0.000366515 17.646044
3500 12.4676 0.000363688 17.6462 12.467606 0.000363688 17.646244
4000 12.4671 0.00037968 17.6455 12.467084 0.00037968 17.6455
4500 12.4665 0.000385827 17.6447 12.466522 0.000385827 17.644699

Here it may not seem that significant, but can I ask what we can do to prevent from rounding? Thanks

Added a “format” keyword option to the fix ave/time and fix ave/chunk commands.

Will be in the next patch.

Steve