From: Warren D. <wa...@de...> - 2006-01-06 21:35:16
|
Jerome, Try calling=20 pymol.cmd.refresh() before=20 pymol.cmd.png(name) Cheers, Warren -- Warren L. DeLano, Ph.D. =20 Principal Scientist . DeLano Scientific LLC =20 . 400 Oyster Point Blvd., Suite 213 =20 . South San Francisco, CA 94080 USA =20 . Biz:(650)-872-0942 Tech:(650)-872-0834 =20 . Fax:(650)-872-0273 Cell:(650)-346-1154 . mailto:wa...@de... =20 =20 > -----Original Message----- > From: pym...@li...=20 > [mailto:pym...@li...] On Behalf Of=20 > Jerome PANSANEL > Sent: Friday, January 06, 2006 5:06 AM > To: pym...@li... > Subject: [PyMOL] Python scripting for Pymol >=20 > Hi, >=20 > I writing a small script in python, in order to export png=20 > picture from a MDL sdfile. > Here is a sample of the function : >=20 > 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) >=20 >=20 > It works fine only if I have the function time.sleep(1). If=20 > not, I have only empty pictures. Is there another solution to=20 > delete the molecule only when the png file has been written ? >=20 > Thanks, >=20 > Jerome Pansanel >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > through log files for problems? Stop! Download the new AJAX=20 > search engine that makes searching your log files as easy as=20 > 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 >=20 >=20 >=20 >=20 |