Hi, I tried a similar, but simpler, example :
def mol2png(name): cmd.png(name) cmd.delete(name) called as 'mol2png("1a2pA")', given that I have an object called "1a2pA" loaded. It works just fine on my laptop (mac). Odd. gilleain torrance On 1/6/06, Jerome PANSANEL <j.pansa...@pansanel.net> wrote: > > Hi, > > I writing a small script in python, in order to export png picture from a > MDL > sdfile. > Here is a sample of the function : > > def mol2png(ctfile,name): > pymol.cmd.read_molstr(ctfile,name) > pymol.cmd.set("valence",1) > pymol.cmd.color("black","elem c") > pymol.cmd.color("red","elem o") > pymol.cmd.color("blue","elem n") > pymol.cmd.color("yellow","elem s") > pymol.cmd.bg_color("white") > pymol.cmd.zoom(name) > pymol.cmd.png(name) > time.sleep( 1 ) > pymol.cmd.delete(name) > > > It works fine only if I have the function time.sleep(1). If not, I have > only > empty pictures. Is there another solution to delete the molecule only when > the png file has been written ? > > Thanks, > > Jerome Pansanel > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users >