RMSF issue for multiple dcd file

Issue #961 new
Mahnaz Tehrani created an issue

Hi all,

I have multiple .dcd trajectory files (3 .dcd files) and would like to read and combine them for RMSF calculation. I have used the following command lines and got an issue. Any help will be appreciated.

Bests

Zahra


library(bio3d,lib.loc="/storage/brno2/home/zahratehrani7/R/x86_64-pc-linux-gnu-library/4.0")

trajs  <- list.files("/multiple-dcd/trajs", pattern="*.dcd", full.names=TRUE)

dcd <- lapply(trajs, function(x) {

data <- read.dcd(x)

})

frames <- as.numeric(unlist(dcd))

pdb <- read.pdb("model.pdb")

ca.inds <- atom.select(pdb, elety = "CA")

xyz <- fit.xyz(fixed = pdb$xyz, mobile = frames,

fixed.inds = ca.inds$xyz,

mobile.inds = ca.inds$xyz)

rf <- rmsf(xyz[,ca.inds$xyz])

plot.bio3d(rf, ylab="RMSF (Å),test", xlab="Residue No.", type="l")


Error:

loading r/4.0.0-gcc

Loading requirement: gcc/8.3.0 tcltk/8.6 jdk/8 intelcdk/19u3

Warning messages:

1: In readChar(trj, 80) : truncating string with embedded nuls

2: In readChar(trj, 80) : truncating string with embedded nuls

3: In readChar(trj, 80) : truncating string with embedded nuls

4: In readChar(trj, 80) : truncating string with embedded nuls

5: In readChar(trj, 80) : truncating string with embedded nuls

6: In readChar(trj, 80) : truncating string with embedded nuls

Error in rmsf(xyz[, ca.inds$xyz]) : input 'xyz' has NULL dimension

Execution halted

Comments (3)

  1. Xinqiu Yao

    Hi

    The line containing as.numeric(unlist(dcd))destroys the dimension of the coordinates. I would suggest you try frames <- do.call(rbind, dcd).

  2. Log in to comment