Hi Robert,

On 2004-05-24 13:46 you wrote:
> 
> I probably have a very stupid question.
> How do I run the color_b.py script using the latest PYMOL on windows?
> Just clicking on it does not work, I also tried to run it by calling it from
> within pymol but this did not work either.

Sorry if the instructions aren't clear.  I don't often work with
windows, so I forget that windows users may not think the way we
UNIX-types do.  I type more than I click!

In general, *many* python scripts for use with PyMOL are used in a
two-step process. You "run" the script from the PyMOL command line (i.e.
in the external GUI window, or within the OpenGL window, it doesn't
matter), by issuing the "run" command (hmmm, confusing nomenclature
here!):

  run color_b.py

This just loads the color_b function into PyMOL. The "run" command is
running the python script, but in the case of most of my scripts, that
just defines a function that can be called repeatedly in PyMOL. Then
you can use it like a standard PyMOL command, again typing in the PyMOL
command line:

  color_b object
  
or with optional parameters such as:

  color_b object, grad=bwr, b0=5, b1=10

Let me know if this still isn't clear.  This is typical of external
python scripts that are to be run from PyMOL; unless the script does
something you are only likely to do once it should be written as a
function that can be called multiple times after loading it.  

You can even get help after doing "run color_b.py" by typing "help
color_b".  You should see a description of what it does and how to use
it.

In fact, for the scripts that I use often, I include the "run
scriptname.py" commands in my .pymolrc file so that they are included
automatically.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.                         <r...@post.queensu.ca>
Senior Research Associate                            phone: 613-533-6821
Dept. of Biochemistry, Queen's University,             fax: 613-533-2497
Kingston, ON K7L 3N6  Canada       http://adelie.biochem.queensu.ca/~rlc
    PGP Fingerprint: 9B49 3D3F A489 05DC B35C  8E33 F238 A8F5 F635 C0E2

Reply via email to