Learn R Programming

Rknots (version 1.3.2)

centroidClosure: Structure closure with the centroid method

Description

For being treated as a mathematical knot, the protein backbone needs to be closed. This function implements the centroid method (also called CENTER), where the protein endpoints (C-terminus and N-terminus) are extended outside the sphere containing the protein backbone in the direction of the centroid of the structure.

Usage

centroidClosure(points3D, w = 2)

Arguments

points3D
an $N$ x 3 matrix of the $x$, $y$, $z$ coordinates of a polygonal link
w
given the radius $r$ of the sphere that contains the structure, the endpoints will be extended by w $r$.

Value

an $(N+2)$ x 3 matrix of the $x$, $y$, $z$ coordinates of a polygonal link. The first and the last rows contain the coordinates of the extended endpoints.

References

Lua RC, Grosberg AY (2006) Statistics of Knots, Geometry of Conformations, and Evolution of Proteins. PLoS Comput Biol 2(5): e45. doi:10.1371/journal.pcbi.0020045

Examples

Run this code
## Not run: 
# ## Import a PDB file from the web
# protein <- makeExampleProtein()
# closed <- centroidClosure(protein$A)
# 	
# ##Plot the result
# plotKnot3D(closed, ends = c(), text = TRUE, showNC = TRUE, 
#     radius = 0.01, lwd = 5)
# ## End(Not run)

Run the code above in your browser using DataLab