R package Bio3D tutorial reproducing

1.2k views Asked by At

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!

2

There are 2 answers

1
user4346114 On BEST ANSWER

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.

3
Barry On

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