split lammps dump file

Dear lammps users

I want to get whole molecules in VMD. I dump out my trajectories by following commands

dump 1 all custom 100 coro-x.lammpstrj id type q x y z ix iy iz mass element vx vy vz

dump_modify 1 element C H O

Thus vmd can get more information (including the elements name) about my systems.

Then and then I loaded the coro-x.lammpstrj to vmd. To wrap molecules to box, I typed following commands in TK console

pbc wrap -compound res -all

pbc box

At first 3000 frames, the molecules are in box and the molecules are intact. However, the molecules are out box after 3000 frames.

Then I deleted the all frames. And then I reloaded the trajectory to vmd, followed by typing following commands.

pbc wrap -compound fragment -all

pbc box

The same problems occured again (The molecules are in the box at first 3000 frames and out of box after that).

My guess is that my dump file is too big (I have loaded 15000 frames) to be handled by VMD, so the “wrap –compound” command just works for the first 3000 frames. (I am not sure about my guess.)

I want to split the dump file to several small parts and retry it with “wrap –compound” command

to see whether I can get the get whole molecules or not in all frames. My first try was to load the frames to pizza.py and split it. I have tried dump tool in pizza.py with following commands

d=dump(“coro-x.lammpstrj”)

read 0 snapshots

0 snapshots selected out of 0

assigned columns: id type q x y z ix iy iz mass element vx vy vz

It seems there are no frames.

My question is

how can I split dump file generated by lammps?

Sincerely

Fan Li

Dear lammps users

I want to get whole molecules in VMD. I dump out my trajectories by
following commands

dump 1 all custom 100 coro-x.lammpstrj id type q x y z ix iy iz mass element
vx vy vz

dump_modify 1 element C H O

Thus vmd can get more information (including the elements name) about my
systems.

Then and then I loaded the coro-x.lammpstrj to vmd. To wrap molecules to
box, I typed following commands in TK console

pbc wrap -compound res -all

pbc box

At first 3000 frames, the molecules are in box and the molecules are intact.
However, the molecules are out box after 3000 frames.

Then I deleted the all frames. And then I reloaded the trajectory to vmd,
followed by typing following commands.

pbc wrap -compound fragment -all

pbc box

The same problems occured again (The molecules are in the box at first 3000
frames and out of box after that).

My guess is that my dump file is too big (I have loaded 15000 frames) to be
handled by VMD, so the “wrap –compound” command just works for the first
3000 frames. (I am not sure about my guess.

you guess is wrong. VMD has no limit in terms of how many frames it
can process outside of your available RAM (and swap space).
there is likely something else wrong, e.g. you are processing
trajectory data, when VMD is still reading it.

I want to split the dump file to several small parts and retry it with “wrap
–compound” command

splitting dump files is trivial. just figure out how many lines a
single frame contains, and then you can use a simple script or shell
script tools like "head" and "tail" to chop your file into pieces
containing a suitable multiple of that number of lines.

axel.