addLabels {Rpdb} | R Documentation |
Add Labels to the ‘rgl’ Scene
Description
Add Labels to the current ‘rgl’ scene.
Usage
addResLab(x, ...)
## S3 method for class 'atoms'
addResLab(x, at.centre = TRUE, col = "black", ...)
## S3 method for class 'pdb'
addResLab(x, at.centre = TRUE, col = "black", ...)
addEleLab(x, ...)
## S3 method for class 'atoms'
addEleLab(x, eleid = FALSE, col = "black", ...)
## S3 method for class 'pdb'
addEleLab(x, eleid = FALSE, col = "black", ...)
info3d(...)
## S3 method for class 'atoms'
info3d(x, id = rgl::rgl.ids(), col = "black", verbose = TRUE, adj = 0, ...)
## S3 method for class 'pdb'
info3d(x, id = rgl::rgl.ids(), col = "black", verbose = TRUE, adj = 0, ...)
Arguments
x |
an R object containing atomic coordinates. |
... |
further arguments passed to or from other methods. |
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. |
col |
the colors used to display the labels. |
eleid |
a single element logical vector indicating if the element ids have to be concatenated with the element names to prepare the labels. |
id |
vector of ID numbers of ‘rgl’ items, as returned by
|
verbose |
a logical value specifying if information have to be printed to the terminal. |
adj |
one value specifying the horizontal adjustment, or two, specifying
horizontal and vertical adjustment respectively. See
|
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-clicking
on the current ‘rgl’ scene. To escape the interactive mode press the
ESC key. The labels are as follow: "ResidResname:EleidElename"
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.
See Also
Examples
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)