problem in loading dcd file
I have created dcd files using online MD analysis tools. When I loaded dcd files in bio3d, I am getting the following error. So, could you please let me know how to resolve this.
> trj <- read.dcd(trtfile, cell = TRUE)
NATOM = 392
NFRAME= 0
ISTART= 0
last = 0
nstep = 0
nfile = NaN
NSAVE = 0
NDEGF = 0
version 26
Reading (x100)Error in txtProgressBar(1, nframes, style = 3) : must have 'max' > 'min'
In addition: Warning message:
In dcd.header(trj, verbose) :
Check DCD header data is correct, particulary natom
Comments (17)
-
-
- marked as minor
-
- edited description
-
reporter Hi Barry, Unfortunately, I did not install VMD in my laptop. Is there any other way to visualize the dcd file?
-
VMD is the most convenient way to check trajectory file format, and it is not difficult to install. Actually, for most OS (Windows, Linux, Mac, Solaris) you can simply download the binary version of VMD and use it immediately (http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD).
Let us know if this has solved your problem or not.
-
reporter Hi Xin-Qiu Yao,
Thank you for the suggestion. I have installed VMD on ubuntu and loaded the trajectory files. But I couldn't see anything on vmd when I loaded the DCD file that I generated using bio3d. It's giving the error saying that problem in loading the file. So, please help me how to resolve this issue.
Many Thanks.
-
you probably need to load the DCD data into molecule with topology information. e.g. open the PDB file first, then use File -> Load data into molecule (to load the DCD frames). note that the PDB file must have the same number of atoms (and order) as your DCD file.
-
Yes, indeed. Try what Lars has suggested. Also, make sure you have proper suffix for your DCD file (.nc) otherwise you may have to select filetype manually (In the 'File -> New Molecule -> Molecule File' window, select CHARMM,NAMD,XPLOR DCD Trajectory under the 'Determine file type' menu).
-
.dcd, right?
-
Oh, yeah. Sorry, .nc is for NetCDF format.
-
From Hema Latha:
Hi Lars and Xin,
Thank you for your suggestions. I have loaded PDB files along with DCD file as per ur instructions. But as Lars said, the number of atoms in PDB file doesn't correspond to DCD file. I have the following input when I loaded the files on vmd.
PDB file of Crystal Structure 2994 atoms 1 frame
DCD file of Crystal Structure 392 atoms 10003 frame
PDB file of model 7190 atoms 1 frame
DCD file of model 469 atoms 10003 frame
One more thing. When I tried to plot the RMSD in vmd using RMSD trajectory tool, I am not able to see any plot. It's just popping up empty without generating any plots. Do I need to install Xmgrace for this to visualize the plot? Kindly advice.
Thank you.
Hema.
-
You have to trim your PDB file to match your DCD first! For example, if your DCD contains C-alpha atoms only, try
pdb <- trim(pdb, 'calpha') write.pdb(pdb, file='ca.pdb')
Then, in VMD open 'ca.pdb' as a new molecule and load your DCD file into this molecule.
I am not familiar to VMD RMSD trajectory tool and so can't give any suggestion. Read VMD manual please and you may find answers.
-
- changed status to resolved
-
I am also facing a similar problem of loading .dcd file. I got a following error. Any suggestions why it is not loading the no. of frames. (Note: file size is 3.1 GB)
dcd <- read.dcd("production.dcd")
NATOM = 50932
NFRAME= 0
ISTART= 5000
last = 5000
nstep = 5000
nfile = 1
NSAVE = 5000
NDEGF = 0
version 24
Reading (x100)Error in txtProgressBar(1, nframes, style = 3) : must have 'max' > 'min'
sessionInfo() R version 3.2.4 Revised (2016-03-16 r70336) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.2 LTS
locale: [1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=en_IN LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=Cattached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] bio3d_2.2-4
loaded via a namespace (and not attached): [1] bigmemory.sri_0.1.3 bigmemory_4.4.14 tools_3.2.4
[4] parallel_3.2.4 grid_3.2.4 -
Can you open the .dcd file with VMD? If it succeeds with VMD, then from VMD you can output a new .dcd file by clicking File -> Save coordinates, from the popped up window select 'dcd' for File type and save. Then, try again with bio3d to read the new .dcd file. Let me know what you get.
-
Yes I can open the .dcd file with VMD. I followed your instructions. Now I can read the .dcd file with bio3d. But for this I had to increase the stride, .dcd file saved with lower stride could not be loaded to bio3d because of its larger size.
-
Yes, please do increase the stride if your trajectory file is too large (e.g. tens of Gb).
- Log in to comment
Its hard to say from your message. Can you read into VMD and see the expected number of frames displayed? The message above says 392 atoms but 0 frames.