Dear All,
I was wondering if there are any tools to concatenate specific frames from different dcd files. Say, you have file1.dcd, file2.dcd, file3.dcd and so on where my frames of interest are scattered across these 3 dcd files. This is in context of the Replica Exchange Simulations in LAMMPS where the configurations at temperature of interest are scattered across different dcd files.
Any suggestions?
Regards
Aditya
Dear All,
I was wondering if there are any tools to concatenate specific frames from different dcd files. Say, you have file1.dcd, file2.dcd, file3.dcd and so on where my frames of interest are scattered across these 3 dcd files. This is in context of the Replica Exchange Simulations in LAMMPS where the configurations at temperature of interest are scattered across different dcd files.
you could try CatDCD
https://www.ks.uiuc.edu/Development/MDTools/catdcd/
in a first pass, extract the ranges you want from the individual dcd
files and then concatenate those to a single file.
axel.
Thanks Axel. However, I was wondering if catdcd would work when the frames are not in a contiguous order. I do not see an option in catdcd where a specific sequence of frames could be explicitly specified instead of just the -first -last flags which would account for a contiguous stretch. Am I missing something?
Thanks Axel. However, I was wondering if catdcd would work when the frames are not in a contiguous order. I do not see an option in catdcd where a specific sequence of frames could be explicitly specified instead of just the -first -last flags which would account for a contiguous stretch. Am I missing something?
there isn't going to be a tool that will do *exactly* what you want
unless you write it yourself or using tools to do pieces of the work,
e.g. within VMD using tcl script or using other MD scripting
interfaces/tools/frameworks. don't look for the one tool that does
everything in one step, or you will always be at a loss, but break
down the task into steps, and you will find that those are much more
likely to be done with available tools. it requires a bit of creative
thinking and problem solving skills. however, both of them should be
plentiful with anybody aiming to have a successful scientific career.
as i already mentioned in some kind of shortcut notation, you can
write a (shell/python) script that breaks down the individual .dcd
files into segments (using -first -last) and then reassemble them so
that all of them follow a single temperature instead of a single
system.
an alternate approach would be to load all trajectories into VMD
(assuming a computer with lots of RAM) and then create new files from
"molecule new atoms XXX" and then using "animate dup" to create new
and "empty" frames and the define atom selections to copy over the
coordinates frame by frame. this is off-topic to explain in more
detail here. but also, there are lots of details in the VMD user's
guide (and it doesn't hurt to teach yourself some advanced Tcl script
programming, too).
so what you are missing is the big picture and the fact, that you can
build solutions from pieces, and CatDCD can be one piece, even if it
is not the complete solution.
axel.