[Chimera-users] Automatic struts for 3D printing?

Tom Goddard goddard at sonic.net
Wed Aug 21 14:06:29 PDT 2013


Hi Darrell,

  I added a "struts" command to Chimera -- in tonight's daily builds.  I've attached your picture of hemagglutinin with struts and a similar picture made with the new struts command and also a picture of a tRNA (4tna) with a small number of struts made in Chimera.




The Chimera command for the hemagglutinin model struts is

	struts @CA length 7 loop 30

I decided to try a different algorithm in Chimera for adding struts from the one in the Jmol code.  The Chimera struts command uses two parameters.  It finds all pairs of C-alpha atoms within a distance of 7 Angstroms of each other.  Then it considers those from shortest to longest distances.  It adds a strut if the two atoms the strut would join are more than 30 Angstroms away via bonded connections.  Basically it adds struts up to a given maximum length so that C-alphas are connected via bonds and struts by no more than a maximum loop length.  The maximum strut length (7 Angstroms) and maximum loop length (30 Angstroms) are the two parameters.  For the tRNA model I used 15 and 80 and use P atoms instead of CA atoms (command "struts @P length 15 loop 80").

  Here's roughly what the Jmol code does, that I decided not to copy

      1) make struts short (less than 7 Angstroms),
      2) make struts join residues at least 6 residues apart in polymer,
      3) space out struts, ends of different struts no closer than 6 residues,
      4) include as many struts as possible meeting spacing and length constraints,
      5) put a strut within 3 residues of the end of each polymer.

The exact details of how it does this would take a long explanation -- which is my main reason for not copying it.  The algorithm of the Chimera struts command is easily and precisely described above and produced reasonable struts for the half dozen test cases I tried.  But it may prove not as good as the Jmol approach -- experience will tell -- and I can change it if needed.

  Here is and example using all available strut command options

     struts @CA length 7 loop 30 radius 0.75 color blue name struts_7_30 fat true model #5

Any set of atoms can be specified as strut end points, radius is the strut cylinder radius, color is the strut color, name is the name of the pseudo-bond model created for the struts (struts can be hidden using Model Panel), fattenRibbon sets a fatter ribbon style better for printing (can adjust as desired with Ribbon Style Editor, menu Tools / Depiction), modelId is the model number you want for the strut pseudobonds.  Struts can span multiple models, or be restricted to just a part (e.g. one chain) of a model.  The command will get documented in the Chimera User's Guide.

	Tom



On Aug 16, 2013, at 7:02 PM, "Hurt, Darrell (NIH/NIAID) [E]" wrote:

> Hi Tom,
> 
> Thanks. This is some of our best stuff. For our material, the struts are
> vitally important or the whole thing crumbles. We use so many struts that
> a script is really important to doing this efficiently. I have no idea how
> it will work in a monochrome plastic printer. However, there are some
> plastic printers emerging on the market now that can print in two colors
> plus a support material. That might help with distinguishing between
> structure and strut. One idea is to print both the struts and the building
> supports in the same material and then dissolving all that, leaving just
> the protein.
> 
> You're right about the struts being too short. They would be pointless
> along a helix. So I think there is a hard-coded minimum strut distance to
> prevent struts within the helix, but a user-settable parameter for the
> maximum strut distance. This is especially important in protein complexes.
> 
> The pink and baby blue blobs are glycosylation on the surface of the
> proteins. These are modeled in using the glycoprotein builder:
> http://glycam.ccrc.uga.edu/ccrc/gp/index.jsp?tool=crystallography&option=ff
> 99:glycam06
> 
> If you think this is cool, you've got to check out what Kawakami Masaru is
> doing with 3D printed molecules:
> http://www.youtube.com/watch?v=NVtE_AS3jbI
> http://dx.doi.org/10.1063/1.4739961
> 
> Thanks!
> Darrell
> 
> 
> -- 
> Darrell Hurt, Ph.D.
> Section Head, Computational Biology
> Bioinformatics and Computational Biosciences Branch (BCBB)
> OCICB/OSMO/OD/NIAID/NIH
> 
> 31 Center Drive, Room 3B62B, MSC 2135
> Bethesda, MD 20892-2135
> Office: 301-402-0095
> Mobile: 301-758-3559Web: 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.
> 
> 
> 
> 
> 
> 
> On 8/16/13 8:46 PM, "Tom Goddard" <goddard at sonic.net> wrote:
> 
>> Hi Darrell,
>> 
>> Your plastic models are super cool.  I'm jealous -- we don't have a
>> color printer.  I had no idea you were adding so many struts.  I'm afraid
>> it would look less attractive in one color.  I see that some models are
>> ribbon only and some have the residues depicted as surface blobs -- none
>> of your pictured models used spheres and cylinders for atoms and bonds.
>> That helps avoid confusing the struts for molecular bonds.  I'm a puzzled
>> by your dozens of pink blobs in image 3 and 7 and cyan blobs in image 9
>> in each case connected by lots of sticks.  They look like individual
>> residues but are too far apart to be a polypeptide I think -- maybe many
>> copies of a small ligand?
>> 
>> The algorithm for placing struts sounds quite simple.  Chimera has
>> ribbon splines that go exactly through the C-alphas, and can also join
>> side chains to a ribbon even when the C-alpha is not on the ribbon.  So I
>> think that won't be a problem.  The Jmol strut code I looked at looked
>> more complex than what you describe.  If it simply chose short distance
>> struts wouldn't you get a bunch of unneeded struts say within one alpha
>> helix, and maybe lack some long range struts that are needed to hold
>> everything together?
>> 
>> In any case, if we come up with an algorithm, or just want to copy the
>> Jmol code, it looks very easy to add to Chimera.  I can probably do an
>> implementation in half a day.  The main thing is to figure out exactly
>> what the algorithm should do.  Maybe I can put something in next week.
>> 
>> 	Tom
>> 
>> 
>> 
>> On Aug 16, 2013, at 5:16 PM, "Hurt, Darrell (NIH/NIAID) [E]" wrote:
>> 
>>> Hi Tom,
>>> 
>>> I've been printing ribbon/cartoon and surface representations of
>>> proteins
>>> and nucleic acids for many years using a Z Corp machine. I've also done
>>> some "ball-and-stick" and "VDW-sphere" kinds of prints. Often we print
>>> substrates in "stick" mode and connect the sticks to the ribbon using
>>> manually-placed struts. We will continue to use our Z Printer, but we
>>> are
>>> also buying a "desktop" 3D printer that more people can afford. It is an
>>> "FDM" printer similar to the uPrinter your webpages describe.
>>> 
>>> The algorithm used by the George Phillips script is a little different
>>> (and perhaps simpler) than the one you describe. It has two parameters:
>>> (1) the maximum length of a strut and (2) the minimum closeness of any
>>> two
>>> struts. The second parameter is a little funky; I'll describe it below.
>>> The script first identifies all pairs of C-alphas (or pairs of initial
>>> phosphates on the backbone for nucleic acids). Then it creates
>>> "pseudobonds" (the struts) between all of those pairs which conform to
>>> the
>>> maximum length parameter. The next step is to cull the list of
>>> pseudobonds
>>> according to the minimum distance parameter so that you don't get struts
>>> everywhere. Here's where it gets kind of funky because I don't know how
>>> this distance is calculated. Either it is calculated from the starting
>>> end
>>> of a pseudobond (which is what I expect from what I can see of the
>>> results
>>> of the script) or it does it from center/centroid of the pseudobond.
>>> 
>>> The script also adjusts some parameters to thicken the ribbons, sticks,
>>> etc. and increase the triangle count of the exported mesh.
>>> 
>>> This usually works great, but there is one little problem because the
>>> struts are calculated to put the ends of the struts at the C-alpha
>>> positions. For helices, this usually isn't a problem because the helix
>>> ribbon/cartoon goes through the C-alpha position. But for strands which
>>> are drawn on a spline of the C-alphas, the struts sometimes either go
>>> through or do not reach the ribbon, making the struts useless. Using
>>> some
>>> standard tools in PyMOL, I force the ribbon to go through the C-alpha
>>> positions everywhere there is a strut terminus. In this way, the ribbon
>>> and the ends of the struts correspond and the print is strengthened
>>> without sacrificing the aesthetics of the splined ribbon.
>>> 
>>> I've attached the results of this script for both the mesh and the
>>> actual
>>> print (the "ribbon.jpg" and "ribbon.png" images). Of course, printing in
>>> monochrome plastic will be different, but that's what we're hoping to
>>> experiment with. I've also attached a few other pictures of our prints.
>>> 
>>> George and I have discussed sharing his script with a wider audience or
>>> even publishing some kind of technical note about it. He seems willing
>>> to
>>> share it with certain limitations. Maybe we can all write something
>>> together if we build it into Chimera. We might be able to do it
>>> internally, but I would have to get my developers more familiar with the
>>> internals of Chimera first. I welcome any efforts you or others might
>>> make.
>>> 
>>> Thanks,
>>> Darrell
>>> 
>>> 
>>> -- 
>>> Darrell Hurt, Ph.D.
>>> Section Head, Computational Biology
>>> Bioinformatics and Computational Biosciences Branch (BCBB)
>>> OCICB/OSMO/OD/NIAID/NIH
>>> 
>>> 31 Center Drive, Room 3B62B, MSC 2135
>>> Bethesda, MD 20892-2135
>>> Office: 301-402-0095
>>> Mobile: 301-758-3559Web: BCBB Home Page
>>> 
>>> <http://www.niaid.nih.gov/about/organization/odoffices/omo/ocicb/Pages/bc
>>> bb
>>> .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.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 8/16/13 6:14 PM, "Tom Goddard"  wrote:
>>> 
>>>> Hi Darrell,
>>>> 
>>>> Here are some of the molecule models we have printed in plastic.
>>>> 
>>>> 	http://www.cgl.ucsf.edu/Outreach/technotes/ModelGallery/index.html
>>>> 
>>>> and a description of the printer we used
>>>> 
>>>> 	http://www.cgl.ucsf.edu/Outreach/technotes/uprint.html
>>>> 
>>>> Chimera does not currently have any tool to automatically add struts,
>>>> although I've done this by hand in Chimera.  For instance the heptatis
>>>> B
>>>> virus pentamer on the above web page had part of an icosahedral cage
>>>> made
>>>> from cylinders underneath it to hold the proteins on the virus surface
>>>> together.
>>>> 
>>>> One thing you'll see is that all our printed molecules came from
>>>> surface depictions in Chimera (made with molmap command).  I'm not sure
>>>> if we successfully printed and ball and stick models via STL or VRML.
>>>> We
>>>> tried years ago and I recall them falling apart because where the
>>>> spheres
>>>> and cylinders intersected it put no plastic.  Basically an atom sphere
>>>> and bond cylinder are two surfaces and for points inside two surfaces
>>>> (or
>>>> any even number of surfaces I think) the printer places no plastic.  So
>>>> overlapped cylinders and spheres didn't hold together.  This seems to
>>>> be
>>>> a printer driver issue -- how it takes a surface and makes a solid out
>>>> of
>>>> it.  I don't know that we've tried with our newer printers at UCSF --
>>>> maybe it works now.
>>>> 
>>>> Have you successfully printed ball and stick models exported from
>>>> Chimera?  What kind of printer?
>>>> 
>>>> Now about automatically adding struts -- probably would not be hard.
>>>> The struts code I saw online
>>>> 
>>>> 
>>>> 	http://idp1.force.cs.is.nagoya-u.ac.jp/jmol/src/org/jmol/modelsetbio/Al
>>>> ph
>>>> aPolymer.java
>>>> 
>>>> didn't have a clear description of the algorithm the use, but it would
>>>> just take an hour to study it.  I could see aiming to add struts that
>>>> 1)
>>>> are cylinders between atoms, 2) are short, 3) make the whole model one
>>>> connected piece, 4) make every contiguous N (50) residues connected in
>>>> at
>>>> least 3 places (2 probably being continuations before and after and one
>>>> being a crossbridge) to other residues for rigidity, 5) not put
>>>> connections at the ends where they would be easily confused for real
>>>> biological connections, 6) struts should not look like real bonds --
>>>> maybe make them fatter or better square cross-section.  Actually that
>>>> rigidity constraint is more complex -- probably don't want to have two
>>>> large pieces connected to each other through only one bond.
>>>> 
>>>> I recall printing some ribbon models in ABS plastic with ribbon
>>>> cross-section pretty small -- half a centimeter.  With 100 residues and
>>>> no cross bridges the model is very flexible and easy to break.
>>>> 
>>>> Could you provide a picture of a ball and stick model with struts to
>>>> give a better idea of what you are shooting for?
>>>> 
>>>> 	Tom
>>>> 
>>>> 
>>>> On Aug 16, 2013, at 2:32 PM, "Hurt, Darrell (NIH/NIAID) [E]" wrote:
>>>> 
>>>>> Hi everyone,
>>>>> 
>>>>> We are assembling an open data portal or "exchange" for producing
>>>>> "ready-to-3D-print" files for biological molecules, EM data, and other
>>>>> imaging data using some automated pipelines. A little bit more on our
>>>>> project can be found here:
>>>>> http://www.hhs.gov/open/initiatives/ignite/3d-printing-exchange.html
>>>>> 
>>>>> A few years ago this came up on the "dev" discussion board:
>>>>> http://www.cgl.ucsf.edu/pipermail/chimera-dev/2011/000800.html
>>>>> 
>>>>> In the email thread above, it mentions a script by George Phillips
>>>>> called "struts.py" that was modified for use in RasMol. I am familiar
>>>>> with his version of this script for PyMOL. It works very well and I
>>>>> have
>>>>> been using it for years. However, the VRML from PyMOL is sometimes
>>>>> buggy. I like the exports from Chimera much better, including the
>>>>> X3D2VRML and X3D2STL utilities. If I could get the same functionality
>>>>> of
>>>>> this "struts" script in Chimera, that would be one less thing I need
>>>>> to
>>>>> go to PyMOL for (the list is getting shorter and shorter!).
>>>>> 
>>>>> We're looking at doing it here, but I would welcome any contribution
>>>>> from the Chimera community if something already exists. Do you have
>>>>> anything? Is this script something of interest? Anyone interested in
>>>>> contributing to our "exchange" database/web portal? I would love any
>>>>> feedback you might have.
>>>>> 
>>>>> Thanks,
>>>>> Darrell
>>>>> 
>>>>> --
>>>>> Darrell Hurt, Ph.D.
>>>>> Section Head, Computational Biology
>>>>> Bioinformatics and Computational Biosciences Branch (BCBB)
>>>>> OCICB/OSMO/OD/NIAID/NIH
>>>>> 
>>>>> 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/Pa
>>>>> ge
>>>>> s/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.
>>>>> 
>>>>> _______________________________________________
>>>>> Chimera-users mailing list
>>>>> Chimera-users at cgl.ucsf.edu
>>>>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>>>>> 
>>>> 
>>> 
>>> 
>>> <ribbon.png><ribbon.jpg><3D-print-4317.jpg><3D-print-4075.jpg><3D-print-4
>>> 119.jpg><3D-print-4169.jpg><3D-print-4275.jpg><3D-print-4145.jpg><3D-prin
>>> t-4347.jpg>_______________________________________________
>>> Chimera-users mailing list
>>> Chimera-users at cgl.ucsf.edu
>>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>> 
> 
> 
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> 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/20130821/94e34924/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: darrell_hemagglutinin.jpg
Type: image/jpg
Size: 42380 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130821/94e34924/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chimera_hemagglutinin.jpg
Type: image/jpg
Size: 48232 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130821/94e34924/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4tna_15_80_model.jpg
Type: image/jpg
Size: 10293 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130821/94e34924/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4tna_15_80_print.jpg
Type: image/jpg
Size: 32793 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130821/94e34924/attachment-0003.jpg>


More information about the Chimera-users mailing list