How to dump result in single file?

Hi All

I want to dump velocity of single particle every “N” iteration and “M” number of times but using the command “Dump” gave me the velocity in each iteration in single file (i.e total of M number of files). Could there be any trick to put all in single file.

Reards,
Z

If you want the velocity of a single specific particle, you can use an equal style variable:

variable velx equal vx[ATOM-ID]

You can use that with any of the usual output methods.

What do you mean by every N iteration and M number of times?

What do you mean by every N iteration and M number of times?

I agree. This question is too vague.

    I don't know if this helps, but you can use the "dump_modify"
command to append trajectory data to the end of an existing dump file.
(This works for both coordinate and velocity data.) If you are
careful, perhaps you can use this to reduce the number of files:

http://lammps.sandia.gov/doc/dump_modify.html

# -------------- Usage example: --------------

# -------------- "input_script1.in" --------------
dump 1 all custom 5000 traj_xyz.lammpstrj id mol type x y z ix iy iz
dump 2 all custom 5000 traj_vel.lammpstrj id vx vy vz

run 50000

write_data system_t50000.data

# -------------- "input_script2.in" --------------
# (run this script after running "input_script1.in")

read_data system_t50000.data
dump 1 all custom 5000 traj_xyz.lammpstrj id mol type x y z ix iy iz
dump 2 all custom 5000 traj_vel.lammpstrj id vx vy vz
dump_modify 1 append yes
dump_modify 2 append yes

run 50000

: