<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 18, 2016, at 7:19 AM, Tanja Štular <<a href="mailto:ts6544@student.uni-lj.si" class="">ts6544@student.uni-lj.si</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">Here is some information regarding the questions:</div><div class=""><br class=""></div><div class="">Yes, my plugin is written in Python and it communicates with several external web services. I tried loading the object with initial smart display set to false, but there is no noted difference. </div><div class=""><br class=""></div><div class="">I'm not sure that the loading can be speeded up since the data is large (I'm attaching two examples). I would just like to send the loading process to the separate thread, then the plugin, so that plugin stays interactive. Is there an option for that?</div><div class=""><br class=""></div><div class="">Here the command that I use to load and change the structure:</div><div class=""><br class=""></div><div class=""><pre style="font-family:'DejaVu Sans Mono';font-size:9pt;background-color:rgb(39,40,34)" class=""><font color="#f8f8f2" class="">chimera.openModels.open(</font><span style="color:rgb(230,219,116)" class="">data/grid-"</span><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(253,151,31);font-style:italic" class="">name</span><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(230,219,116)" class="">".pdb"</span><span style="color:rgb(204,120,50)" class="">, </span><span style="color:rgb(253,151,31);font-style:italic" class="">identifyAs</span><span style="color:rgb(249,38,114)" class="">=</span><span style="color:rgb(230,219,116)" class="">"bsite-"</span><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(102,217,239)" class="">str</span><font color="#f8f8f2" class="">(</font><span style="color:rgb(253,151,31);font-style:italic" class="">id</span><font color="#f8f8f2" class="">))</font><span style="color:rgb(204,120,50)" class=""><br class=""></span><pre style="color:rgb(248,248,242);font-family:'DejaVu Sans Mono';font-size:9pt" class=""><span style="font-size:9pt" class="">chimera_id </span><span style="font-size:9pt;color:rgb(249,38,114)" class="">= </span><span style="font-size:9pt" class="">[<a href="http://objekt.id/" class="">objekt.id</a> </span><span style="font-size:9pt;color:rgb(102,217,239);font-style:italic" class="">for </span><span style="font-size:9pt" class="">objekt </span><span style="font-size:9pt;color:rgb(102,217,239);font-style:italic" class="">in </span><span style="font-size:9pt" class="">chimera.openModels.list() </span><span style="font-size:9pt;color:rgb(102,217,239);font-style:italic" class="">if </span><span style="font-size:9pt" class=""><a href="http://objekt.name/" class="">objekt.name</a> </span><span style="font-size:9pt;color:rgb(249,38,114)" class="">== </span><span style="font-size:9pt;color:rgb(230,219,116)" class="">'bsite-'</span><span style="font-size:9pt;color:rgb(249,38,114)" class="">+</span><span style="font-size:9pt;color:rgb(102,217,239)" class="">str</span><span style="font-size:9pt" class="">(</span><span style="font-size:9pt;color:rgb(253,151,31);font-style:italic" class="">id</span><span style="font-size:9pt" class="">)][</span><span style="font-size:9pt;color:rgb(174,129,255)" class="">0</span><span style="font-size:9pt" class="">]</span></pre><pre style="color:rgb(248,248,242);font-family:'DejaVu Sans Mono';font-size:9pt" class="">chimera.runCommand(<span style="color:rgb(230,219,116)" class="">"~show #"</span><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(102,217,239)" class="">str</span>(chimera_id))</pre><pre style="font-family:'DejaVu Sans Mono';font-size:9pt" class=""><font color="#f8f8f2" class="">chimera.runCommand(</font><span style="color:rgb(230,219,116)" class="">"vdw #"</span><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(102,217,239)" class="">str</span><font color="#f8f8f2" class="">(chimera_id))</font></pre><pre style="font-family:'DejaVu Sans Mono';font-size:9pt" class=""><font color="#f8f8f2" class="">chimera.runCommand(</font><span style="color:rgb(230,219,116)" class="">"color "</span><span style="color:rgb(249,38,114)" class="">+</span><font color="#f8f8f2" class="">colors[</font><span style="color:rgb(253,151,31);font-style:italic" class="">id</span><font color="#f8f8f2" class="">]</font><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(230,219,116)" class="">" #"</span><span style="color:rgb(249,38,114)" class="">+</span><span style="color:rgb(102,217,239)" class="">str</span><font color="#f8f8f2" class="">(chimera_id))</font></pre></pre></div><div class="">Basically what I'm doing is load the object and then change its surface.<br class=""></div><div class=""><br class=""></div><div class="">I tried running the commands through SubprocessMonitor.Popen with flag daemon = True. Shouldn't this work in the background?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Tanja</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2016-05-17 19:44 GMT+02:00 Eric Pettersen <span dir="ltr" class=""><<a href="mailto:pett@cgl.ucsf.edu" target="_blank" class="">pett@cgl.ucsf.edu</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Tanja,<div class=""><span style="white-space:pre-wrap" class="">  </span>Well, depending on you data it may still be possible to speed things up somewhat.  It’s possible that computing the initial “smart display” is slow with your structure.  You can test this out interactively by going to Favorites->Preferences, switch to the New Molecules category of Preferences, and change “smart initial display” from “true” to “false”, then open your structure.  If it’s significantly faster to open with smart display off, then let me know what calls you are making to open the structure and I’ll tell you what to change to prevent smart display from happening.</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><span class="HOEnZb"><font color="#888888" class=""><br class=""><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div class=""><span style="white-space:pre-wrap" class="">  </span>Eric Pettersen</div><div class=""><span style="white-space:pre-wrap" class="">     </span>UCSF Computer Graphics Lab</div></div>

</div></font></span><div class=""><div class="h5">
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 16, 2016, at 3:06 PM, Tanja Štular <<a href="mailto:ts6544@student.uni-lj.si" target="_blank" class="">ts6544@student.uni-lj.si</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Dear Conrad,<div class=""><br class=""></div><div class="">Thank you for fast reply. Unfortunately, I'm having the problem due to the large data. As I understand correctly for now there is no way to solve this problem? I would be happy even with just making a plugin responsive while Chimera is loading. </div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Tanja</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2016-05-16 23:53 GMT+02:00 Conrad Huang <span dir="ltr" class=""><<a href="mailto:conrad@cgl.ucsf.edu" target="_blank" class="">conrad@cgl.ucsf.edu</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Tanja.<br class="">
<br class="">
I think the answer depends on where the bottleneck lies.  If the problem is that your plugin data is large and Chimera is just slow to process the data set, then there's not a whole lot we can do to speed that up. (That's why we're working on ChimeraX.)  If, on the other hand, the issue is that the plugin takes some time to send data back, I may be able to help.  Do you have some idea of which type of problem you're encountering?  Thanks.<br class="">
<br class="">
Conrad<div class=""><div class=""><br class="">
<br class="">
On 5/16/2016 9:49 AM, Tanja Štular wrote:<br class="">
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class="">
Dear Sir or Madam,<br class="">
<br class="">
I have been developing an extension for UCSF Chimera. I'm wondering if<br class="">
there is any option for background threading for loading object to<br class="">
Chimera view? Our plugin allows loading large molecules to Chimera which<br class="">
sometimes causes freezing of Chimera and plugin for a little time. I<br class="">
know about Subprocess class<br class="">
(<a href="https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_RunSubprocess.html" rel="noreferrer" target="_blank" class="">https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_RunSubprocess.html</a>)<br class="">
but it doesn't seem to work (same goes for python threading).<br class="">
<br class="">
Thank you in advance.<br class="">
<br class="">
Best regards,<br class="">
Tanja<br class="">
<br class="">
<br class=""></div></div>
_______________________________________________<br class="">
Chimera-dev mailing list<br class="">
<a href="mailto:Chimera-dev@cgl.ucsf.edu" target="_blank" class="">Chimera-dev@cgl.ucsf.edu</a><br class="">
<a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev" rel="noreferrer" target="_blank" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br class="">
<br class="">
</blockquote>
<br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">Chimera-dev mailing list<br class=""><a href="mailto:Chimera-dev@cgl.ucsf.edu" target="_blank" class="">Chimera-dev@cgl.ucsf.edu</a><br class=""><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev" target="_blank" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div>
<span id="cid:D8DEC739-4ED2-490B-AA5A-8ACB75A81DF5@cgl.ucsf.edu"><grid-2y03.35.Y01.401.A.A_3.pdb></span><span id="cid:705AA721-CC12-47DF-AF78-188B2299986B@cgl.ucsf.edu"><grid-1all.43.CYC.175.A.A_0.pdb></span>_______________________________________________<br class="">Chimera-dev mailing list<br class=""><a href="mailto:Chimera-dev@cgl.ucsf.edu" class="">Chimera-dev@cgl.ucsf.edu</a><br class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev<br class=""></div></blockquote></div><br class=""></div></body></html>