Incorporating Ligand into calculations and other errors

Issue #466 new
debra ragland created an issue

Hello,

I too work on the protease and I understand from the vignettes on the site that only CA atoms are used for demonstration. I would like to use the CA atoms and a ligand for my calculations so I have manipulated my trajectory and PDB files to make use of only CA atoms and all ligand atoms. That being said, this is how I read in the files

dcd <- read.dcd("/Users/debraragland/CA_DRV.dcd")
pdb <- read.pdb("/Users/debraragland/CA_DRV.pdb")
inds <- atom.select(pdb, resno = c(24:27, 85:90), elety = "CA", resid = "017", operator = "OR") #the ligand has different atom names in the same column where the CA atoms are listed and 017 in the residue name column, is this properly incorporating the ligand?
trj <- fit.xyz(fixed = pdb$xyz, mobile = dcd, fixed.inds = inds$xyz, mobile.inds = inds$xyz)
cij <- dccm(trj)
net <- cna(cij)

This a sample of protein and ligand atoms from my pdb

  • ATOM 94 CA GLY A 94 2.008 3.497 16.220 0.00 0.00 C2 C (protein atom)
  • ATOM 105 O10 017 A1200 -0.766 0.443 -6.205 0.00 0.00 C2 O (ligand atom)

Everything seems to compute fine with no errors until I try;

view.dccm(cij, pdb)

where I get;

Error in view.dccm(cij, pdb) : unequal vector lengths

I have tried the suggestions from other posts here on the bitbucket, however nothing is working for me (Issues 248 and 260).

When I look at

dim(cij)
[1] 236 236

dim(pdb$atom)
[1] 236 16

I don't know how to fix the problem.

If I change the "017" to read as CA, I get the same error, if I change the ligand name to random residues, I get the same error. I can use plot.dccm(cij) just fine. I should note, that I've never encountered an error when superposing with just the CA atoms as in the vignette, am I incorporating the ligand atoms incorrectly?

Comments (2)

  1. Lars Skjærven

    Hi Debra, This reflects a current limitation in the pymol.dccm() function in which it internally looks only for the calpha atoms. A temporary workaround is to provide the Cartesian coordinates instead of the full pdb object, i.e: pymol(cij, pdb$xyz).

    You can then run the pymol script (R.py) written to disk to view the correlations on structure. The drawback with this workaround is that you'll have only Ala's in your PDB and all atoms are CA. The PDB loaded by the R.py script can of course be changed manually.

    We should fix this in coming versions of bio3d.

    PS - view.dccm() has been renamed to pymol.dccm().

  2. Log in to comment