[chimera-dev] asynchronous running of Chimera extensions

Marcin Pawlowski marcinp at genesilico.pl
Tue Aug 17 12:22:04 PDT 2010



Thanks a lot for the email you sent me. 

Now I need to talk to one of my coworkers- Sebastian Opalczynski, who will be at work next week.  We will touch you soon. 

Cheers 

Marcin 

Quoting Eric Pettersen <pett at cgl.ucsf.edu>: 

>   On Aug 16, 2010, at 3:54 PM, Marcin Pawlowski wrote: 
>   Great. Thanks a lot.
>  
> We using both of them 1) using a web service and 2)  running the  
> program on the local machine.
>  

 Hi Marcin,  Unfortunately Conrad is sick today, so I'll try to answer the web service question without causing too much damage. :-)  So the answer depends a bit on how the back-end web service is implemented.  If it's implemented as an Opal service, you should look at the StructureDiagram.ws module, in particular the CDKDepictionService._runAsTask method.  It's probably more efficient for you to ask questions about the code than to have me explain it line by line.  Besides, I think it's actually pretty straightforward in this case.   If the web service is implemented by REST, try looking at the ModBase.gui module, particularly the FetchScore._submitJob method.  That method posts a multipart form to a REST service and reads back the result.  You could adapt that code and use the same task "wrapper" that the Opal code uses.   That code doesn't directly use a task wrapper because it is one of /many/ requests that Chimera will be making to that web service (usually 10-20 at once), so it uses a queue to prevent overwhelming the remote server with requests.  If your service will be making multiple requests at once then maybe you would want to do the same thing.  If so, then look FetchScore.__init__ to see how the queue is set up (the httpq.get(), hq.newSlot(), and slot.request() calls) and then the end of the FetchScore._submitJob method to see how secondary requests to the server (if any) can be added to the queue with q.put().   Please feel free to ask more questions!   
   --Eric    
                            Eric Pettersen                           UCSF Computer Graphics Lab    http://www.cgl.ucsf.edu[1]   

>  Quoting Conrad Huang <conrad at cgl.ucsf.edu[2]>:
>  
>  
> 
> Chimera has code for running jobs in the background while keeping  
>  

> the GUI active.  Some of this code is still under development and I  
>  

> would suggest using the daily build rather than 1.4.1.  Here are the  
>  

> relevant modules and an example:
>  

> 

> chimera.SubprocessMonitor
>  

> Module for running and monitoring background process
>  

> chimera.tasks
>  

> Module for display background tasks in the task manager interface
>  

> chimera.printer
>  

> SubprocessMonitor is used in saveImage() to launch background POV-Ray
>  

> 

> If you are using a web service rather than running the program on  
>  

> the local machine, there are other modules that may be of interest.
>  

> 

> Conrad
>  

> 

> On 8/12/10 5:57 AM, Marcin Pawlowski wrote:
>  

>  
> 
> Dear Chimera developers.
>  

>  
> 
> Me and of my students are developing  a chimera extension to deal with
>  

>  
> 
> protein structures.
>  

>  
> 
> Unfortunately, the execution of our plunging last at least 5 minutes,
>  

>  
> 
> so during this time the chimera program is hinged.  We would like to
>  

>  
> 
> execute the program in an asynchronous way.
>  

>  
> 
> 
>  

>  
> 
> Is it possible?
>  

>  
> 
> 
>  

>  
> 
> Please do not hesitate to contact us if you require further
>  

>  
> 
> information about our project.
>  

>  
> 
> 
>  

>  
> 
> Best regards,
>  

>  
> 
> Marcin Pawlowski
>  

>  
> 
> 
>  

>  
> 
> 
>  

>  
> 
> _______________________________________________
>  

>  
> 
> Chimera-dev mailing list
>  

>  
> 
> Chimera-dev at cgl.ucsf.edu[3]
>  

>  
> 
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev[4]
>  

> 

> 

> 

> 

_______________________________________________
Chimera-dev mailing list
 Chimera-dev at cgl.ucsf.edu[5]
http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev

-------------------------

Scanned for malicious content. See headers for details.  

Links:
------
[1] http://www.cgl.ucsf.edu
[2] mailto:conrad at cgl.ucsf.edu
[3] mailto:Chimera-dev at cgl.ucsf.edu
[4] http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
[5] mailto:Chimera-dev at cgl.ucsf.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20100817/55899d0d/attachment.html>


More information about the Chimera-dev mailing list