Extract multiple selective frames from a dcd trajectory file
Issue #913
new
I would like to extract specific frames of a trajectory and write them into a pdb file separately. Can I get any possible inputs in this regard?
Basically, what you need is to play with the
write.pdb()
function, which allows you to give a new coordinate setxyz
to override the default one in the pdb object. For example,write.pdb(pdb, xyz=traj[100,], file=”XXX.pdb”)
, where100
is the 100th frame. You can use a loop to write multiple frames. Check?write.pdb
for more detail.I also suggest going through bio3d tutorials, http://thegrantlab.org/bio3d/, which should be more helpful for getting ideas.
Hope it helps.