예제 #1
0
파일: stereodemo.py 프로젝트: evonove/pymol
    def medchem(self,cleanup=0):
	if not cleanup:
	    cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/drugdisc.pse"))
	    cmd.set("use_display_lists",0)
	    cmd.do("replace_wizard toggle, Medicinal Chemistry")
	else:
	    cmd.set("sphere_scale",1.0)
예제 #2
0
    def medchem(self,cleanup=0):
	if not cleanup:
	    cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/drugdisc.pse"))
	    cmd.set("use_display_lists",0)
	    cmd.do("replace_wizard toggle, Medicinal Chemistry")
	else:
	    cmd.set("sphere_scale",1.0)
예제 #3
0
 def electro(self,cleanup=0):
     if not cleanup:
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/electro.pse"))
         cmd.do("replace_wizard toggle, Computational Chemistry (Electrostatics)")
         cmd.rock(1)
     else:
         cmd.rock(0)
예제 #4
0
 def electro(self,cleanup=0):
     if not cleanup:
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/electro.pse"))
         cmd.do("replace_wizard toggle, Computational Chemistry (Electrostatics)")
         cmd.rock(1)
     else:
         cmd.rock(0)
예제 #5
0
 def testGetSession(self):
     cmd.fragment('ala')
     x = cmd.count_atoms()
     s = cmd.get_session()
     cmd.reinitialize()
     cmd.set_session(s)
     self.assertEqual(['ala'], cmd.get_names())
     self.assertEqual(x, cmd.count_atoms())
예제 #6
0
 def testGetSession(self):
     cmd.fragment('ala')
     x = cmd.count_atoms()
     s = cmd.get_session()
     cmd.reinitialize()
     cmd.set_session(s)
     self.assertEqual(['ala'], cmd.get_names())
     self.assertEqual(x, cmd.count_atoms())
예제 #7
0
 def structure(self,cleanup=0):
     if not cleanup:
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/structure.pse"))
         cmd.do("replace_wizard toggle, Structure Alignment")
         cmd.set("seq_view_label_mode",1)
         cmd.set("seq_view",1)
     else:
         cmd.set("seq_view_label_mode",0)
         cmd.set("seq_view",0)
예제 #8
0
 def structure(self,cleanup=0):
     if not cleanup:
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/structure.pse"))
         cmd.do("replace_wizard toggle, Structure Alignment")
         cmd.set("seq_view_label_mode",1)
         cmd.set("seq_view",1)
     else:
         cmd.set("seq_view_label_mode",0)
         cmd.set("seq_view",0)
예제 #9
0
 def testGetMovieLocked(self):
     self.assertEqual(cmd.get_movie_locked(), 0)
     cmd.mset('1x1')
     cmd.mdo(1, 'cmd.color("blue")')
     s = cmd.get_session()
     cmd.set_session(s)
     self.assertEqual(cmd.get_movie_locked(), 1)
     cmd.set('security', 0)
     cmd.set_session(s)
     self.assertEqual(cmd.get_movie_locked(), 0)
예제 #10
0
 def electomo(self,cleanup=0):
     if not cleanup:
         cmd.feedback("disable","objectsurface","actions")
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/flagellar.pse"))
         cmd.set("sweep_mode",3)
         cmd.set("sweep_angle",3)
         cmd.rock()
         cmd.do("replace_wizard toggle, Electron Tomography")
     else:
         cmd.mstop()
         cmd.rock(0)
예제 #11
0
 def electomo(self,cleanup=0):
     if not cleanup:
         cmd.feedback("disable","objectsurface","actions")
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/flagellar.pse"))
         cmd.set("sweep_mode",3)
         cmd.set("sweep_angle",3)
         cmd.rock()
         cmd.do("replace_wizard toggle, Electron Tomography")
     else:
         cmd.mstop()
         cmd.rock(0)
예제 #12
0
 def animate(self,cleanup=0):
     if not cleanup:
         cmd.set("security",0)
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/animate.pse"))
         cmd.rock(1)
         cmd.set("field_of_view",23)
         cmd.rock(1)
         cmd.set("sweep_mode",3)
         cmd.set("sweep_angle",10)
         cmd.do("replace_wizard toggle, Molecular Animation")
     else:
         cmd.set("mesh_width",1)
         cmd.set("field_of_view",20)
         cmd.rock(0)
         cmd.mset()
         cmd.mstop()
예제 #13
0
 def animate(self,cleanup=0):
     if not cleanup:
         cmd.set("security",0)
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/animate.pse"))
         cmd.rock(1)
         cmd.set("field_of_view",23)
         cmd.rock(1)
         cmd.set("sweep_mode",3)
         cmd.set("sweep_angle",10)
         cmd.set("sphere_mode",5)
         cmd.do("replace_wizard toggle, Molecular Animation")
     else:
         cmd.set("mesh_width",1)
         cmd.set("field_of_view",20)
         cmd.rock(0)
         cmd.mset()
         cmd.mstop()
예제 #14
0
    def test_pse(self):
        self.ambientOnly()

        viewport = (50, 50)
        cmd.viewport(*viewport)

        objname = 'simpletri'
        obj = []
        obj.extend([
            cgo.BEGIN, cgo.TRIANGLES, cgo.COLOR, 1.0, 0., 0., cgo.VERTEX, 0.0,
            0.0, 1.0, cgo.VERTEX, 1.0, 0.0, 0.0, cgo.VERTEX, 0.0, 1.0, 0.0,
            cgo.END
        ])
        cmd.load_cgo(obj, objname, 1)

        s = cmd.get_session()
        cmd.set_session(s)

        self.assertEqual([objname], cmd.get_names())
        self.assertImageHasColor('red')
예제 #15
0
    def test_pse(self):
        self.ambientOnly()

        viewport = (50, 50)
        cmd.viewport(*viewport)

        objname = 'simpletri'
        obj = []
        obj.extend([
            cgo.BEGIN, cgo.TRIANGLES,
            cgo.COLOR, 1.0, 0., 0.,
            cgo.VERTEX, 0.0, 0.0, 1.0,
            cgo.VERTEX, 1.0, 0.0, 0.0,
            cgo.VERTEX, 0.0, 1.0, 0.0,
            cgo.END
            ])
        cmd.load_cgo(obj, objname, 1)

        s = cmd.get_session()
        cmd.set_session(s)

        self.assertEqual([objname], cmd.get_names())
        self.assertImageHasColor('red')
예제 #16
0
 def homology(self, cleanup=0):
     if not cleanup:
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/homology.pse"))
         cmd.do("replace_wizard toggle, Homology Modeling")
예제 #17
0
 def homology(self,cleanup=0):
     if not cleanup:
         cmd.set_session(self.get_sess("$PYMOL_DATA/big_demo/homology.pse"))
         cmd.do("replace_wizard toggle, Homology Modeling")