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