pca analysis for specific atoms

Issue #401 resolved
Former user created an issue

Hi There,

Could anybody suggest me a way to do a pca analysis for specific atoms from an ensemble of protein structures?

I have a series of dummy atoms in each protein that correspond to the centre of mass of the ligand. I would like to cluster these dummy atoms on the protein space to see their distribution.

So, after aligning the protein structures, I am wondering how to do a pca/clustering for these dummy atoms alone.

Thanks, Subha

Comments (3)

  1. Xinqiu Yao

    Hi Subha,

    Maybe others can give an even better method, but one solution to your problem is to use the read.all() function. Before calling 'read.all()', make sure all your structures are pre-fitted. For example,

    # fit based on core/all-CA atoms and generate fitted all-atom structures into 'fitlsq'.
    xyz <- fit.xyz(pdbs$xyz[1, ], pdbs, fixed.inds=core$xyz, mobile.inds=core$xyz, full.pdbs=TRUE, ncore=NULL)
    
    # read all atom structure information
    pdbs$id <- paste('fitlsq/', pdbs$id, '_flsq.pdb', sep='')
    pdbs.aa <- read.all(pdbs)
    
    # ligand atoms are stored in `pdbs.aa$all.hetatm`
    # make 'xyz' for dummy; Suppose dummy atoms are named 'DU'
    dummy.xyz <- sapply(pdbs.aa$all.hetatm, function(x) {
      inds <- atom.select(x, elety='DU')
      x$xyz[inds$xyz]
    })
    dummy.xyz <- as.xyz(t(dummy.xyz))
    dummy.xyz
    
    # do PCA for dummy atoms
    pc <- pca(dummy.xyz)
    

    Unfortunately, I don't have suitable examples to test above codes. Let me know if you have any question/problem of running it.

  2. Log in to comment