I'm struggling a bit tryng to calculate multiple dihedral through residues just giving the atom name. Basically I'd like to interate the dihaedral calcualtion all around a protein / RNA.
For now I'm arrived here:
def myfunc(model,chain,segi,resn,resi,name):
s1 = "/%s/%s/%s/%s`%s/CB" % (model,chain,segi,resn,resi)
s2 = "/%s/%s/%s/%s`%s/CA" % (model,chain,segi,resn,resi)
s3 = "/%s/%s/%s/%s`%s/N" % (model,chain,segi,resn,resi)
s4 = "/%s/%s/%s/%s`%s/C" % (model,chain,segi,resn,resi)
cmd.get_dihedral(s1,s2,s3,s4,state=0)
print(s1,s2,s3,s4)
myspace = {'myfunc': myfunc}
cmd.iterate('(all)', 'myfunc(model,chain,segi,resn,resi,name)', space=myspace)
The TOP would be a file that look like this:
NAME NAME NAME NAME DIHAEDRAL
NAME NAME NAME NAME DIHAEDRAL
Someone can help? Thanks in advance guys.