VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Jul 26 2007 - 16:40:47 CDT
- Next message: John Stone: "Re: Antw: Re: CAVE & Vmd"
- Previous message: AustinSmall_at_comcast.net: "(no subject)"
- In reply to: karan uppal: "python and C++ extensions"
- Next in thread: Jim Phillips: "Re: python and C++ extensions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
Whether to implement your plugin in C++ mixed with Python or Tcl, or
to implement it purely in one of the scripting languages depends greatly
on how performance intensive the algorithms are. Since we're still
working on making the Python side of VMD a more OS and
distribution-independent, it's probably easier to make a plugin with
Tcl that will run everywhere at the present moment. That said, you
should be able to use SWIG to build a Tcl and/or Python interface for
anything you've got. This is how psfgen and other plugins are implemented.
Generally speaking, I suggest people implement plugins with pure scripting
as it frees them from having to worry about making their C/C++ code portable
to every platform, particularly for people that aren't familiar with the
unique challenges of Windows, Unix, and Mac. That said, you can do it
any of these ways and get a workable result. Maybe you can tell us more
about what the input/output of your C++ code is and we can give further
suggestions. The plugin programmer's guide is the most extensive
tutorial, but as you've seen it primarily covers plugins and extensions
written in the scripting languages and doesn't go into any great detail
about more sophisticated methods involving compilation of shared libraries
and dynamic loading etc.
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Thu, Jul 26, 2007 at 09:19:06AM -0700, karan uppal wrote:
> Hi,
>
> I have a program in C++ which predicts the interaction amongst the protein
> chains. Now, i want to use VMD to display the structure of the protein
> (which i know) and color & draw the interacting and non-interacting
> interfaces differently using the ouput of my C++ program.
>
> I have two problems now:
>
> 1) What is the most efficient way to wrap my C++ code with VMD ? Shall i
> wrap C++ with Python first and then create a plugin for VMD, or should i
> create a plugin only using C++ ?
>
> 2) Are there any examples on how to do this ? I read the "VMD Plugin
> Programmer's Guide" , but i was wondering if there are any other extensive
> tutorials.
>
> Thanks
> -Karan
>
> _________________________________________________________________
> http://liveearth.msn.com
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: John Stone: "Re: Antw: Re: CAVE & Vmd"
- Previous message: AustinSmall_at_comcast.net: "(no subject)"
- In reply to: karan uppal: "python and C++ extensions"
- Next in thread: Jim Phillips: "Re: python and C++ extensions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]