Hi,

This is about the way I do it :) To make life easier, I have a
function to write the POV-Ray file in two pieces, using an #include
statement to include the object description in the overall scene setup
file. I've found this much easier to work with, since it allows to
change the light and camera and such much quicker than editing a
multi-Mb file, and the object description is easily modified with
sed/awk. But what it comes down to is memorizing this one line to
export your (part of a) scene to a POV-Ray include file:

open("part.inc","w").write(cmd.get_povray()[1])

Or to make it even easier:

def writepov(x="povray.inc"): open(x,"w").write(cmd.get_povray()[1])
cmd.extend("writepov", writepov)

Hope it helps,

Tsjerk

On Thu, Apr 30, 2009 at 8:48 AM, Harry M. Greenblatt
<harry.greenbl...@weizmann.ac.il> wrote:
> BS"D
>    There is a  workaround to this problem, which I used in a different
> program and have suggested in the past to Warren and others.  If getting the
> ray tracer to recognize the various clipping planes is difficult, this is
> probably the best solution.  It would be helpful, however, if Warren changed
> the POVray input files that are created by PyMOL a bit.
>     One can set up all the various parts of the picture, and then
> selectively show each element and clip it, with the others hidden.  Then
> output a POVray file.  This should only include the visible elements
> (correct, Warren?).  Hide this element, and show the next one, adjust the
> clipping plane, and output the POVray file.  One can then have a master
> POVray file which contains as many "include" statements as are needed to
> bring all the various elements together in one rendered image.
>   The difficulty in the current implementation of PyMOL is that the output
> for POVray contains both the scene definitions and the graphic primitives in
> one messy and potentially large file.  If the scene definitions could be
> stored in one small file, and the graphic primitives in another file, this
> process would be much easier.  One could then select one of the scene
> definitions files as the "master" and add "include" statements for all the
> graphic primitives as is needed.  I suppose this process is possible with
> the current POVray files, just not as simple.  I have examples if anybody is
> interested.
>
> Harry
>
> Sorry, still not done (I have made two attempts, but both failed).
> While OpenGL supports arbitrary clipping planes, accomplishing this
> correctly in the ray tracer is a much harder problem that one might
> think...
> Cheers,
> Warren
>
> -----Original Message-----
> From: Mankin Alexander [mailto:sh...@uic.edu]
> Sent: Wednesday, April 29, 2009 6:18 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] object-specific Z-clipping
> Dear all,
> Does anyone know whether object-selective z-clipping has been
> implemented in the newer Pymol version(s)? If not, has anyone found
> any solution around (since 2002 no new threads on the matter)?
> Thanks,
> Shura Mankin
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
> -------------------------------------------------------------------------
>
> Harry M. Greenblatt
>
> Associate Staff Scientist
>
> Dept of Structural Biology           harry.greenbl...@weizmann.ac.il
>
> Weizmann Institute of Science        Phone:  972-8-934-3625
>
> Rehovot, 76100                       Facsimile:   972-8-934-4159
>
> Israel
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
>



-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users

Reply via email to