[chimera-dev] Extension to export VTK format files

Tom Goddard goddard at sonic.net
Tue Aug 6 12:32:58 PDT 2013


Hi Shawn,

  Ok, I tried again displaying the Chimera exported VTK in Paraview.  This time it worked.  I did not see an Apply button anywhere.  I just used File / Open….  I'm not sure why it worked this time but not in my previous attempt.  I am using Paraview 4.0.1 while you are using 3.98.1 in your screen snapshot.  So maybe I do not have the Apply button.  At any rate, I see it actually works now and will put it into tonight's daily builds.

	Tom


On Aug 6, 2013, at 12:19 PM, Shawn Waldon <swaldon at cs.unc.edu> wrote:

> Hi Tom,
> 
> Here is a picture of what I get when I follow your directions and open the file with Paraview.  Did you hit apply on the left after open created the data source?  Paraview is a little funny about opening things, it allows you to set up parameters on the reader (not relevant for .vtk files) before actually reading the data.  You have to click the apply button on the left before the data is actually read in.  The other thing I changed was the Color by dropdown on the left to color by the position along the protein chain with a red-to-blue color map (essentially the equivalent of chimera's rainbow command, but with Paraview's default color map).  This is impossible with VTK's PDB file reader which throws away all information about the atoms and just keeps the points and lines for the bonds connecting them.
> 
> Shawn 
> 
> 
> On Fri, Jul 26, 2013 at 8:06 PM, Tom Goddard <goddard at sonic.net> wrote:
> Hi Shawn,
> 
>   I opened PDB 1idi, used your code to export it to VTK, and opened it in Paraview 4.0.1 on a Mac.  Couldn't get it to show anything.  I don't know Paraview and that is probably the issue.  Could you tell me something I could do with this Chimera VTK export?  I'd like to have an idea of what it is good for before putting it into Chimera.
> 
> 	Tom
> 
> 
> On Jul 26, 2013, at 11:45 AM, Shawn Waldon  wrote:
> 
>> Hi Tom,
>> 
>> Here is the export code (and the ChimeraExtension.py file).  Let me know if there is anything that needs fixing.
>> 
>> Shawn
>> 
>> 
>> On Fri, Jul 26, 2013 at 1:15 PM, Tom Goddard <goddard at sonic.net> wrote:
>> Hi Shawn,
>> 
>>   The SketchBio project looks cool.  We are trying to make it easy to build hypothetical models of hiv, muscle sarcomeres, fibronectin and all manner of large molecular machinery in Chimera.  It is a difficult user interface problem.  Graham Johnson, Sam Hertig and I are trying to move this project along.  We are happy to help your efforts on this problem.
>> 
>>   Can you send us your Chimera VTK export code and I'll take a look.  We don't have a list of coding conventions.  I don't really care how you indent your lines, or capitalize your variable names.  Mostly I want the user to know when an error occurs what the nature of the problem is (e.g. export can't handle surfaces) without having to ask us.
>> 
>> 	Tom
>> 
>> 
>> 
>> On Jul 25, 2013, at 1:32 PM, Shawn Waldon wrote:
>> 
>>> Hi Tom,
>>> 
>>> I don't know exactly how high quality it is.  I haven't found any bugs in my latest version, but that doesn't mean they aren't there.  I am fairly new to python, so there may be some subtleties that I missed.  Also, do you have coding conventions listed somewhere?  I have looked, but I haven't found an official list or anything.  I am willing to fix it up a bit before submitting it if you can point me to a list of things to fix up.
>>> 
>>> My use case is that I am writing a higher level modeling tool that uses VTK to do its graphics.  I have been calling Chimera as a subprocess to get a surface to render (and now other data).  See the project website for more details: http://www.sketchbio.org
>>> 
>>> Shawn
>>> 
>>> 
>>> On Tue, Jul 16, 2013 at 10:49 PM, Tom Goddard <goddard at sonic.net> wrote:
>>> Hi Shawn,
>>> 
>>>   That is interesting.  We could put it in Chimera if the code is solid.  The error reports will come to us so we need high quality code so we have time to do more than reply to bug reports.
>>> 
>>>   What use of molecules in VTK motivated you to write this export code?
>>> 
>>>     Tom
>>> 
>>> 
>>> On Jul 16, 2013, at 11:30 AM, Shawn Waldon wrote:
>>> 
>>>> Hello all,
>>>> 
>>>> As part of a project that I am working on, I recently wrote an extension for Chimera that exports the scene as a .vtk file which can be read into the Visualization Toolkit or Paraview.  It exports atoms (points), bonds (lines) and surfaces along with other data associated with them such as the atom and residue names, residue number, position along its chain, b-factor, occupancy, etc. in a format that can be used in VTK-based applications with the default file readers.  I think this could be a good thing to add to Chimera itself, so I was wondering if you would like to have the code for the extension to add to Chimera itself.
>>>> 
>>>> I look forward to hearing from you,
>>>> -- 
>>>> Shawn Waldon
>>>> Graduate Research Assistant
>>>> Department of Computer Science
>>>> University of North Carolina at Chapel Hill
>>>> swaldon at cs.unc.edu
>>>> _______________________________________________
>>>> Chimera-dev mailing list
>>>> Chimera-dev at cgl.ucsf.edu
>>>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>>> 
>>> 
>>> 
>>> -- 
>>> Shawn Waldon
>>> Graduate Research Assistant
>>> Department of Computer Science
>>> University of North Carolina at Chapel Hill
>>> swaldon at cs.unc.edu
>> 
>> 
>> 
>> 
>> -- 
>> Shawn Waldon
>> Graduate Research Assistant
>> Department of Computer Science
>> University of North Carolina at Chapel Hill
>> swaldon at cs.unc.edu
>> <ExportVTK.zip>
> 
> 
> 
> 
> -- 
> Shawn Waldon
> Graduate Research Assistant
> Department of Computer Science
> University of North Carolina at Chapel Hill
> swaldon at cs.unc.edu
> <Screen Shot 2013-08-06 at 3.19.09 PM.png>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20130806/d9e87a0e/attachment.html>


More information about the Chimera-dev mailing list