view.dccm error: unequal vector lengths

Issue #248 resolved
Ricardo Soares created an issue

Hi there dear Bio3D users. I'm following the tutorial "Trajectory Analysis" and It worked perfectly for 3 out of 4 simulations I'm evaluating. In one of them I receive the following error:

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

I am able to plot the correlation map correctly though with "plot (cij)". Any idea what could be wrong?

Thanks,

Comments (5)

  1. Barry Grant

    Hi Ricardo, It is tricky to figure this out from the info provided. Could you please check and report back on the potential match of the pdb and cij you are using please, e.g.:

    > dim(cij)
    > dim(pdb$atom)
    
    # or for the later just paste the result from typing 'pdb' e.g.
    > pdb
    
  2. Ricardo Soares reporter

    Dear Dr. Grant, thanks for the quick response. Please find below the output I received:

    [1] 962 962 [1] 15496 16

    Call: read.pdb(file = pdbfile)

    Total Models#: 1 Total Atoms#: 15496, XYZs#: 46488 Chains#: 1 (values: NA)

     Protein Atoms#: 15260  (residues/Calpha atoms#: 961)
     Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)
    
     Non-protein/nucleic Atoms#: 236  (residues: 4)
     Non-protein/nucleic resid values: [ FAD (2), NAG (2) ]
    

    Protein sequence: DRNPLEECFRETDYEEFLEIAKNGLSATSNPKRVVIVGAGMSGLSAAYVLANAGHQVTVL EASERAGGRVKTYRNEKEGWYANLGPMRLPEKHRIVREYIRKFDLKLNEFSQENENAWYF IKNIRKRVGEVNKDPGVLEYPVKPSEVGKSAGQLYEESLQKAVEELRRTNCSYMLNKYDT YSTKEYLLKEGNLSPGAVDMIGDLLNEDSGYYVSFIESLKHDDIF...<cut>...VNRA

    • attr: atom, helix, sheet, seqres, xyz, calpha, remark, call

    Just for completeness, I paste bellow the output from the one of the trajectories which yield me no error:

    [1] 962 962 [1] 15500 16

    Call: read.pdb(file = pdbfile)

    Total Models#: 1 Total Atoms#: 15500, XYZs#: 46500 Chains#: 1 (values: NA)

     Protein Atoms#: 15272  (residues/Calpha atoms#: 962)
     Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)
    
     Non-protein/nucleic Atoms#: 228  (residues: 4)
     Non-protein/nucleic resid values: [ FH2 (2), NAG (2) ]
    

    Protein sequence: DDRNPLEECFRETDYEEFLEIAKNGLSATSNPKRVVIVGAGMSGLSAAYVLANAGHQVTV LEASERAGGRVKTYRNEKEGWYANLGPMRLPEKHRIVREYIRKFDLKLNEFSQENENAWY FIKNIRKRVGEVNKDPGVLEYPVKPSEVGKSAGQLYEESLQKAVEELRRTNCSYMLNKYD TYSTKEYLLKEGNLSPGAVDMIGDLLNEDSGYYVSFIESLKHDDI...<cut>...VNRA

    • attr: atom, helix, sheet, seqres, xyz, calpha, remark, call

    Thanks,

  3. Barry Grant

    Looks like you are missing a residue (calpha atom) in the pdb used for the call that does not work. Note that the number of rows & cols of your cij matrix should match the number of calpha atoms (or residues) in the pdb you are using. Your output above tells me that you have 962 in the cij but only 961 calphas in your pdb. Have a look to see where this difference might come from. Note the second pdb example you pasted (that worked) had the correct 962 calphas... Hope this helps!

  4. Ricardo Soares reporter

    Dear Dr. Grant,

    It indeed helped. I tracked the source of the additional "CA", it was one of the cofactors. A series of conversions lead to the pdb file to become slightly different than the original one (some step along the way went wrong), and a C1 became CA. Now everything is running smoothly. Thanks!

  5. Log in to comment