From: Nuno R. L. Ferreira (nunolf_at_ci.uc.pt)
Date: Sat Mar 11 2006 - 13:05:10 CST

Hi *

I'm calculating some properties on a trajectory, using VMD in batch mode.
Some of these properties are ascii matrices, like a Calpha distance map
(matrix has real numbers) or secondary structure vs time (matrix contains
stride code letters; nº rows == nº residues).

How do I convert this plain matrices to an image?
I though that the best way was to produce a raster file (like .ppm or .xpm),
and then use ImageMagick or NetPBM programs to convert the text file to a
more appropriate image format, like .png.

To do that, I need some scripting.
If I want to get a .ppm (or netpbm like) file, I need to convert each matrix
entry to an RGB code. In the .xpm case, I need to convert the matrix entries
to a code, which is then coupled to a color via a code on the header of the
file.

Do you guys ever tryed to do that? Is this a good approach?

Best regards,
N.

######################################
Nuno Ricardo Santos Loureiro da Silva Ferreira
Departamento de Química
Faculdade de Ciências e Tecnologia
Universidade de Coimbra
3004-535 Coimbra - Portugal
Fax: +351 239 827703 - www.biolchem.qui.uc.pt
########################################

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0610-2, 10-03-2006
Tested on: 11-03-2006 19:05:11
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com