Error with fit.xyz()

Issue #211 resolved
Former user created an issue

Hi,

I am trying to compare an MD simulation sampling in Principle Component space with the PCA of X-ray structure homologues of the protein I am studying (as done in the tutorial "Ensemble NMA Part 1". I use the following code:

pdb <- read.pdb("3U2Z_monFBP0_protein_ca.pdb")
trj <- read.dcd("3U2Z_prod_T300_cat.dcd")

inds <- pdb2aln.ind(pdbs, pdb, gaps.res$f.inds, exefile="/apps/prod/muscle3.8.31/muscle3.8.31_i86linux64")
inds.core <- pdb2aln.ind(pdbs, pdb, core$c0.5A.atom, exefile="/apps/prod/muscle3.8.31/muscle3.8.31_i86linux64")

## All goes well until here when I call trj.fit:

trj.fit <- fit.xyz(pdbs$xyz[1,], trj, core$c0.5A.xyz, inds.core$b$xyz)
Error in inds.core$b : $ operator is invalid for atomic vectors
Calls: fit.xyz
Execution halted

Could you please help me understand what is going wrong here?

Thanks!

Comments (5)

  1. Lars Skjærven

    what is the content of inds.core ? Also, are you using bio3d 2.1 or 2.2? I think these functions are updated since 2.1

  2. Xinqiu Yao

    Hi,

    It seems that inds.core doesn't have the component b or it is not a list. Can you simply type inds.core and return, and then paste the output here?

    Also, check your bio3d version to make sure you are using v2.2 or later (in earlier versions pdb2aln.ind returns a vector instead of a list) .

    If you are using correct version but the error is still there, check the content of core$c0.5A.atom (simply type it and return).

    Please try above testings and let me know what you get.

  3. Log in to comment