Try to do the following: in your script.py from pymol import cmd
cmd.load("file.pdb") def script(): do something... cmd.extend("script", script) In this case your pdb will be loaded before the script completes. 2011/9/14 Thomas Holder <spel...@users.sourceforge.net>: > Hi Matthias, > > use "spawn" instead of "run". > > http://pymolwiki.org/index.php/Fork > > Cheers, > Thomas > > On 09/14/2011 02:30 PM, Matthias Schmidt wrote: >> Hi, >> >> I am loading a pdb file in a python script for pymol. >> >> The script has the following structure: >> >> def script >> do something >> cmd.load("file.pdb") >> do lot more >> cmd.extend("script", script) >> >> When the python script is completed, the molecule file.pdb is shown >> in the openGL display, but not before. How can I show the molecule >> file.pdb in the display immediately after loading it and before "do >> lot more" is executed? >> >> Best, >> >> Matthias >> -- >> Structural Bioinformatics and Computational Biochemistry Unit >> Dept. of Biochemistry >> University of Oxford >> >> http://sbcb.bioch.ox.ac.uk/schmidt.php > > -- > Thomas Holder > MPI for Developmental Biology > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net > -- Андрей Гончар ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net