write.mmds.pdb {bios2mds} | R Documentation |
Writes PDB file
Description
Writes MDS coordinates in the Protein Data Bank format for visualization with a molecular graphics viewer.
Usage
write.mmds.pdb(x,project = NULL, axis = c(1, 2, 3), file.pdb = "R.pdb", file.pml=NULL)
Arguments
x |
an object of class 'mmds', obtained from |
project |
an object of class 'project', obtained from |
axis |
a numeric vector of length three the principal components to be displayed. Default is c(1, 2, 3). |
file.pdb |
a string of characters indicating the output PDB file name. Default is "R.pdb". |
file.pml |
a string of characters indicating the output pml file name for visualization with Pymol. If this parameter is not NULL, the pml file will be written. Default is NULL. |
Details
The elements can be visualized in three dimensions (3D) with a molecular viewer as Pymol or Rasmol.
If x
contains active and supplementary elements, the active and supplementary elements are numbered from 1 and from 5001, respectively. If group is not NULL, the assignment of an element to a group is indicated by the chain name from A for the first group to Z when the maximum number of groups, 26, is reached.
The pml file allows a fancy visualization of the PDB file with the Pymol molecular viewer. The user must first open the PDB file with Pymol, then run the pml file. The active and inactive elements will be displayed as spheres and crosses, respectively, with coloring based on the user-provided colors with the col.group
function.
Value
Produces a PDB file from the MDS coordinates, with the elements numbered in the order of the MSA file and the groups corresponding to the chain numbers. Optionnaly, produces a pml file to add color and group selection in pymol with the pdb file.
Author(s)
Julien Pele and Jean-Michel Becu
References
http://www.wwpdb.org/docs.html
See Also
write.pdb
function from bio3d
package.
Examples
# writing the first three MDS coordinates of human GPCRs in a PDB file
wd <- tempdir()
#wd <- getwd()
file1 <- file.path(wd,"sapiens.pdb")
file2 <- file.path(wd,"sapiens.pml")
data(gpcr)
write.mmds.pdb(gpcr$mmds$sapiens.active,file.pdb=file1,file.pml=file2)