Loading part of dcd file

Issue #549 resolved
Former user created an issue

Hello,

I have a trajectory file (dcd) with 100 frames. How can I load only selected window of frames - let's say from 50th to 100th frame?

Margo

Comments (2)

  1. Xinqiu Yao

    read.dcd() does not support trimming frames. If the trajectory file is not so large, load it completely and select frames directly in R. For example,

    trj <- read.dcd('trj.dcd')
    trj.sub <- trj[50:100, ]
    

    Otherwise, convert DCD to NetCDF (using VMD etc.) and use read.ncdf() to read a subset of the trajectory.

  2. Log in to comment