<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<p>Dear Chimera users,</p>
<p>I am trying to write a script to change the phi and psi angle of a peptide. I am trying to adapt the code from http://plato.cgl.ucsf.edu/pipermail/chimera-users/2005-September/000456.html . I am trying to invert the angles so I am multiplying the angles by -1. My code is </p>
<p>import chimera</p>
<p><span style="font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">from chimera import selection, UserError, BondRot, replyobj</span></p>
<p>opened = chimera.openModels.open('fun.pdb')<br />mol = opened[0]<br />RES_LIST = mol.residues<br />for res in mol.residues:<br /> b = str(res.phi)<br /> if b != 'None':<br /> c = -1*float(b) <br /> atomsMap = res.atomsMap<br /> N = atomsMap['N'][0]<br /> CA = atomsMap['CA'][0]<br /> C = atomsMap['C'][0]<br /> CAmap = CA.bondsMap<br /> phiBond = CAmap[N]<br /> psiBond = CAmap[C]<br /> phiAnchor = N<br /> psiAnchor = CA<br /> phi = BondRot(phiBond)<br /> phi.setAngle(c, phiAnchor)</p>
<p>When I run this script i get the error </p>
<p>phi.setAngle(c, phiAnchor)<br />AttributeError: '_molecule.BondRot' object has no attribute 'setAngle'</p>
<p> </p>
<p>Can someone please help me with this?</p>
<p>Warm regards.</p>
<p>Amin.</p>
<div> </div>
</body></html>