[chimera-dev] Chimera extension threads

Eric Pettersen pett at cgl.ucsf.edu
Wed May 18 10:48:43 PDT 2016


Ah, I see, these aren’t actually molecules — they’re grids.  Therefore Chimera wastes a lot of time looking for bonds that aren’t actually relevant.  I assume you have control over how these files are created.  What you should do is put the grid points in HETATM records instead of ATOM records, and each in its own residue.  This will prevent Chimera from looking for any bonds.  The way you have it set up now, Chimera is looking at each atom pair to see if it’s within bonding distance.  With the setup I propose, there are no other atoms within the residue to look at for possible bonds, and the use of HETATM records prevents the creation of bonds between consecutive residues.

I’ve attached a version of your first file with these changes.  You can see it opens quickly.  You can’t put a surface on it, but you can change the atoms to “sphere” mode (Actions->Atoms/Bonds->sphere) to get a space-filling depiction.

—Eric



> On May 18, 2016, at 7:19 AM, Tanja Štular <ts6544 at student.uni-lj.si> wrote:
> 
> Hi all,
> 
> Here is some information regarding the questions:
> 
> 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. 
> 
> 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?
> 
> Here the command that I use to load and change the structure:
> 
> chimera.openModels.open(data/grid-"+name+".pdb", identifyAs="bsite-"+str(id))
> chimera_id = [objekt.id <http://objekt.id/> for objekt in chimera.openModels.list() if objekt.name <http://objekt.name/> == 'bsite-'+str(id)][0]
> chimera.runCommand("~show #"+str(chimera_id))
> chimera.runCommand("vdw #"+str(chimera_id))
> chimera.runCommand("color "+colors[id]+" #"+str(chimera_id))
> Basically what I'm doing is load the object and then change its surface.
> 
> I tried running the commands through SubprocessMonitor.Popen with flag daemon = True. Shouldn't this work in the background?
> 
> Thanks,
> 
> Tanja
> 
> 
> 2016-05-17 19:44 GMT+02:00 Eric Pettersen <pett at cgl.ucsf.edu <mailto:pett at cgl.ucsf.edu>>:
> Hi Tanja,
> 	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.
> 
> —Eric
> 
> 	Eric Pettersen
> 	UCSF Computer Graphics Lab
> 
>> On May 16, 2016, at 3:06 PM, Tanja Štular <ts6544 at student.uni-lj.si <mailto:ts6544 at student.uni-lj.si>> wrote:
>> 
>> Dear Conrad,
>> 
>> 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. 
>> 
>> Regards,
>> Tanja
>> 
>> 2016-05-16 23:53 GMT+02:00 Conrad Huang <conrad at cgl.ucsf.edu <mailto:conrad at cgl.ucsf.edu>>:
>> Hi, Tanja.
>> 
>> 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.
>> 
>> Conrad
>> 
>> 
>> On 5/16/2016 9:49 AM, Tanja Štular wrote:
>> Dear Sir or Madam,
>> 
>> I have been developing an extension for UCSF Chimera. I'm wondering if
>> there is any option for background threading for loading object to
>> Chimera view? Our plugin allows loading large molecules to Chimera which
>> sometimes causes freezing of Chimera and plugin for a little time. I
>> know about Subprocess class
>> (https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_RunSubprocess.html <https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_RunSubprocess.html>)
>> but it doesn't seem to work (same goes for python threading).
>> 
>> Thank you in advance.
>> 
>> Best regards,
>> Tanja
>> 
>> 
>> _______________________________________________
>> Chimera-dev mailing list
>> Chimera-dev at cgl.ucsf.edu <mailto:Chimera-dev at cgl.ucsf.edu>
>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev <http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev>
>> 
>> 
>> 
>> _______________________________________________
>> Chimera-dev mailing list
>> Chimera-dev at cgl.ucsf.edu <mailto:Chimera-dev at cgl.ucsf.edu>
>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev <http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev>
> 
> 
> <grid-2y03.35.Y01.401.A.A_3.pdb><grid-1all.43.CYC.175.A.A_0.pdb>_______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20160518/91556c88/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: residues.pdb
Type: application/octet-stream
Size: 517375 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20160518/91556c88/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20160518/91556c88/attachment-0001.html>


More information about the Chimera-dev mailing list