Lammps set

Dear Lammps users,

I have a question on set the coordinates/velocities of atoms.

Suppose I run a NVE assemble for 1000 time steps. Then I calculate the
time averages of the coordinates & velocities of each atom by using fix
ave/atom. Now i want to set the initial conditions to be the time averaged
coordinates & velocities. Here is part of my input file:

Dear Lammps users,

I have a question on set the coordinates/velocities of atoms.

Suppose I run a NVE assemble for 1000 time steps. Then I calculate the
time averages of the coordinates & velocities of each atom by using fix
ave/atom. Now i want to set the initial conditions to be the time averaged
coordinates & velocities. Here is part of my input file:

Why do you want to do this, I can’t see any purpose in doing this.

#--------------------------------------------------------------------

fix coords all ave/atom 1 1000 1000 x y z
fix velocity all ave/atom 1 1000 1000 vx vy vz

set group all x f_coords[1] y f_coords[2] z f_coords[3]
velocity all set f_velocity[1] f_velocity[2] f_velocity[3] units box
#-------------------------------------------------------------------

But obviously it is not correct, since the value should be a scalar rather
than a vector.
Would you please give any suggestions?

If you still want to do this for some unknown reason then write/output those time averaged positions and velocities to a file and then read them using read_data command.

set group all x f_coords[1] y f_coords[2] z f_coords[3]
velocity all set f_velocity[1] f_velocity[2] f_velocity[3] units box

This syntax is not allowed for either the set or velocity command.
There is nothing in the doc pages for the 2 commands that
indicates you can do this.

Steve