[Chimera-users] STL Resolution Issues

Hurt, Darrell (NIH/NIAID) [E] darrellh at niaid.nih.gov
Thu Jun 19 11:46:52 PDT 2014

Hi Eric,

You may also be able to take advantage of the new NIH resource, the 3D Print Exchange, where you can upload your PDB file and our scripts will run Chimera and several other post-processing programs to produce files suitable for 3D printing.



Darrell Hurt, Ph.D.
Section Head, Computational Biology
Bioinformatics and Computational Biosciences Branch (BCBB)

31 Center Drive, Room 3B62B, MSC 2135
Bethesda, MD 20892-2135
Office: 301-402-0095
Mobile: 301-758-3559
Web: BCBB Home Page<http://www.niaid.nih.gov/about/organization/odoffices/omo/ocicb/Pages/bcbb.aspx#niaid_inlineNav_Anchor>
Twitter: @niaidbioit<https://twitter.com/niaidbioit>

Disclaimer: The information in this e-mail and any of its attachments is confidential and may contain sensitive information. It should not be used by anyone who is not the original intended recipient. If you have received this e-mail in error please inform the sender and delete it from your mailbox or any other storage devices. National Institute of Allergy and Infectious Diseases shall not accept liability for any statements made that are sender's own and not expressly made on behalf of the NIAID by one of its representatives.

From: Tom Goddard <goddard at sonic.net<mailto:goddard at sonic.net>>
Date: Thursday, June 19, 2014 1:37 PM
To: Eric Bell <ebell at oberlin.edu<mailto:ebell at oberlin.edu>>
Cc: "chimera-users at cgl.ucsf.edu<mailto:chimera-users at cgl.ucsf.edu>" <chimera-users at cgl.ucsf.edu<mailto:chimera-users at cgl.ucsf.edu>>
Subject: Re: [Chimera-users] STL Resolution Issues

Hi Eric,

  I see what you mean.  I tried exporting 100,000 atoms as spheres (PDB 1jj2) and the STL file was larger than 100 Gbytes, or more than 1 Mbyte per sphere!  Ouch.  Each triangle takes 48 bytes in an STL file so that comes to 20,000 triangles per sphere.  Looking at the Chimera code I see that the trouble is that the Export Scene function does not use the subdivision shown on the screen for spheres.  Instead it exports to X3D format an exact description of a sphere (center and radius).  Then the x3d2stl conversion program is run by Chimera and it uses a fixed subdivision of each sphere which has an absurdly high resolution of ~11,000 vertices or 22,000 triangles per sphere for a 1.5 Angstrom radius sphere (also the subdivision is proportional to sphere radius squared, so it will give huge numbers of triangles if you make a sphere of radius 10, although it is capped at ~128,000 triangles per sphere).  Unfortunately Chimera does not have a way to say to use lower resolution for spheres when exporting the scene.  But there is a way to do it because the x3d2stl program that comes with Chimera has a resolution option.  So the trick will be to use Export Scene to write an x3d format file.  Then run x3d2stl by hand from a terminal “x3d2stl -r 0.1 -o file.stl < file.x3d”.  The default resolution is 100 and the number of sphere triangles scales linearly with the resolution value.  The minimum number of sphere triangles is 12.  I tried this for 1jj2, the x3d file sizes was just 15 Mbytes.

/Applications/Chimera.app/Contents/Resources/bin/x3d2stl -o 1jj2.stl -r 0.01 < 1jj2.x3d

and the STL file came out to 59 Mbytes which agrees with 12 triangles per sphere taking about 500 bytes per sphere.  I’ve attached a close-up of what 12 triangle spheres looked like when I opened the 1jj2.stl file in Chimera.  The path to x3d2stl I used was on a Mac.  On Linux or Windows the program would be in chimera/bin.

  I’ll file a Chimera bug report to have the absurdly high subdivision fixed.


[cid:BAF7E673-7D77-4ABB-AAAF-787E685CB556 at cgl.ucsf.edu]

On Jun 18, 2014, at 6:09 PM, Eric Bell wrote:


I am trying to change the resolution of the atoms for a large molecule packing, but no matter how I change the zoom or the subdivisions property in the viewing effects, it seems to always produce the same filesize (~900 MB, not something our software can handle).  Is this a bug or is it something that I'm doing incorrectly?  I'm running on a mac, and I have tested this both with a .mol2 and .pdb file.

Chimera-users mailing list
Chimera-users at cgl.ucsf.edu<mailto:Chimera-users at cgl.ucsf.edu>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1jj2stl.jpg
Type: image/jpg
Size: 74634 bytes
Desc: 1jj2stl.jpg
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20140619/5046213d/attachment.jpg>

More information about the Chimera-users mailing list