Issue in tutorial (Protein Structure Networks with Bio3D)

Issue #440 resolved
joyce770109 created an issue

A green hand at "R". I am trying to follow tutorial http://thegrantlab.org/bio3d/tutorials/protein-structure-networks

Error 1 like this:

https://bitbucket.org/Grantlab/bio3d/issues/325/error-in-cmdscale-dist-cent-k-k-na-values

I updated to the latest version that can't solve the problem.

My structure have zinc finger.

I delete the zinc that can solve the problem. (or any non-residue that bio3d can't read atom?)

Error 2:

vmd.cna(net, pdb, launch = TRUE)

Error in vmd.cna(net, pdb, launch = TRUE) : Launching external program failed make sure 'vmd.exe' is in your search path

I try to search error message:

http://thegrantlab.org/bio3d/html/vmd.cna.html

The web page told me that : vmd(...)

exefile: file path to the ‘VMD’ program on your system (i.e. how is ‘VMD’ invoked). If NULL, use OS-dependent default path to the program.

vmd(exefile = "C:/Program Files (x86)/University of Illinois/VMD/vmd.exe")

Error in UseMethod("vmd") : no applicable method for 'vmd' applied to an object of class "character"

vmd.cna(exefile = "C:/Program Files (x86)/University of Illinois/VMD/vmd.exe")

Error in match(x, table, nomatch = 0L) : argument "x" is missing, with no default

vmd.cna(exefile = NULL)

Error in match(x, table, nomatch = 0L) : argument "x" is missing, with no default

vmd(exefile = NULL)

Error in UseMethod("vmd") : no applicable method for 'vmd' applied to an object of class "NULL"

How can I change the vmd.exe search path?

vmd.cna(net, pdb, launch = TRUE)

Error in vmd.cna(net, pdb, launch = TRUE) : Launching external program failed make sure 'vmd.exe' is in your search path

Comments (7)

  1. Lars Skjærven

    For problem 1: Can you please elaborate more on this problem. E.g. paste some key commands that leads up to this error.

    For problem 2: vmd.cna() will output a couple of files that you can open in VMD. Thus, you can open VMD externally, then load the .pdb and .vmd files as you normally do. The launch argument is just for lazy chaps.

  2. joyce770109 reporter

    Error1 I delete the zinc that can solve the problem.

    If the structure have zinc:

    ATOM 7441 Zn ZNB 476 60.999 47.471 78.078 1.00 0.00 ZN

    Try this:

    length(net$x$communities$membership)

    Ans: 0

    sum(pdb$calpha)

    Ans: 751

    length(net$x$communities$membership)==sum(pdb$calpha)

    Ans: FALSE

    I delete the zinc that can solve the problem.

    library(bio3d)

    library(igraph)

    Attaching package: ‘igraph’ The following object is masked from ‘package:bio3d’: gnm The following objects are masked from ‘package:stats’: decompose, spectrum The following object is masked from ‘package:base’: union

    pdbfile <- system.file("C:/WT1/WT1.pdb", package = "bio3d")

    pdb <- read.pdb("C:/WT1/WT1.pdb")

    modes <- nma(pdb)

    Building Hessian... Done in 0.39 seconds. Diagonalizing Hessian... Done in 15.41 seconds. Warning message: In nma.pdb(pdb) : Possible multi-chain structure or missing in-structure residue(s) present Fluctuations at neighboring positions may be affected.

    cij <- dccm(modes)
    |================================================================================================| 100%

    net <- cna(cij, cutoff.cij=0.3)

    print(net)

    Call: cna.dccm(cij = cij, cutoff.cij = 0.3) Structure: - NETWORK NODES#: 751 EDGES#: 6735 - COMMUNITY NODES#: 10 EDGES#: 16 + attr: network, communities, community.network, community.cij, cij, call

    x <- summary(net)

    id size members 1 56 c(1:4, 103, 512:539, 588:610) 2 137 c(5:102, 104:117, 583:587, 681:700) 3 64 c(118:138, 159:169, 193:200, 728:751) 4 128 c(139:158, 201:215, 237:240, 242:243, 420:455, 611:658, 725:727) 5 76 c(170:192, 216:236, 241, 244:273, 275) 6 92 c(274, 276:287, 301:306, 326, 351:360, 386:416, 467:473, 701:724) 7 37 c(288:300, 327:350) 8 58 c(307:325, 361:385, 417:419, 456:466) 9 102 c(474:511, 540:582, 660:680) 10 1 659

    attributes(x)

    $names [1] "id" "size" "members" "tbl"

    x$members[5]

    $5 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 216 217 218 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 241 244 245 246 247 248 249 250 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 241 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 275 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 275

    par(mfcol = c(1, 2), mar = c(0, 0, 0, 0))

    plot(net, pdb, full = TRUE, vertex.label.cex=0.7)

    Obtaining layout from PDB structure Error in cmdscale(dist(cent), k = k) : NA values not allowed in 'd'

    plot(net, pdb)

    Obtaining layout from PDB structure

    vmd.cna(net, pdb, launch = TRUE)

    Error in vec2resno(vec = x$communities$membership, resno = pdb$atom[, : Length miss-match of 'vec' and concetive 'resno'

  3. joyce770109 reporter

    Error 2 I get "network.pdb" and "network.vmd" in Win7 PC. (C:\Users\user\Documents)

    In VMD 1. Load "network.pdb" 2. Load visualization state..."network.vmd"

    Thank you very much!

  4. Lars Skjærven

    vmd.cna() expects a c-alpha only file. add pdb.ca <- trim(pdb, "calpha") prior to vmd.cna() and input pdb.ca instead. Silly stuff and this should be noted both in the documentation and in the tutorial.

  5. Log in to comment