pymol(...)"pymol"(pdbs, col=NULL, as="ribbon", file=NULL, type="script", exefile=NULL, ...)"pymol"(...)"pymol"(...)"pymol"(modes, mode=NULL, file=NULL, scale=5, dual=FALSE, type="script", exefile=NULL, ...)"pymol"(dccm, pdb, file=NULL, step=0.2, omit=0.2, radius = 0.15, type="script", exefile=NULL, ...)
core.findto color on the invariant core. Alternatively, provide a vector containing the color code for each structure in the pdbs object.
NULL, use OS-dependent default path to the program.
pcaas obtained from functions
dccmas obtained from function
pdbas obtained from function
read.pdbor a numerical vector of Cartesian coordinates.
dccmcan be provided, e.g. to draw cylinders with radii associated to the pairwise correlation value.
pymol.modesfor nma and pca objects.
Visualize Bio3D structure objects in PyMOL
These functions provides a convenient approach for the visualization of Bio3D objects in PyMOL. See examples for more details.
DCCM PyMOL visualization:
This 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 R.py.
PyMOL will only be launched (and opened) when using argument
type='launch'. Alternatively a PDB file with CONECT records
will be generated (when argument
For the PyMOL version, PyMOL CGO objects are generated - each object representing a range of correlation values (corresponding to the actual correlation values as found in the correlation matrix). E.g. the PyMOL object with name cor_-1_-08 would display all pairs of correlations with values between -1 and -0.8.
NMA / PCA PyMOL vector field visualization: This function generates a PyMOL (python) script for drawing mode vectors on a PDB structure. The PyMOL script file is stored in the working directory with filename R.py.
Skjaerven, L. et al. (2014) BMC Bioinformatics 15, 399. Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
##- pymol with a 'pdbs' object attach(transducin)The following objects are masked from transducin (pos = 3): annotation, core, pdbs# build a pymol session containing all structures in the PDBs object pymol(pdbs)PyMOL script written to file R.pml# color by invariant core ( # core <- core.find(pdbs) pymol(pdbs, col=core)PyMOL script written to file R.pml# color by RMSF pymol(pdbs, col="rmsf")PyMOL script written to file R.pml# color by clustering rd <- rmsd(pdbs$xyz)Warning message: No indices provided, using the 305 non NA positionshc <- hclust(as.dist(rd)) grps <- cutree(hc, k=3) pymol(pdbs, col=grps)PyMOL script written to file R.pml##- pymol with a 'dccm' object ## Fetch stucture pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") ) ## Calculate normal modes modes <- nma(pdb)Building Hessian... Done in 0.075 seconds. Diagonalizing Hessian... Done in 0.131 seconds.## Calculate correlation matrix cm <- dccm.nma(modes)|======================================================================| 100%pymol(cm, modes$xyz)PyMOL script written to file R.py##- pymol with a 'nma' or 'pca' object pymol(modes, mode=7)PyMOL script written to file R.pydetach(transducin)