From: Axel Kohlmeyer (akohlmey_at_vitae.cmm.upenn.edu)
Date: Sat Mar 11 2006 - 16:25:18 CST

On Sat, 11 Mar 2006, Nuno R. L. Ferreira wrote:

NF> Hi *

nuno,

NF>
NF> I'm calculating some properties on a trajectory, using VMD in batch mode.
NF> Some of these properties are ascii matrices, like a Calpha distance map
NF> (matrix has real numbers) or secondary structure vs time (matrix contains
NF> stride code letters; nº rows == nº residues).
NF>
NF> How do I convert this plain matrices to an image?
NF> I though that the best way was to produce a raster file (like .ppm or .xpm),
NF> and then use ImageMagick or NetPBM programs to convert the text file to a
NF> more appropriate image format, like .png.
NF>
NF> To do that, I need some scripting.
NF> If I want to get a .ppm (or netpbm like) file, I need to convert each matrix
NF> entry to an RGB code. In the .xpm case, I need to convert the matrix entries
NF> to a code, which is then coupled to a color via a code on the header of the
NF> file.
NF>
NF> Do you guys ever tryed to do that? Is this a good approach?

i think your idea is pretty reasonable and straightforward to
implement. i'd suggest you try the .xpm format first, as it is
quite self-explanatory and easily scriptable from VMD.

regards,
     axel

NF>
NF> Best regards,
NF> N.
NF>
NF>
NF>
NF> ######################################
NF> Nuno Ricardo Santos Loureiro da Silva Ferreira
NF> Departamento de Química
NF> Faculdade de Ciências e Tecnologia
NF> Universidade de Coimbra
NF> 3004-535 Coimbra - Portugal
NF> Fax: +351 239 827703 - www.biolchem.qui.uc.pt
NF> ########################################
NF>
NF>
NF>
NF> ---
NF> avast! Antivirus: Outbound message clean.
NF> Virus Database (VPS): 0610-2, 10-03-2006
NF> Tested on: 11-03-2006 19:05:11
NF> avast! - copyright (c) 1988-2005 ALWIL Software.
NF> http://www.avast.com
NF>
NF>
NF>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.