Friday, 17 December 2010

using "tee" for interactive input generation

Here is just a little rather simple thing which took me a long time to find out.

The question was: If you have a program that needs interactive input generation, can you still create something like an input file? The motivation was mainly the define program of Turbomole. Assuming you have 100 molecules (or structures of one molecule) and you want to do the same type of calculation on all of them. Running define for 100 times is not really the most exciting option. So what can you do?

You run
tee define.in | define
on the first molecule and use the interactive input facility. The file define.in will contain your input.

For the next 99 molecules you can just use
define < define.in > define.out
in any kind of loop structure (using separate directories for each job).

In that fashion you had the advantages of an interactive input generator but you are still able to automatize things.

Wednesday, 1 December 2010

DNA photostability

It's been a long time since I have written anything. Too many other things to do. But now I had the chance to play around with graphics, work related. This graphic shows the response of UV bases to sun light. It was for a promotion (DE, EN) of this PNAS article, which explains the relaxation mechanisms of DNA bases after UV irradiation. I do not have anything to do with the paper but it is still nice to see my image on the front page of the homepage of the University of Vienna.


The images correspond to minimum energy conical intersection structures of the four DNA bases. At such geometries the ground state energy is strongly raised but the energy of the biradical excited state is not so much affected or even lowered. Therefore ground and excited states can become degenerate and a transition can occur. It is probably through such geometric distortions that DNA bases can efficiently relax to the ground state on a pico second time scale. Then only a slight chance of undergoing any photochemical modifications remains.

Through this inherent photostability in can be assured that only a small fraction of DNA bases undergoes photodamage. The small part that does react, for example to pyrimidine dimers, can be repaired by enzymes.

Now the technical part about the image: The background comes from a picture of the sun against a blue sky in the Austrian alps. The molecular structures were rendered with pymol. The trick was to use a transparent background in the rendering

set ray_opaque_background=0

Through adjusting the light setting I tried to get the light source to where the sun would be for the separate structures. e.g.

set light, [-100,-20,0]

to move the light source to the left and a little bit lower which would have been the appropriate setting for the adenine on top.

By reducing the ambient setting I tried to make this more pronounced. For this I used the Setting/Edit All in the menu, which is in some cases more convenient than the command line.