- changed version to v2.4/3.0 [future]
angle.xyz not finding all main-chain angles
I am trying to find main-chain angles for the glycine residues of this protein, but I cannot seem to get any angles except for the N-CA-C angles even when I specify a new vector with C-N-CA. I was wondering if someone could help me or direct me towards a resource where I could find help? Thank you!
Below is the code I’ve used.
Comments (6)
-
reporter -
Hi,
atom.select()
does not change the order of atoms in the pdb and soatom.select(..., elety=(“N”, “CA”, “C”))
is the same asatom.select(..., elety=(“C”, “N”, “CA”))
.To do what you have requested, you may adjust the index manually. For example,
inds2 <- inds n <- length(inds$atom) inds2$atom <- c(inds$atom[seq(3, n, 3)], inds$atom[seq(1, n, 3)], inds$atom[seq(2, n, 3)]) inds2$xyz <- atom2xyz(inds2$atom) angle.xyz(pdb$xyz[inds2$xyz])
-
reporter Thank you so much for your response! What I am trying to do is use the carbonyl from the residue before the glycine and then the nitrogen and alpha carbon of the glycine to find the C-N-CA angle of the backbone. Will adjusting the index manually be able to do this?
-
That would be complicated I guess. A simpler way is to build an atom selection for “N, CA” of all glycines. Then, an atom selection for “C” of all residues preceding a glycine. And finally combine the two selections using
combine.select()
inds1 <- atom.select(pdb, resid="GLY", elety=c("N", "CA")) inds.tmp <- atom.select(pdb, "calpha", resid="GLY") resno <- pdb$atom$resno[inds.tmp$atom] - 1 # assume residue number is consecutive inds2 <- atom.select(pdb, resno=resno, elety="C") inds <- combine.atom.select(inds1, inds2, operator="+") angle.xyz(pdb$xyz[inds$xyz])
I didn’t test it. Let me know if you get any problems.
-
reporter Thank you so much for your assistance!
When I use that code, I get different outputs from when I found the N-CA-C angles:
(I changed combine.atom.select to combine.select)
But when I actually measure the angles in a program such as WinCoot, all of the C-N-CA angles are between 115 degrees and 125 degrees, so I am not exactly sure what is going wrong.
Thank you
-
Hi,
Can you provide a short example. So, I can take a look.
- Log in to comment