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.p...@pa...> 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 whe=
n
> 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=3D7637&alloc_id=3D16865&op=3Dclick
> _______________________________________________
> PyMOL-users mailing list
> PyM...@li...
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
|