[vtkusers] vtkMolecule and vtkAtom

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu Sep 3 13:37:53 EDT 2015

On Thu, Sep 3, 2015 at 1:18 PM, Marcus D. Hanwell
<marcus.hanwell at kitware.com> wrote:
> On Thu, Sep 3, 2015 at 12:39 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> On Thu, Sep 3, 2015 at 9:36 AM, Marcus D. Hanwell
>> <marcus.hanwell at kitware.com> wrote:
>>> On Thu, Sep 3, 2015 at 11:22 AM, Favre  Jean <jfavre at cscs.ch> wrote:
>>> >
>>> > I have a C++ code building a molecule, Appending atoms, etc. No problem
>>> > there.
>>> >
>>> > Using Python, I cannot do the same. Why aren't the AppendAtom() methods
>>> > not
>>> > available to a vtkMolecule object? How should one build a molecule with
>>> > vtkpython?
>>> I don't think they are wrapped due to limitations in the Python
>>> wrapping, and the pattern we wanted to use for scalable storage of
>>> molecular data. I think we could get them wrapped, or add some simpler
>>> API for the Python/wrapped languages.
>>> I don't think this is something we tested, or looked at very deeply.
>>> Much of the code was developed in quite a short period as part of a
>>> Google Summer of Code project, it would be nice to extend it to better
>>> support Python.
>> Marcus, don't be so pessimistic about the Python wrappers.  Jean, just tell
>> cmake to wrap vtkAtom, and the AppendAtom method should work just fine.
>> Change the following lines in Common/DataModel/CMakeLists.txt:
> I did mean to say things may well have improved since this was
> contributed, but we haven't revisited it in quite a while. I know the
> vtkTuple/vtkVector style classes added many similar features.
>>   set_source_files_properties(
>>     ...
>>     vtkAtom.h
>>     )
>> The problem is that WRAP_EXCLUDE includes all of the classes that Java
>> and Tcl cannot wrap, and as a result, many classes are excluded from the
>> Python wrapping even though Python is perfectly capable of using them.
>> I should do a sweep through the cmake files to make the wrapping more
>> inclusive.
> That is great, the growing disparity between wrapped languages may be
> an issue, but I am glad to hear things have improved so much in the
> Python wrappers.
> Thanks for the pointers David - can we convert to Doxygen markup in
> our headers and use typed enums yet ;-)
Oh, and Python 3 which sounds like it is most of the way there now!
Can't wait to play with this as I seem to hit more and more projects
that have moved forward and simply couldn't use VTK until it did too.

Awesome to see so many improvements, I will try to take a look at
vtkMolecule and friends to improve their exposure to our Python


More information about the vtkusers mailing list