- edited description
Saves specifics frames from molecular dynamics
Issue #624
resolved
Hi everyone, i want to saves specifics frames (for example: frames 10 to 20 or just one frame), from my molecular dynamics and with the write.pdb option is not enough.
Can you help me with that.
This is part of my script:
ca.inds <- atom.select(pdb,resno = c(1:231), elety="CA")
ca.inds1 <- atom.select(pdb, resno = c(34:70), elety = "CA")
xyz <- fit.xyz(fixed=pdb$xyz[1,], mobile=dcd, fixed.inds=ca.inds$xyz, mobile.inds=ca.inds$xyz)
Thanks a lot
Comments (4)
-
reporter -
reporter - edited description
-
Just use the frames you want as the
xyz
row indices.For example, if I want to output frame 10 and separately frames 12 to 15:
write.pdb(pdb, xyz=xyz[10,], file="myframe_10.pdb") write.pdb(pdb, xyz=xyz[12:15,], file="myframe_12-15.pdb")
This assumes your
pdb
object matches your trajectory andxyz
is the trajectory in the from you want (following on from your code above). -
- changed status to resolved
- Log in to comment