dccm cross correlation length mismatch

Issue #433 resolved
Mamta Mohan created an issue

Hi,

I am following tutorial for 'Trajectory Analysis with Bio3D'.

Instead of example pdb. I am using my pdb which has two residues label with MTSL spin label.

Initially pdb read gives warning which I wrote a while back but It was advised to ignore them since being warning.

Since I am working (as per tutorial only with carbon-backbone). No further errors or warnings were generated.

But for Cross-correlation plot I am getting following error:

3D visualization of Cross-Correlations

pymol.dccm(cij, pdb, type="launch") Error in pymol.dccm(cij, pdb, type = "launch") : unequal vector lengths sum(pdb$calpha) [1] 162

I checked pdb it is 162 and cij is dccm [1:164, 1:164]

So mismatch is clear.

Is there a way to solve this.

Comments (16)

  1. Mamta Mohan reporter

    Please find attached pdb and psf files.

    ionized.pdb and ionized.psf are solvated system pdb and psf file.

    stripped.pdb and stripped.psf are files with out solvent.

  2. Lars Skjærven

    Hi Mamta, Make sure you are doing the correct atom selections here. Looks like you have non-standard residues in your protein (CYR1) which atom.select(pdb, "calpha") does not recognize.

    > pdb <- read.pdb("stripped.pdb")
    > pdb
     Call:  read.pdb(file = "stripped.pdb")
    
       Total Models#: 1
         Total Atoms#: 1339,  XYZs#: 4017  Chains#: 2  (values: P I)
    
         Protein Atoms#: 1294  (residues/Calpha atoms#: 162)
         Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)
    
         Non-protein/nucleic Atoms#: 45  (residues: 11)
         Non-protein/nucleic resid values: [ CLA (9), CYR1 (2) ]
    

    Calling atom.select(pdb, "calpha") you select only those CA atoms with known residue names. In this case, you can use the elety argument:

    # select only CA atoms
    > sele <- atom.select(pdb, elety="CA")
    > sele
     Call:  atom.select.pdb(pdb = pdb, elety = "CA")
    
       Atom Indices#: 164  ($atom)
       XYZ  Indices#: 492  ($xyz)
    
    + attr: atom, xyz, cal
    
    # calculate normal modes
    > m <- nma(pdb, inds=sele, mass=FALSE)
     Building Hessian...            Done in 0.061 seconds.
     Diagonalizing Hessian...       Done in 0.094 seconds.
    
    # check dimensions of resulting modes object
    > dim(m$U)
    [1] 492 492
    
    # calculate cross correlations
    > cij <- dccm(m)
      |======================================================================| 100%
    
    # dimensions.... 
    > dim(cij)
    [1] 164 164
    

    Here I used NMA as an example, but the same goes for reading a trajectory: trj[, sele$xyz].

    Good luck. Lars

  3. Lars Skjærven

    Side note: The following error message is not very useful in this case:

    > m <- nma(pdb, inds=sele, mass=T)
    Error in aa2mass(pdb = c("MET", "ASN", "ILE", "PHE", "GLU", "MET", "LEU",  : 
      must supply 'pdb' object or vector of amino acid residue names
    
    > aa2mass(pdb$atom$resid[sele$atom])
    Error in aa2mass(pdb$atom$resid[sele$atom]) : 
      must supply 'pdb' object or vector of amino acid residue names
    
    > any(nchar(pdb$atom$resid[sele$atom]) > 3)
    [1] TRUE
    

    should check line 19 of aa2mass.R.

  4. Mamta Mohan reporter

    Dear Lars,

    Thank you for your response.

    I understand your explanation about backbone selection.

    The reason I am doing backbone selection is because I do not know how to incorporate my labels generated by function pdb when input file is provided.

    If I can do that I am really interested to analyse the labels and surrounding neighbours.

    Is there a way to incorporate labels?

    If

  5. Lars Skjærven

    We normally use c-alpha atoms for cross correlation analysis. Using the atom selection statements above should be fine. Just make sure you're matrix is the correct dimensions after calling dccm().

  6. Mamta Mohan reporter

    Thank you for your response.

    I will do as suggested.

    What I see is C-alpha carbon is not taken into account when I try to load pdb file via read.pdb function

    Protein has 164 C-alpha atoms, at two places where I modified amnio-acid side-chain to attach label those two C-alpha are not accounted for. They are skipped. And only 162 C-alpha atoms are read and parsed.

    So analysis as I do the way you suggested will not reveal the real NM and Cross-Correlations because it is done on 162 rather than 164.

    So if I can address this during pdb read function, I think even analysis on C-alpha backbone will be very helpful to me.

    Is there a way I can modify this call.

    I will appreciate your response.

  7. Lars Skjærven

    Hi Mamta, Sorry but that's not correct. read.pdbreads ALL atoms in the pdb file. It is your atom selection which is wrong here. As I tried to demonstrate above, the automatic calpha selection keyword will not work here because of the unknown residue name of your spin label. Using elety="CA" will however successfully select all 164 calpha atoms. Also as stated above, the corresponding modes object contains 3x164 modes- indicating that all 164 calpha atoms are used in the modes calculation.

  8. Mamta Mohan reporter

    Dear Lars,

    Thank you for your explanation. I understand now how selection is working.

    I will use elety= "CA" to build model.

  9. Log in to comment