On Sun, 7 Jul 2002, Nathaniel Echols wrote:

> 1. There doesn't seem to be any way to manually speciify the view area.
> Thus, if I want all images to be in the same frame of reference, I need to
> load them all as different states of the same object, e.g. "load
> frame01.pdb, mov" many times over.  This works fine, but even with 4GB of
> memory PyMOL crashes when I load everything in.  I've found a way around
> this, but it would be much simpler if I could specifiy exactly what angle
> and window to use for rendering.  I'm pretty sure this doesn't exist right
> now, but will it in the future?

It exists...see get_view and set_view. 

cmd.get_view() returns a tuple which can be passed to cmd.set_view(...)

ie. 

set_view (\
    -0.745493710,   -0.657504320,   -0.109211229,\
     0.235591769,   -0.413225234,    0.879625380,\
    -0.623487175,    0.630026162,    0.462960035,\
     2.252975464,    1.815253615,  -55.481048584,\
    -3.770999908,   -6.882999897,   18.787000656,\
    43.924808502,   75.804443359,    0.000000000 )

or

cmd.set_view((\
    -0.745493710,   -0.657504320,   -0.109211229,\
     0.235591769,   -0.413225234,    0.879625380,\
    -0.623487175,    0.630026162,    0.462960035,\
     2.252975464,    1.815253615,  -55.481048584,\
    -3.770999908,   -6.882999897,   18.787000656,\
    43.924808502,   75.804443359,    0.000000000 ))

or

vu=cmd.get_view()

...

cmd.set_view(vu)

in vu[...]:

0-8 is the 3x3 rotation matrix
9-11 is the camera location (I think -- been a while...)
12-14 is the origin of rotation
15-16 are the clipping distances
and 17 is the orthoscopic flag.
 
> 2. Using pretty much any method, PyMOL frequently lops off part of the
> molecule.  This has become a large problem; I'm using PyMOL quite a bit to
> make animations (replacing Molscript entirely), and frequently an
> interesting part of the structure will be out of frame.  How can I avoid
> this?  This is all being done on the command line (usually invoked by some
> CGI script), so I have no way of adjusting the zoom.  'zoom' hasn't been
> too much help.

The initial zoom only works on the first frame, so you should issue zoom
again once all of the frames have been loaded.  If you're still losing
parts of the molecule, add an additional buffer to the zoom command:

zoom (all),3

> Any advice would be much appreciated.  I'm trying to do stuff that would
> be messy in pretty much any environment (e.g. I can't even load all the
> structures with less than 1GB of memory), but the viewport problems apply
> to pretty much anything.

Well, ideally it shouldn't be as messy with PyMOL/Python, but we've still
a ways to go...

Cheers,
Warren



Reply via email to