Example #1
0
def test_set_phipsi():
    cmd.reinitialize()
    cmd.fab('ACDEF', 'm1')
    psico.editing.set_phipsi('all', 160, 160)
    psico.editing.set_phipsi('resi 2+4', 120)
    psico.editing.set_phipsi('resi 3+4', psi=-140)
    assert cmd.get_phipsi('resi 2')['m1', 12] == approx((120., 160.))
    assert cmd.get_phipsi('resi 3')['m1', 23] == approx((160., -140.))
    assert cmd.get_phipsi('resi 4')['m1', 35] == approx((120., -140.))
Example #2
0
 def start(self,sel):
     self.lock = 1
     cmd.iterate('(%s) and name CA' % sel,'idx2resn[model,index] = (resn, color, ss)',
             space={'idx2resn': self.canvas.idx2resn})
     for model_index, (phi,psi) in cmd.get_phipsi(sel, self.state).iteritems():
         print " Plotting Phi,Psi: %8.2f,%8.2f" % (phi, psi)
         self.canvas.plot(phi, psi, model_index)
     self.lock = 0
Example #3
0
 def start(self,sel):
     self.lock = 1
     cmd.iterate('(%s) and name CA' % sel,'idx2resn[model,index] = (resn, color, ss)',
             space={'idx2resn': self.canvas.idx2resn})
     for model_index, (phi,psi) in cmd.get_phipsi(sel).iteritems():
         print " Plotting Phi,Psi: %8.2f,%8.2f" % (phi, psi)
         self.canvas.plot(phi, psi, model_index)
     self.lock = 0