Learn R Programming

Rpdb (version 2.2)

addLabels: Add Labels to the ‘rgl’ Scene

Description

Add Labels to the current ‘rgl’ scene.

Usage

addResLab(x, ...) "addResLab"(x, at.centre = TRUE, col = "black", ...) "addResLab"(x, at.centre = TRUE, col = "black", ...)
addResLab(x, ...) "addEleLab"(x, eleid = FALSE, col = "black", ...) "addEleLab"(x, eleid = FALSE, col = "black", ...)
info3d(...) "info3d"(x, id = rgl.ids(), col = "black", verbose = TRUE, adj = 0, ...) "info3d"(x, id = rgl.ids(), col = "black", verbose = TRUE, adj = 0, ...)

Arguments

x
an R object containing atomic coordinates.
at.centre
a single element logical vector indicating if residue labels have to be added only at the position of the residue's centre-of-mass instead of at each atomic position.
eleid
a single element logical vector indicating if the element ids have to be concatenated with the element names to prepare the labels.
col
the colors used to display the labels.
adj
one value specifying the horizontal adjustment, or two, specifying horizontal and vertical adjustment respectively. See rgl.texts
id
vector of ID numbers of ‘rgl’ items, as returned by rgl.ids. The vertexes of these items are used to display the labels.
verbose
a logical value specifying if information have to be printed to the terminal.
...
further arguments passed to or from other methods.

Value

addResLab and addEleLab return (using invisible) a two-column data.frame containing the IDs and type indicators of the objects added to the scene.

Details

addResLab add residue labels to the scene. If at.centre==TRUE only one label per residue is added at the centre of the residue. Otherwise, residue labels are added at each atomic positions.

addEleLab add element labels to the scene at each atomic positions.

info3d activate an interactive mode to add labels by selecting atoms by right-clicing on the current ‘rgl’ scene. To escape the interactive mode press the ESC key. The labels are as follow: "ResidResname:EleidElename"

See Also

pdb, visualize, measure

Examples

Run this code
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))
visualize(x, type = "l", mode = NULL)
addResLab(x)
x <- read.pdb(system.file("examples/Pentacene.pdb",package="Rpdb"))
visualize(x, type = "l", mode = NULL)
addEleLab(x)

Run the code above in your browser using DataLab