function to get the index of dihedral atoms
Opened this issue · 2 comments
Thanks for your toolbox, useful for me.
Besides I wonder whether we can build a function to get the indexes of dihedral atoms from pdb files, being the input of function 'calcdihedral'.
em,this seems easy to do,just find the index of "N","CA","C", and rearrange them
Yes, you right. Something like this:
[pdb, crd] = readpdb('file.pdb');
index_c = find(selectname(pdb.name, 'C'));
index_n = find(selectname(pdb.name, 'N'));
index_ca = find(selectname(pdb.name, 'CA'));
index_phi = [index_c(1:end-1) index_n(2:end) index_ca(2:end)
index_c(2:end)];
index_psi = [index_n(1:end-1) index_ca(1:end-1) index_c(1:end-1)
index_n(2:end)];
phi = calcdihedral(crd, index_phi)._180./pi;
psi = calcdihedral(crd, index_phi)._180./pi;
On Thu, Jul 24, 2014 at 1:02 PM, xibeisiber notifications@github.com
wrote:
em,this seems easy to do,just find the index of "N","CA","C", and
rearrange them—
Reply to this email directly or view it on GitHub
#1 (comment)
.