This is a read-only mirror of pymolwiki.org
Difference between revisions of "Rasmolify"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
Here it is! Long awaited, less tested; | Here it is! Long awaited, less tested; | ||
+ | == 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 | ||
+ | |||
+ | == Usage == | ||
+ | Think 'rasmol' | ||
+ | |||
+ | == Code == | ||
<source lang="python"> | <source lang="python"> | ||
## This is just a quick hack. For something more meaty see; | ## This is just a quick hack. For something more meaty see; |
Revision as of 13:42, 20 February 2008
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 readsset virtual_trackball, off
in your ~/.pymolrc
Usage
Think 'rasmol'
Code
## This is just a quick hack. For something more meaty see;
## http://arcib.dowling.edu/sbevsl/
## Version 0.0.00-000/0
## TODO:
## Check if a 'current' selection exists, and perform the action on
## that selection. Make 'off' proper. Add units to the commands that
## take them. Turn off the virtual_trackball. Fix the mouse behaviour.
## spacefill
def spacefill(toggle=1):
if(toggle==1):
cmd.show("spheres")
else:
cmd.hide("spheres")
cmd.extend("spacefill", spacefill)
## cartoon
def cartoon(toggle=1):
if(toggle==1):
cmd.show("cartoon")
else:
cmd.hide("cartoon")
cmd.extend("cartoon", cartoon)
## wireframe
def wireframe(toggle=1):
if(toggle==1):
cmd.show("lines")
else:
cmd.hide("lines")
cmd.extend("wireframe", wireframe)
## exit
def exit():
cmd.quit()
cmd.extend("exit", exit)