|
From: Robert C. <rl...@po...> - 2005-04-27 20:19:16
|
Hi Paula,
* Paula Salgado <pa...@st...> [2005-04-27 10:44] wrote:
> Hi,
>=20
> Is it possible to save an r3d file in pymol for exporting into other=20
> render programs like povray? I would like to test rendering in other=20
> programs...
I use the following script to save an input file for povray:
#---------------------- save as make_pov.py ----------------
# make_pov.py =
=20
=66rom pymol import cmd
def make_pov(file):
"""
Do "run make_pov.py" from within pymol and then execute the script =
=20
with "make_pov povray.inp" to create the povray.inp file. =
=20
=20
make note of the dimensions written out by this script and use the
same (or the same ratio) within povray:
e.g. output (the "vol" lines only appear if spheres are present):
=
=20
PyMOL>make_pov('povray.inp')
RayRenderPOV: w 1100 h 900 f 63.349 b 102.310
RayRenderPOV: vol -17.316 17.316 -14.168
RayRenderPOV: vol 14.168 63.349 102.310
RayRenderPovRay: processed 714 graphics primitives.
Ray: total time: 0.03 sec. =3D 123885.9 frames/hour. (0.03 sec. accum.)
=20
So for example, you would run povray with:
povray +Ipovray.inp +W1100 +H900
or
povray +Ipovray.inp +W550 +H450
"""
(header,data) =3D cmd.get_povray()
povfile=3Dopen(file,'w')
povfile.write(header)
povfile.write(data)
povfile.close()
cmd.extend('make_pov',make_pov)
#---------------------- end of make_pov.py ----------------
All the stuff between the """'s is just instructional comment.
Save this script as a file and do "run make_pov.py" from the PyMOL
command line, then you can type "make_pov povray.inp" to create the
povray.inp file.
Cheers,
Rob
--=20
Robert L. Campbell, Ph.D. <rl...@po...>
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
|