Pymol: HighResolution Raytracing on large Protein Complexes?

12 posts / 0 new
Last post
phhuber
phhuber's picture
Pymol: HighResolution Raytracing on large Protein Complexes?

Hi

I want to make a high resolution image of a large protein complex, its the capsid of parvovirus B19 consisting of 60 monomers (pdb code 1S58). I assembled the biological unit using split_states, calculated the surface and saved the png image using the png command, which works fine, but only generates the resolution which is shown on the screen with the OpenGL renderer.
When I use the function ray 1000,1000, which should generate a 1000x1000 px image with the built-in raytrace renderer, Pymol shuts down with the error message:

Runtime Error! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

How could I solve this problem? I'm using Windows 2000 on a 2.8 GHz Pentium4 CPU, but had the same problem on WinXP with 2x3.0 GHz PentiumD.
Actually the OpenGL-Quality would be sufficient to me, but not the screen resolution, would rather like a 5000x5000 px or more picture...And I don't mind if the computer has to work at night... ;-)

Thanks for your help!
cheers
phil

bgood
bgood's picture
Hi Phil,

Hi Phil,

I'm not a Pymol user at the moment, so can't offer any specific advice :(. But, when things like this have happened to me before its almost always a result of running out of RAM for one reason or another. How much memory do you have available on your system? Can you check to see if its all being used?

I'm not a python user either.. can you specify the amount of memory available for the python interpretter? In java, you often have to increase the maximum heap size to run applications like this because, by default, the jvm is kept quite light (I believe 2mb).

phhuber
phhuber's picture
Hi and thanks for the reply!

Hi and thanks for the reply!

I have 1 GB of RAM and checking the used memory in the task manager reveals, that indeed Pymol uses a lot of RAM. Sometimes the available RAM drops to 5 MB, mostly it is about 20. This is also the case when I am rendering for instance the protein complex as sticks, which does not lead to a crash.
When I render the complex as surface model, Pymol crashes IMMEDIATELY, I can't discover a complete RAM blockade in the task manager.

I unfortunately don't know how to check the maximum available memory for the python interpreter. Can you tell me how to do this?

cheers
Phil

bgood
bgood's picture
Hi,

Hi,

I think there is probably nothing you can do to python like what I was thinking before.. But, perhaps this from an old message on the pymol list will help?

"You may try to decrease the value of hash_max, which will reduce the
memory requirement for ray tracing, at the expenso of longer rendering
time. E.g:

set hash_max, 50 "

ryan_m
ryan_m's picture
If you were doing this on

If you were doing this on Linux you could use "nice" to limit the resources that Pymol uses. My guess is even without niceing the job you would not crash the system but rather just use swap memory until the job completes.

Fraser Moss
Fraser Moss's picture
Pymol manualhttp://pymol

Pymol manual
http://pymol.sourceforge.net/

Pymol Wiki

http://www.pymolwiki.org/index.php/Main_Page

Now how to make your image

http://www.pymolwiki.org/index.php/Publication_Quality_Images

In short the quickest easiest way is to type

png fileName, dpi=300 (or whatever resolution you want)

Fraser Moss
Fraser Moss's picture
so for your 1000 x 1000 you

so for your 1000 x 1000 you should type in the GUI

png yourproteinname, dpi=1000

I have saved 1200 dpi images this way on my laptop running Windows XP, a 1.73GHz Pentium M with 1.5 GB RAM without hassle.

phhuber
phhuber's picture
frasermoss wrote:so for your

frasermoss wrote:

so for your 1000 x 1000 you should type in the GUI

png yourproteinname, dpi=1000

I have saved 1200 dpi images this way on my laptop running Windows XP, a 1.73GHz Pentium M with 1.5 GB RAM without hassle.

This is a nice command, but it does not alter the dimension of a picture, e.g. if the picture on your screen is 700x900px, the png command does not change that. It just makes the picture smaller with higher resolution or bigger with lower resolution. What I would like to do, is to really increase the number of pixels... so I can print it for instance as DIN A3 format.

phhuber
phhuber's picture
bgood wrote:Hi,

bgood wrote:

Hi,
"You may try to decrease the value of hash_max, which will reduce the
memory requirement for ray tracing, at the expenso of longer rendering
time. E.g:

set hash_max, 50 "

I tried with the has_max set to 50 and 20, both of this didn't work as well... neither on linux.

phhuber
phhuber's picture
ryan_m wrote:If you were

ryan_m wrote:

If you were doing this on Linux you could use "nice" to limit the resources that Pymol uses. My guess is even without niceing the job you would not crash the system but rather just use swap memory until the job completes.

I also tried to run the whole thing on Suse Linux 10.1 64bit. Pymol crashed as well, the application terminated without any comment... I have only very limited linux skills, but I will try to start pymol with increased "nice" increment and post my experience here... ;-)
Thanks for all the good advice!

Perhaps it's just a little too keen to render a whole virus capsid...? Should I wait for quantum computers? :)

Fraser Moss
Fraser Moss's picture
phhuber wrote:frasermoss

phhuber wrote:

frasermoss wrote:
so for your 1000 x 1000 you should type in the GUI

png yourproteinname, dpi=1000

I have saved 1200 dpi images this way on my laptop running Windows XP, a 1.73GHz Pentium M with 1.5 GB RAM without hassle.

This is a nice command, but it does not alter the dimension of a picture, e.g. if the picture on your screen is 700x900px, the png command does not change that. It just makes the picture smaller with higher resolution or bigger with lower resolution. What I would like to do, is to really increase the number of pixels... so I can print it for instance as DIN A3 format.

Can't you just use Photoshop once you've saved your high dpi resolution image to resize the file, maintaining the dpi?

Use the Image >Image Size command and set desired image size and resolution and ask it to re sample.

Or does that lose resolution for you?

phhuber
phhuber's picture
What I need to get a sharp

What I need to get a sharp AND large image, is a large pixel x pixel dimension. The resolution itself is not important, it can be, as you say altered in Photoshop. When you have a 1000x1000 px image, you can define it as 10x10 inch with a resolution of 100 ppi, or 1x1 inch with 1000 ppi... I need a picture in the size of A3 (approx. 30x42 cm) with a printable resolution, let's say 300 dpi. When I now just enlarge a small image with Photoshop, the quality does of course not increase, only the size (e.g. the resolution decreases with increasing size...)
Well, I'll anyhow try Photoshop's resample function, as this tool achieves amazing results sometimes :)