- edited description
PCA for crystal structure and MD simulation
Hi All,
I’am successfully able to plot PCA for set of crystal structures and the trajectories separately. But i want to plot them together, basically something like projecting one over other. Below i have mentioned individual pca scripts.
for crystal structure-
ids <- c("4LDJ_A","5VQ6_A","5VQ8_A","4L8G","4LPK")
raw.files <-get.pdb(ids)
files <- pdbsplit(raw.files, ids)
pdbs <- pdbaln(files)pc <- pca(pdbs, rm.gaps=TRUE)
plot(pc,pc.axes=1:2)
for MD trajectory
dcd <- read.dcd('trj.dcd')
pdb <- read.pdb('trj.pdb')
ca.inds <- atom.select(pdb, elety = 'CA')
xyz <- fit.xyz(fixed=pdb$xyz,mobile=dcd, fixed.inds=ca.inds$xyz,mobile.inds=ca.inds$xyz)
pc <- pca.xyz(xyz[, ca.inds$xyz])
plot(pc, col=bwr.colors(nrow(xyz)))
Comments (5)
-
reporter -
reporter - edited description
-
reporter Please can anyone help with this query!
-
Hi,
What you need is just the
project.pca()
function to project crystal structures onto MD PCs or vice versa (see?project.pca
for more detail.
After the projection, you can add extra data points by e.g.
points()
or make a new plot with trajectory and crystal structures together. -
- changed status to resolved
- Log in to comment