Bug: nma with fc.weights != NULL
Issue #27
resolved
I got following errors when calling nma function with fc.weights not NULL
library(bio3d)
pdb <- read.pdb("gdp_ca.pdb")
weights <- matrix(0.5, sum(pdb$calpha), sum(pdb$calpha))
modes <- nma(pdb, fc.weights=weights)
Building Hessian...Error in build.hessian(xyz = c(29.725, 64.034, 42.983, 30.155, 67.736, :
object 'natoms' not found
Comments (3)
-
-
reporter - changed status to resolved
It works now, thanks! I never tried "testthat", but it is a good idea to have a bunch of test routines for new functions. Thanks for the link!
-
Indeed, I have had my eye on "testthat" since getting into the "devtools" package. There is also a nice discussion here from the devtools author: < http://adv-r.had.co.nz/Testing.html >
- Log in to comment
Thanks! It should be fixed now. Silly mistake. We should definitively implement some test routines. Did you see the "testthat" package? http://www.johnmyleswhite.com/notebook/2010/08/17/unit-testing-in-r-the-bare-minimum/