Dear all,
I am trying to follow the position and velocity of a limited number of
atoms with time in a simulation. I would like to average these
informations over time and print them in an output file.
I tried the following commands (ions is the group of atoms I'm interested in):
compute 4 ions property/atom xu
fix 9 ions ave/time 10 20 200 c_4 file xu.ions
However I get the following error:
ERROR: Fix ave/time compute does not calculate a scalar (fix_ave_time.cpp:181)
The error persists if I select the positions of particular atoms:
compute 4 ions property/atom xu
fix 9 ions ave/time 10 20 200 c_4[0] c_4[1] ... file xu.ions
So I was wondering if there could be another way to achieve my aim
with lammps? Or if fix ave/time could be extended to allow this kind
of use?
Best regards,
Laurent
Dear all,
I am trying to follow the position and velocity of a limited number of
atoms with time in a simulation. I would like to average these
informations over time and print them in an output file.
I tried the following commands (ions is the group of atoms I'm interested in):
compute 4 ions property/atom xu
fix 9 ions ave/time 10 20 200 c_4 file xu.ions
However I get the following error:
ERROR: Fix ave/time compute does not calculate a scalar (fix_ave_time.cpp:181)
The error persists if I select the positions of particular atoms:
compute 4 ions property/atom xu
fix 9 ions ave/time 10 20 200 c_4[0] c_4[1] ... file xu.ions
So I was wondering if there could be another way to achieve my aim
with lammps? Or if fix ave/time could be extended to allow this kind
of use?
tracking per-atom properties is tricky, since atoms migrate across
domains and the averaging information needs to be migrated with them.
not impossible, but a lot of programming work.
if it is a very small number of atoms, you could do a compute reduce
for each and thus turn them into global properties.
another possibility would be to use ave/histo or ave/spatial and
reduce the resolution of the result.
axel.
I think fix ave/atom can do what you want. The
fix group will limit the number of atoms. It can
work with unwrapped coords if you give it
a suitable compute property/atom.
Steve
Thanks a lot for your answers. As I need to track the individual
positions and velocities of... 64 atoms, I will go for fix ave/atom
and dump custom (using dump modify sort), followed by a simple script
to get x(t) and v(t) for each atom.
Best regards,
Laurent