3

I started working with R package called Bio3D (http://thegrantlab.org/bio3d/index.php) and encountered a problem during reproducing examples from "Protein Structure Networks with Bio3D" tutorial (http://thegrantlab.org/bio3d/tutorials/protein-structure-networks). Here is the fragment I am trying to do:

" The code snippet below first sets the file paths for the example HIVpr starting structure (pdbfile) and trajectory data (dcdfile), then reads these files (producing the objects dcd and pdb).

dcdfile <- system.file("examples/hivp.dcd", package = "bio3d")    
pdbfile <- system.file("examples/hivp.pdb", package = "bio3d")   

# Read MD data    
dcd <- read.dcd(dcdfile)   
pdb <- read.pdb(pdbfile)   

inds <- atom.select(pdb, resno = c(24:27, 85:90), elety = "CA")    
trj <- fit.xyz(fixed = pdb$xyz, mobile = dcd,    
               fixed.inds = inds$xyz, mobile.inds = inds$xyz)    

Once we have the superposed trajectory frames we can asses the extent to which the atomic fluctuations of individual residues (in this very short example simulation) are correlated with one another and build a network from this data:

cij <- dccm(trj)    
net <- cna(cij)    
plot(net, pdb)   

"

And till this moment everything works well.

# View the correlations in pymol    
view.dccm(cij, pdb, launch = FALSE)     

Here I open generated pdb file corr.inpcrd with pymol. But instead of nice cartoon 3D model I see just aminoacid residues represented by dots. Tried to solve the problem with pymol using settings for cartoons, ribbons, colors, transparency and command show but it changed nothing. Would be grateful for your suggestions!

I have not enough reputation to illustrate expected and obtained outcome with images but probably I will be able to send them directly if necessary.

Thank you!

Konstantin
  • 35
  • 7
  • 1
    why is this tagged python? – Padraic Cunningham Dec 10 '14 at 10:16
  • @PadraicCunningham because of PyMOL probably... – Cld Dec 10 '14 at 10:27
  • Bio3d view.dccm function generates a PyMOL (python) script that will draw colored lines between (anti)correlated residues. The PyMOL script file is stored in the working directory with filename “corr.py”, with coordinates in PDB format with filename “corr.inpcrd.pdb”. – Konstantin Dec 10 '14 at 10:32

2 Answers2

0

Try setting launch=TRUE in your call to the view.dccm() function to have both PDB and pymol script loaded for you.

Barry
  • 1
  • Thanks for the suggestion, Barry! Tried to run it like this: view.dccm(cij, pdb, type = "pymol", launch = TRUE, exefile = "C:/Python27/PyMOL/PyMOL.exe") – Konstantin Dec 10 '14 at 14:31
  • Got following message starting with sensless symbols combination: ""pymol" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ© Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬. Error in view.dccm(cij, pdb, type = "pymol", launch = TRUE, exefile = "C:/Python27/PyMOL/PyMOL.exe") : An error occurred while running command 'C:/Python27/PyMOL/PyMOL.exe' In addition: Warning messages: 1: running command 'C:\Windows\system32\cmd.exe /c "pymol corr.py"' had status 1 2: In shell(shQuote(cmd)) : '"pymol corr.py"' execution failed with error code 1" – Konstantin Dec 10 '14 at 14:34
  • But at the same time call 'system("C:/Python27/PyMOL/PyMOL.exe", intern = FALSE, ignore.stdout = FALSE, ignore.stderr = FALSE, wait = TRUE, input = NULL, show.output.on.console = TRUE, minimized = FALSE, invisible = TRUE)' opens PyMOL with no problem. – Konstantin Dec 10 '14 at 14:40
0

Typically this will work if pymol is in your path for executables (see here: http://tinyurl.com/lzhpz3w for more about where bio3d expects to find pymol and muscle).

view.dccm(cij, pdb, launch = FALSE) 

I don't use windows myself but if you post this question on the bio3d bitbucket issues page https://bitbucket.org/Grantlab/bio3d/issues you will get help from experienced windows bio3d users including the author of this function.

  • Thank you! This solved the problem! As I use windows I followed this recommendation from the link you provided: "For Windows, right click "My computer" -> click "Change settings" -> Advanced -> Environment Variables -> From "System variables" list find "Path" and click "Edit" -> Add the path to your programs at the end of the line." After that I called the function as in the tutorial and as Barry advised: `view.dccm(cij, pdb, launch = FALSE)` – Konstantin Dec 11 '14 at 16:36