# NOT RUN {
x <- 1:3
y <- matrix(1:9, ncol = 3, nrow = 3)
normalize.vector(x)
normalize.vector(y)
## Application to normal modes
pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") )
## Calculate (vibrational) normal modes
modes <- nma(pdb)
## Returns a vector
nv <- normalize.vector(modes$modes[,7])
## Returns a matrix
nv <- normalize.vector(modes$modes[,7:10])
## Mass-weighted
nv <- normalize.vector(modes$modes[,7], mass=modes$mass)
# }
Run the code above in your browser using DataLab