dimension mismatch

Issue #687 resolved
Aiswarya Pawar created an issue

Hi,

So to look if the vectors from two different simulations are in same phase space. I did individual PCA calculations on two simulations. and then try to call the rmsip(function). But it says dimension mismatch. Do i need to add anything in the code. I tried to do rm.gaps=TRUE, still didnt work.

pdb1 <- read.pdb('tmp1.pdb')

dcd1 <- read.dcd('tmp1.dcd')

ca.inds1 <- atom.select(pdb1, elety = 'CA')
xyz1 <- fit.xyz(fixed=pdb1$xyz,mobile=dcd1, fixed.inds=ca.inds1$xyz,mobile.inds=ca.inds1$xyz)
pc1 <- pca.xyz(xyz1[, ca.inds1$xyz], rm.gaps=TRUE)
plot(pc1, col=bwr.colors(nrow(xyz)))

pdb2 <- read.pdb('tmp2.pdb')

dcd2 <- read.dcd('tmp2.dcd')

ca.inds2 <- atom.select(pdb2, elety = 'CA')
xyz2 <- fit.xyz(fixed=pdb2$xyz,mobile=dcd2, fixed.inds=ca.inds2$xyz,mobile.inds=ca.inds2$xyz)
pc2 <- pca.xyz(xyz2[, ca.inds2$xyz],rm.gaps=TRUE)
plot(pc2, col=bwr.colors(nrow(xyz)))
r <- rmsip(pc1, pc2)
Error in rmsip.default(pc1, pc2) : dimension mismatch

Comments (2)

  1. Log in to comment