bond-angle-dihedral: Atomic Bond Lengths, Angles and Dihedrals

bond-angle-dihedralR Documentation

Atomic Bond Lengths, Angles and Dihedrals

Description

Compute bond lengths, angles and dihedral from atomic coordinates.

Usage

bond(...)

## S3 method for class 'coords'
bond(x, sel1, sel2, ...)

## S3 method for class 'pdb'
bond(x, sel1, sel2, ...)

angle(...)

## S3 method for class 'coords'
angle(x, sel1, sel2, sel3, ...)

## S3 method for class 'pdb'
angle(x, sel1, sel2, sel3, ...)

dihedral(...)

## S3 method for class 'coords'
dihedral(x, sel1, sel2, sel3, sel4, ...)

## S3 method for class 'pdb'
dihedral(x, sel1, sel2, sel3, sel4, ...)

measure(...)

## Default S3 method:
measure(id = rgl::rgl.ids(), verbose = TRUE, ...)

## S3 method for class 'coords'
measure(x, id = rgl::rgl.ids(), verbose = TRUE, ...)

## S3 method for class 'pdb'
measure(x, id = rgl::rgl.ids(), verbose = TRUE, ...)

Arguments

...

further arguments passed to or from other methods.

x

an R object containing atomic coordinates.

sel1, sel2, sel3, sel4

an integer or logical vector used to select atoms defining bonds, angles or dihedrals. See details.

id

vector of ID numbers of ‘rgl’ items, as returned by rgl.ids. The vertexes of these items are used to compute the bond lengths, angles or dihedrals.

verbose

a logical value specifying if the information have to be printed to the terminal.

Details

The number of selected atoms with sel1, sel2, sel3 and sel4 must be the same. sel1, sel2, sel3 and sel4 respectively select the first, second, third and fouth atoms defining bonds, angles or dihedrals.

measure activate an interactive mode to compute bond lengths, angles and dihedrals by selecting atoms by right-clicing on the current ‘rgl’ scene. To escape the active mode press the ESC key.

Value

A numeric vector containing atomic bond lengths (in Angstrom), angles or dihedrals (in degrees)

See Also

coords, pdb, info3d, visualize

Examples

Pen <- read.pdb(system.file("examples/Pentacene.pdb", package="Rpdb"))
visualize(Pen, mode = NULL)
text3d(coords(Pen), texts = Pen$atoms$eleid)
bond(Pen, 3:4, 1:2)
angle(Pen, 3:4, 1:2, 5:6)
dihedral(Pen, 3:4, 1:2, 5:6, 6:5)


Rpdb documentation built on Sept. 28, 2023, 5:07 p.m.