rgyr | R Documentation |
Calculate the radius of gyration of coordinate sets.
rgyr(xyz, mass=NULL, ncore=1, nseg.scale=1)
xyz |
a numeric vector, matrix or list object with an |
mass |
a numeric vector of atomic masses (unit a.m.u.),
or a PDB object with masses stored in the "B-factor" column.
If |
ncore |
number of CPU cores used to do the calculation.
|
nseg.scale |
split input data into specified number of segments
prior to running multiple core calculation. See |
Radius of gyration is a standard measure of overall structural change of macromolecules.
Returns a numeric vector of radius of gyration.
Xin-Qiu Yao & Pete Kekenes-Huskey
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
fit.xyz
, rmsd
,
read.pdb
, read.fasta.pdb
# PDB server connection required - testing excluded
try({
# -- Calculate Rog of single structure
pdb <- read.pdb("1bg2")
mass <- rep(12, length(pdb$xyz)/3)
mass[substr(pdb$atom[,"elety"], 1, 1) == "N"] <- 14
mass[substr(pdb$atom[,"elety"], 1, 1) == "H"] <- 1
mass[substr(pdb$atom[,"elety"], 1, 1) == "O"] <- 16
mass[substr(pdb$atom[,"elety"], 1, 1) == "S"] <- 32
rgyr(pdb, mass)
}, silent=TRUE)
if(inherits(.Last.value, "try-error")) {
message("Need internet to run the example")
}
## Not run:
# -- Calculate Rog of a trajectory
xyz <- read.dcd(system.file("examples/hivp.dcd", package="bio3d"))
rg <- rgyr(xyz)
rg[1:10]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.