So I've tryed to use cmd.refresh() and it has worked! So your script must include the following: cmd.load cmd.refresh [some actions] cmd.load cmd.refresh [some actions] etc.
2011/9/14 Matthias Schmidt <matthias.rene.schm...@gmail.com>: > Hi, not quite the script does the following: > > 1: load a file > 2: modifiy this file using gromacs/editconf (because the cmd.rotate > command is buggy) and os.system() calls > 3: load the modified file > 4: run some other external os.system() calls > > I would like to see the modified file before I run the other scripts > in 4), but I can't because pymol will only update the open GL display > once the script terminates. > > Matthias > > On Wed, Sep 14, 2011 at 3:00 PM, Андрей Гончар <gontc...@gmail.com> wrote: >> So what exactly do you want your script to do? >> 1. Show loaded file >> 2. Modify file >> 3. Show modified file >> >> Is it right? >> >> 2011/9/14 Matthias Schmidt <matthias.rene.schm...@gmail.com>: >>> Hi, >>> >>> This approach does not work, because file.pdb is written in "do >>> something..." >>> >>> Also, if I say "spawn script.py gloabl" instead of "run script.py", >>> followed by script("parameter1", "...") >>> >>> the openGL display still won't refresh? >>> >>> Best, >>> >>> Matthias >>> >>> On Wed, Sep 14, 2011 at 1:59 PM, Андрей Гончар <gontc...@gmail.com> wrote: >>>> 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 >>> >>> >>> >>> -- >>> Best, >>> >>> Matthias >>> -- >>> Structural Bioinformatics and Computational Biochemistry Unit >>> Dept. of Biochemistry >>> University of Oxford >>> >>> http://sbcb.bioch.ox.ac.uk/schmidt.php >>> >> >> >> >> -- >> >> Андрей Гончар >> >> ------------------------------------------------------------------------------ >> 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 > > > > -- > Best, > > Matthias > -- > Structural Bioinformatics and Computational Biochemistry Unit > Dept. of Biochemistry > University of Oxford > > http://sbcb.bioch.ox.ac.uk/schmidt.php > -- Андрей Гончар ------------------------------------------------------------------------------ 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