How to visualise the secondary structure of pc1.pdb?

Issue #590 new
Cheng created an issue

p1 <- mktrj.pca(pc, pc=1, b=pc$au[,1], file="pc1.pdb") outputs a pdb based on Principal Component 1, but with only alpha-carbon atoms in the pc1.pdb file (This link)

It looks like this in Pymol:

2018423-121506.jpg

In VMD, only dots are presented:

2018423-121814.jpg

So can I view the whole structure of it, so that secondary structure can be seen? I think this requires the pc1.pdb file containing full atoms. Is this doable?

Thank you.

Yours sincerely

Cheng

Comments (3)

  1. Barry Grant

    IN VMD you can use the tube representation to see the trace of CA atoms.

    If you want to see secondary structure type interactions you will want to include backbone atoms in your analysis and then you can write those out with the mktrj like functions also.

  2. Cheng reporter

    Thank you so much! The tube representation could show the connection!

    For "include backbone atoms", I tried this:

    dcd <- read.dcd(dcdfile)
    pdb <- read.pdb(pdbfile)
    bb.inds <- atom.select(pdb, "backbone")
    xyz <- fit.xyz(fixed=pdb$xyz, mobile=dcd, fixed.inds=bb.inds$xyz, mobile.inds=bb.inds$xyz)
    pc <- pca.xyz(xyz[,bb.inds$xyz])
    p1 <- mktrj.pca(pc, pc=1, b=pc$au[,1], file="pc1_bb.pdb")
    

    But I got this file with all the atoms as alanines. So did I do it correctly?

  3. Barry Grant

    You can set the atom and residue names to match your case.

    bb.pdb <- trim.pdb(pdb, "back")
    mktrj.pca(pc, pc=1, pdb=bb.pdb, file="pc1_bb.pdb")
    
  4. Log in to comment