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 <[email protected]>:
> 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, Андрей Гончар <[email protected]> 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 <[email protected]>:
>>> 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&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>>> Learn about the latest advances in developing for the
>>> BlackBerry&reg; mobile platform with sessions, labs & more.
>>> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
>>> http://p.sf.net/sfu/rim-devcon-copy1
>>> _______________________________________________
>>> PyMOL-users mailing list ([email protected])
>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>> Archives: http://www.mail-archive.com/[email protected]
>>>
>>
>>
>>
>> --
>>
>> Андрей Гончар
>>
>> ------------------------------------------------------------------------------
>> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>> Learn about the latest advances in developing for the
>> BlackBerry&reg; mobile platform with sessions, labs & more.
>> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
>> http://p.sf.net/sfu/rim-devcon-copy1
>> _______________________________________________
>> PyMOL-users mailing list ([email protected])
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/[email protected]
>
>
>
> --
> Best,
>
> Matthias
> --
> Structural Bioinformatics and Computational Biochemistry Unit
> Dept. of Biochemistry
> University of Oxford
>
> http://sbcb.bioch.ox.ac.uk/schmidt.php
>



-- 

Андрей Гончар

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to