This is a read-only mirror of pymolwiki.org

User:Orpheus

From PyMOL Wiki
Revision as of 00:12, 18 February 2005 by Orpheus (talk | contribs)
Jump to navigation Jump to search

Tzintzuni Garcia

University of Texas Medical Branch
Department of Human Biological Chemistry and Genetics
Graduate Student

Graphics

I'll be posting some ideas for logos and graphics for this page in the next week or so.

from math import log base = 'expt100000.1HJM_int' cmd.set('auto_zoom', 'off') cmd.set('bg_rgb', ('0', '0', '0')) cmd.set('hash_max', 240) repeat = 8 #number of frames to repeat each structure

for n in range(1,501):

   curmol = base[0:5]+str(n).zfill(5)+base[10:]
   cmd.load(curmol+'.pdb')
   if n > 1:
       cmd.fit(curmol+' and name ca and (resi 56 or resi 57 or resi 58)', oldmol+' and name ca and (resi 56 or resi 57 or resi 58)')
       cmd.delete(oldmol)
   else:
       cmd.orient(curmol+' and name ca and (resi 56 or resi 57 or resi 58)')
       cmd.center(curmol+' and name ca and (resi 56 or resi 57 or resi 58)')
   cmd.spectrum('count', 'blue_white_red', '('+curmol+')',minimum=None, maximum=None, byres=1, quiet=1)
   cmd.hide("lines", curmol)
  1. cmd.show("surface", curmol)
   cmd.show("cartoon", curmol)
   cmd.set_view('\
    1.000000000,    0.000000000,    0.000000000,\
    0.000000000,    1.000000000,    0.000000000,\
    0.000000000,    0.000000000,    1.000000000,\
    0.000000000,    0.000000000, -234.718002319,\
   10.384142876,   15.351722717,   11.246277809,\
  205.446594238,  263.989440918,    0.000000000' )
   cmd.translate([0,0,-0.0008*n*log(n)], curmol, 0, 1, None)
   cmd.clip('far', -0.5*n*log(n))
   cmd.clip('near', -0.05*n*log(n))
    1. Uncomment one line to render frames ##
  1. cmd.ray(1680, 1050) # 16:10 1764000
  2. cmd.ray(1024, 576) # 16:9 589824
  3. cmd.ray(800, 450) # 16:9 360000
  4. cmd.ray(640, 360) # 16:9 230400
  5. cmd.ray(480, 270) # 16:9 129600
  6. cmd.ray(240, 180) # 16:9 43200
  7. cmd.ray(1024, 768) # 4:3 786432
  8. cmd.ray(800, 600) # 4:3 4800000
  9. cmd.ray(640, 480) # 4:3 307200
  10. cmd.ray(480, 360) # 4:3 172800
  11. cmd.ray(240, 180) # 4:3 43200
    1. Uncomment loop to repeat frames ##
  12. for i in range(0,repeat):
  13. cmd.png("imgs/"+str((n-1) * repeat + i).zfill(5)+".png")
   cmd.refresh()
   oldmol = curmol