while calculating dccm, i found the error: cannot allocate vector of size 69.7 Gb

Issue #334 resolved
Former user created an issue

Dear sir,

I am a new user of both R and bio3d.. My aim is to build the correlation network from my previous MD results.My dcd file size is 6 GB and my pdb file contains 32242 atoms. i am using ubuntu 64-bit os with memory 3.8GiB. my dcd file summary is as follows: NATOMS =32242 NFRAME = 1000 ISRART = 0 last = 1000 nstep =1000 nfile = 1000 NSAVE = 1 NDEGF = 0 version 24

While calculating the dccm i found the bellow error:

Error: cannot allocate vector of size 69.7 Gb.

please help me out. i am in a hurry.

looking forward your response,

kajwal

Comments (7)

  1. Xinqiu Yao

    Your input to calculate DCCM is too large (32242 atoms). Do you have water molecules in the DCD file? Usually, water should be removed in advance using e.g. cpptraj, VMD, or bio3d. You may also consider removing all heavy atoms except for C-alpha to further reduce file size.

  2. Kajwal Kumar Patra

    Dear sir, thank you for your response. I dont have water molecules in my dcd file. secondly i didn't select the total atoms for the dccm calculation. please look into my commands bellow:

    .> trjfile <- "nw_1000_eq8.dcd"

    trj <- read.dcd(trjfile) pdbfile <- "nw_T592D_neutral.pdb" pdb <- read.pdb(pdbfile) inds <- atom.select(pdb, chain = "A", elety ="CA") # this selection shows 447 atoms xyz <- fit.xyz(pdb$xyz, trj, fixed.inds=inds$xyz, mobile.inds=inds$xyz) cij <- dccm(xyz)

    error: cannot allocate vector of size 69.7 Gb

    This may help in someway, looking forward your response,

    sincerely,
    kajwal

    .

  3. Barry Grant

    Your cij <- dccm(xyz) command is working on all atoms. You likey want cij <- dccm( xyz[,inds$xyz] ) so it will operate only on your selected alpha Carbon atoms of chain A.

    Note that you should check the dimensions of your input to determine whether it matches your expectations (e.g. dim(xyz); dim(xyz[,inds$xyz]) with the number of columns reported being 3N, where N is your number of atoms, and the number of rows being your number of frames).

    If your calculation still takes up too much memory you can either buy more memory or reduce the number of frames being considered, e.g. skip_frame <- seq(1, nrow(xyz), by=5); cij <- dccm( xyz[skip_frame, inds$xyz] )

  4. Barry Grant

    To developers:
    Should we implement a new Rcpp version of dccm.xyz()? It appears that users trajectories are getting larger and larger (even though this example issue was likely a mistake).

  5. Kajwal Kumar Patra

    Dear sir,

    thank you for your valuable advice. now i think i can manage to proceed .

    thanking you,

    kajwal

  6. Log in to comment