This is a read-only mirror of pymolwiki.org

Difference between revisions of "Rasmolify"

From PyMOL Wiki
Jump to navigation Jump to search
m (9 revisions)
 
(6 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
== Install ==
 
== Install ==
 
; Linux : In your ~/.pymolrc set something like the following <PRE> run ~/pymolscripts/rasmolify.py </PRE> Finally, make a directory called ~/pymolscripts and copy the code below into a file called rasmolify.py - That should do the trick. You may also like to add a line that reads <PRE>set virtual_trackball, off</PRE> in your ~/.pymolrc
 
; Linux : In your ~/.pymolrc set something like the following <PRE> run ~/pymolscripts/rasmolify.py </PRE> Finally, make a directory called ~/pymolscripts and copy the code below into a file called rasmolify.py - That should do the trick. You may also like to add a line that reads <PRE>set virtual_trackball, off</PRE> in your ~/.pymolrc
 +
 +
; Windows : ???
  
 
== Usage ==
 
== Usage ==
 
Think 'rasmol'
 
Think 'rasmol'
 +
 +
== Related ==
 +
* http://arcib.dowling.edu/sbevsl/
 +
 +
== TODO ==
 +
* Check if a 'selection' exists, and limit commands to that selection (map the concept of a rasmol 'selection' onto the concept of a pymol selection).
 +
* Implement 'scaling' units for display functions
 +
* Fix the mouse behaviour?
 +
* Add a rasmol GUI!
  
 
== Code ==
 
== Code ==
Line 11: Line 22:
 
## This is just a quick hack. For something more meaty see;
 
## This is just a quick hack. For something more meaty see;
 
## http://arcib.dowling.edu/sbevsl/
 
## http://arcib.dowling.edu/sbevsl/
 
+
## Version 0.0.00-000/0
+
## Version 0.0.00-000/1
 
+
## TODO:
+
 
+
## Turn off the virtual_trackball
## Check if a 'current' selection exists, and perform the action on
+
cmd.set("virtual_trackball", "off")
## that selection. Make 'off' proper. Add units to the commands that
+
## take them. Turn off the virtual_trackball. Fix the mouse behaviour.
+
 
 
 
## spacefill
 
## spacefill
def spacefill(toggle=1):
+
def spacefill(p1=''):
     if(toggle==1):
+
     if(p1=='off'):
 +
        cmd.hide("spheres")
 +
    elif(p1==''):
 
         cmd.show("spheres")
 
         cmd.show("spheres")
 
     else:
 
     else:
         cmd.hide("spheres")
+
         print("feh!")
 
cmd.extend("spacefill", spacefill)
 
cmd.extend("spacefill", spacefill)
 
+
 
## cartoon
 
## cartoon
def cartoon(toggle=1):
+
def cartoon(p1=''):
     if(toggle==1):
+
     if(p1=='off'):
 +
        cmd.hide("cartoon")
 +
    elif(p1==''):
 
         cmd.show("cartoon")
 
         cmd.show("cartoon")
 
     else:
 
     else:
         cmd.hide("cartoon")
+
         print("feh!")
 
cmd.extend("cartoon", cartoon)
 
cmd.extend("cartoon", cartoon)
 
+
 
## wireframe
 
## wireframe
def wireframe(toggle=1):
+
def wireframe(p1=''):
     if(toggle==1):
+
     if(p1=='off'):
 +
        cmd.hide("lines")
 +
    elif(p1==''):
 
         cmd.show("lines")
 
         cmd.show("lines")
 
     else:
 
     else:
         cmd.hide("lines")
+
         print("feh!")
 
cmd.extend("wireframe", wireframe)
 
cmd.extend("wireframe", wireframe)
 
+
 
+
 
## exit
 
## exit
 
def exit():
 
def exit():
 
     cmd.quit()
 
     cmd.quit()
 
cmd.extend("exit", exit)
 
cmd.extend("exit", exit)
 +
</source>
  
</source>
+
[[Category:Script_Library]]
 +
[[Category:ThirdParty_Scripts]]

Latest revision as of 03:08, 28 March 2014

Here it is! Long awaited, less tested;

Install

Linux
In your ~/.pymolrc set something like the following
 run ~/pymolscripts/rasmolify.py 
Finally, make a directory called ~/pymolscripts and copy the code below into a file called rasmolify.py - That should do the trick. You may also like to add a line that reads
set virtual_trackball, off
in your ~/.pymolrc
Windows
???

Usage

Think 'rasmol'

Related

TODO

  • Check if a 'selection' exists, and limit commands to that selection (map the concept of a rasmol 'selection' onto the concept of a pymol selection).
  • Implement 'scaling' units for display functions
  • Fix the mouse behaviour?
  • Add a rasmol GUI!

Code

## This is just a quick hack. For something more meaty see;
## http://arcib.dowling.edu/sbevsl/
 
## Version 0.0.00-000/1
 
 
## Turn off the virtual_trackball
cmd.set("virtual_trackball", "off")
 
 
## spacefill
def spacefill(p1=''):
    if(p1=='off'):
        cmd.hide("spheres")
    elif(p1==''):
        cmd.show("spheres")
    else:
        print("feh!")
cmd.extend("spacefill", spacefill)
 
## cartoon
def cartoon(p1=''):
    if(p1=='off'):
        cmd.hide("cartoon")
    elif(p1==''):
        cmd.show("cartoon")
    else:
        print("feh!")
cmd.extend("cartoon", cartoon)
 
## wireframe
def wireframe(p1=''):
    if(p1=='off'):
        cmd.hide("lines")
    elif(p1==''):
        cmd.show("lines")
    else:
        print("feh!")
cmd.extend("wireframe", wireframe)
 
 
## exit
def exit():
    cmd.quit()
cmd.extend("exit", exit)