> From: Scott Dixon [mailto:scott@...]
> > By the way, it is important to understand the disntinction=20
> between PyMOL's
> > scripts and Python programs you run your PyMOL -- PyMOL scripts are
> > basically just a linear series of PyMOL commands. For anything more
> > sophisticated, use straight Python.
> Understood. BTW, one way to get part of the benefit of arguments to
> PyMOL scripts is to use named selections and to load molecules into
> specific object names (like say, "ligand"). Then your=20
> scripts can work
> on the standard names and be more widely reusable. But I take your
> point about Python being much more versatile.
Yes, you can certainly use program state as a means of conveying
information, and you can even use global python variables in this manner
even when operating inside of PyMOL command scripts: =20
# where ex1.pml contains...
NOTE: a forward slash can be used to explicitly include a line of Python
in a PyMOL script. Normally it isn't required (since PyMOL commands
fall back on Python "eval"), but it is more efficient because is
bypasses normal parsing.
Again, I view these approaches as best for limited -- real Python
scripts gives you so much more, with very little added burden.
Is it possible to make changes to the way individual frames are rendered?
Specifically, I'm writing a Python script (translated literally from C,
but I'm too tired to learn the Python API right now) to evaluate bond
"quality" and highlight the distorted regions in a frame of a protein
morph. However, since the distortions tend to come in the middle of a
morph, I want to examine each frame alone and apply highlighting only
Right now, treating individual frames as part of an object (i.e. for a
movie) means that calls like 'color red, 101/ca' are applied to every
state. Is there some way to only run that command on one state? In
simple terms, I'm trying for a movie that changes color during its course
to indicate bond quality. It's much easier to do this if I can use movie
objects, especially since it would be nice to be able to run this
interactively. Otherwise, I'm going to just create a very long pml file
with all the commands.