Something went wrong on our end
-
juergen authored
git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2514 5a81b35b-ba03-0410-adc8-b2c5c5119f08
juergen authoredgit-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2514 5a81b35b-ba03-0410-adc8-b2c5c5119f08
roll_helix.py 717 B
import math
e=io.LoadEntity('../entity/sdh.pdb')
c=e.FindChain('A')
edi=e.RequestICSEditor(mol.EditMode.BUFFERED_EDIT)
for r in c.GetResidueList():
phi=r.GetPhiTorsion()
psi=r.GetPsiTorsion()
if phi.IsValid():
edi.SetTorsionAngle(phi, math.radians(-60))
if psi.IsValid():
edi.SetTorsionAngle(psi, math.radians(-45))
edi.UpdateXCS()
for r in c.GetResidueList():
phi=r.GetPhiTorsion()
psi=r.GetPsiTorsion()
if phi.IsValid():
print 'PHI %3.0f' % math.degrees(phi.GetAngle())
if psi.IsValid():
print 'PSI %3.0f' % math.degrees(psi.GetAngle())
g=gfx.Entity('helix', e.Select('aname=CA,N,O,C,CB'))
#g=gfx.Entity('helix', e)
scene.Add(g)
scene.SetCenter(g.GetCenter())