demo(md) is not working properly it not shows any graph

Issue #256 resolved
Former user created an issue
> # Read the starting PDB file to determine atom correspondence
> pdbfile <- system.file("examples/hivp.pdb", package="bio3d")

> pdb <- read.pdb(pdbfile)

> # Whats in the new pdb object
> print(pdb)

 Call:  read.pdb(file = pdbfile)

   Total Models#: 1
     Total Atoms#: 198,  XYZs#: 594  Chains#: 2  (values: A B)

     Protein Atoms#: 198  (residues/Calpha atoms#: 198)
     Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)

     Non-protein/nucleic Atoms#: 0  (residues: 0)
     Non-protein/nucleic resid values: [ none ]

   Protein sequence:
      PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKMIGGIGGFIKVRQYD
      QILIEICGHKAIGTVLVGPTPVNIIGRNLLTQIGCTLNFPQITLWQRPLVTIKIGGQLKE
      ALLDTGADDTVLEEMSLPGRWKPKMIGGIGGFIKVRQYDQILIEICGHKAIGTVLVGPTP
      VNIIGRNLLTQIGCTLNF

+ attr: atom, helix, sheet, seqres, xyz,
        calpha, remark, call

> pause()
Press ENTER/RETURN/NEWLINE to continue.

> # How many rows (frames) and columns (coords) present in trj
> dim(trj)
[1] 351 594

> ncol(trj) == length(pdb$xyz)
[1] TRUE

> pause()
Press ENTER/RETURN/NEWLINE to continue.

> # Trajectory Frame Superposition on Calpha atoms
> ca.inds <- atom.select(pdb, elety = "CA")

> xyz <- fit.xyz(fixed = pdb$xyz, mobile = trj, 
+              fixed.inds = ca.inds$xyz, 
+              mobile.inds = ca.inds$xyz)
> 

Comments (10)

  1. Xinqiu Yao

    Hi,

    Can you provide more information about this report? For example, what OS, R version and bio3d version did you use? (Use sessionInfo() to generate this information and post it here).

    Also, what did you see exactly when you ran demo(md)? Was it stuck in the middle of running? Is there any error message?

    Thanks and we are looking forward to seeing more details.

  2. Ayesha kanwal

    it was not stuck but gave no result and the cursor goes next . i was using R Commander on ubuntu version 14.10. today i use ( R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) )

    then it give an Error ... :

    print(pdb)

    Call: read.pdb(file = pdbfile)

    Total Models#: 1 Total Atoms#: 198, XYZs#: 594 Chains#: 2 (values: A B)

     Protein Atoms#: 198  (residues/Calpha atoms#: 198)
     Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)
    
     Non-protein/nucleic Atoms#: 0  (residues: 0)
     Non-protein/nucleic resid values: [ none ]
    

    Protein sequence: PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKMIGGIGGFIKVRQYD QILIEICGHKAIGTVLVGPTPVNIIGRNLLTQIGCTLNFPQITLWQRPLVTIKIGGQLKE ALLDTGADDTVLEEMSLPGRWKPKMIGGIGGFIKVRQYDQILIEICGHKAIGTVLVGPTP VNIIGRNLLTQIGCTLNF

    • attr: atom, helix, sheet, seqres, xyz, calpha, remark, call

      dcd

    Total Frames#: 351 dcd

    Total Frames#: 351 Total XYZs#: 594, (Atoms#: 198)

    [1]  51.842  59.784  -6.815  <...>  31.859  72.527  -31.861  [208494]
    
    • attr: Matrix DIM = 351 x 594

      print(pdb$xyz)

    Total Frames#: 1 Total XYZs#: 594, (Atoms#: 198)

    [1]  51.842  59.784  -6.815  <...>  55.089  55.232  -6.899  [594]
    
    • attr: Matrix DIM = 1 x 594

      print(dcd)

    Total Frames#: 351 Total XYZs#: 594, (Atoms#: 198)

    [1]  51.842  59.784  -6.815  <...>  31.859  72.527  -31.861  [208494]
    
    • attr: Matrix DIM = 351 x 594

      ca.inds <- atom.select(pdb, elety="CA") xyz <- fit.xyz(fixed=pdb$xyz, mobile=dcd,fixed.inds=ca.inds$xyz,mobile.inds=ca.inds$xyz) Error in eigen(RR) : LAPACK routines cannot be loaded

  3. Lars Skjærven

    So the error occurs with the command

    xyz <- fit.xyz(fixed=pdb$xyz, mobile=dcd,fixed.inds=ca.inds$xyz,mobile.inds=ca.inds$xyz)
    

    ?

    can you run the command example(eigen) ?

  4. Xinqiu Yao

    Hi,

    It seems the Lapack library installed on your machine has some problems with R. Note that R requires a Lapack v3.2 or above, Can you check the version of your Lapack and update it if it is below 3.2? Let me know if problem is still there.

  5. Ayesha kanwal

    Lars Skjarvan: it shows this result....

    example(eigen)

    eigen> eigen(cbind(c(1,-1), c(-1,1))) $values [1] 2 0

    $vectors [,1] [,2] [1,] -0.7071068 -0.7071068 [2,] 0.7071068 -0.7071068

    eigen> eigen(cbind(c(1,-1), c(-1,1)), symmetric = FALSE) $values [1] 2 0

    $vectors [,1] [,2] [1,] 0.7071068 0.7071068 [2,] -0.7071068 0.7071068

    eigen> # same (different algorithm). eigen> eigen> eigen(cbind(1, c(1,-1)), only.values = TRUE) $values [1] 1.414214 -1.414214

    $vectors NULL

    eigen> eigen(cbind(-1, 2:1)) # complex values $values [1] 0+1i 0-1i

    $vectors [,1] [,2] [1,] 0.8164966+0.0000000i 0.8164966+0.0000000i [2,] 0.4082483+0.4082483i 0.4082483-0.4082483i

    eigen> eigen(print(cbind(c(0, 1i), c(-1i, 0)))) # Hermite ==> real Eigenvalues [,1] [,2] [1,] 0+0i 0-1i [2,] 0+1i 0+0i $values [1] 1 -1

    $vectors [,1] [,2] [1,] -0.7071068+0.0000000i -0.7071068+0.0000000i [2,] 0.0000000-0.7071068i 0.0000000+0.7071068i

    eigen> ## 3 x 3: eigen> eigen(cbind( 1, 3:1, 1:3)) $values [1] 5.000000e+00 1.000000e+00 -4.440892e-16

    $vectors [,1] [,2] [,3] [1,] 0.5773503 -0.8451543 -0.9428090 [2,] 0.5773503 -0.1690309 0.2357023 [3,] 0.5773503 0.5070926 0.2357023

    eigen> eigen(cbind(-1, c(1:2,0), 0:2)) # complex values $values [1] 1.8846462+0.589743i 1.8846462-0.589743i -0.7692924+0.000000i

    $vectors [,1] [,2] [,3] [1,] 0.2777976-0.0567935i 0.2777976+0.0567935i 0.9191652+0i [2,] 0.8348414+0.0000000i 0.8348414+0.0000000i 0.2120584+0i [3,] 0.1814955+0.4355482i 0.1814955-0.4355482i 0.3319134+0i

  6. Ayesha kanwal

    i am new on R so i am facing too much troubles but i want solve them i also have issue with the following two commands i don't know how to install ncdf and how can i see the result on pymol in the next command please help me from the scratch i will be very thank full to you. write.ncdf(p1, "trj_pc1.nc") Error in write.ncdf(p1, "trj_pc1.nc") : Please install the ncdf package from CRAN

    view.dccm(cij, pdb, launch=TRUE) Error in view.dccm(cij, pdb, launch = TRUE) : object 'cij' not found

  7. Log in to comment