Hi Gilleain and Andreas,

This is what I use to save information about the image.  I redefine the png command.

from pymol import cmd
import os
import re
import string
import selector

def __init__(self):

def mypng(fname, quiet=1):
r = 1
format = 'vew'
cmd.png(fname, quiet)

if re.search("\.png$",fname):
         fname = re.sub("\.png$","",fname)
fname = fname + ".vew"
fname = os.path.expanduser(fname)
fname = os.path.expandvars(fname)
f.write("#View matrix for " + fname + "\n")
st = cmd.get_view(output=3)
return r


This command will use the name that you specify for the png file to also output all of the view matrix to a file that is saved with the .vew extension.  The png file is saved as usual.  This idea could be expanded to save other things to the meta file (object information).


Mark A. Saper, Ph.D.
Associate Professor of Biological Chemistry
Biophysics Research Division, University of Michigan 
Chemistry Building Room 3040
930 N University Ave
Ann Arbor MI 48109-1055 U.S.A.

saper@umich.edu        (734) 764-3353        fax (734) 764-3323
Biophysics Interdepartmental Graduate Program: http://www.umich.edu/~biophys