[Chimera-users] Could chimera draw shapes faster?

Eric Pettersen pett at cgl.ucsf.edu
Fri Feb 26 11:23:28 PST 2016


Another approach is to resort to a very similar Python script to avoid the callbacks that happen after each bond is made.  For me, it reduces the time from two minutes (using read on the original script) to 30 seconds (using open on the Python equivalent).  I’ve attached the Python version, and you can see that it should be trivial to change from the command version to the Python version.

—Eric

	Eric Pettersen
	UCSF Computer Graphics Lab




> On Feb 25, 2016, at 7:51 PM, Tom Goddard <goddard at sonic.net> wrote:
> 
> I see you use anisou records in the PDB to make ellipsoids to depict the bases.  No way to specify that with the xml marker file.  So maybe the CONECT records in the PDB file and Angstrom units are a better approach.  The CONECT records should also reduce the time to display to less than 1 second.
> 
> 	Tom
> 
>> On Feb 25, 2016, at 7:42 PM, Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>> wrote:
>> 
>> Hi Ferdinando,
>> 
>>   That is very cool.
>> 
>>   First thing to know is that if you oepn your “chimera.com <http://chimera.com/>” it will draw 1 frame after each of the 3800 commands in that file and the graphics limits the frame rate to 60 frames per second.  You can avoid that drawing of a frame after each command by opening the script with Chimera command “read chimera.com <http://chimera.com/>” instead of “open chimera.com <http://chimera.com/>”.  But the above limitation says it would take about 60 seconds to open and in fact it takes much longer.  It seems to take minutes even with “read”.  Maybe there is a recalculation of the molecule connectivity after each bond is made.  I never tried making thousands of bonds, one command for each bond.  There is no command to make multiple bonds at once.
>> 
>>   One thought is that you could but CONECT records in your pdb file to specify all the bonds.  These lines look like
>> 
>> CONECT  242  133                                                                
>> 
>> and specify to atom serial numbers each taking exactly 5 columns (in fixed fields as with all PDB records).  But I believe Chimera will try to make other bonds based on “atom” distances and I see your coordinates seem to be in nano-meters.  If you changed those to Angstroms (as is the common use for PDB files) then you could probably avoid any extra bonds.
>> 
>>   Another approach would be to abandon the PDB format and make a Chimera XML marker file which has a simple format described here
>> 
>> 	https://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/volumepathtracer/volumepathtracer.html#markerfiles <https://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/volumepathtracer/volumepathtracer.html#markerfiles>
>> 
>> Markers and links are really just atoms and bonds in Chimera — you can set the positions, radii, colors, and it would probably load in about 1 second.
>> 
>> 	Tom
>> 
>> 
>> 
>>> On Feb 25, 2016, at 2:11 PM, Ferdinando Randisi <ferdinando.randisi at gmail.com <mailto:ferdinando.randisi at gmail.com>> wrote:
>>> 
>>> Hi!
>>> 
>>> I'm one of the developers of oxDNA (https://dna.physics.ox.ac.uk/index.php/Main_Page <https://dna.physics.ox.ac.uk/index.php/Main_Page>), a code aimed at simulation of large DNA structures for biology and nanotechnology. 
>>> 
>>> We often use chimera because, frankly, it makes gorgeous pictures. Since we simulate DNA as made by rigid nucleotides instead of atoms, we hijack it to make it plot various shapes instead of using atoms directly, but it takes forever to get it to load a configuration like the one attached. 
>>> 
>>> Could you guys do something to make it faster/give as some advice on how to make it plot these things faster? We currently use the input files attached. (chimera.txt should be renamed chimera.com <http://chimera.com/> so that it can be understood by chimera).
>>> 
>>> 
>>> 
>>> Best,
>>> 
>>> Ferdinando
>>> 
>>> -- 
>>> Ferdinando Randisi
>>> <chimera.txt><L-DNA2016-02-25 22:02:33.png><last_conf.dat.pdb>_______________________________________________
>>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>>> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
>> 
> 
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160226/6abe21ac/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chimera.py
Type: text/x-python-script
Size: 90346 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160226/6abe21ac/attachment-0001.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160226/6abe21ac/attachment-0003.html>


More information about the Chimera-users mailing list