From: Shailesh Pandey (shaileshp51_at_gmail.com)
Date: Thu Jun 26 2014 - 05:59:44 CDT

Dear Rohan,
Yes, It is possible, you will have to make your c program a library, main()
function is to be removed and then you can interface it with TCL using
SWIG, please look into swig tutorial
here: http://www.swig.org/tutorial.html

If abstract (including core functions, and how they are used in program)
layout of C program would have been provided, little more detailing could
have been possible.

Good luck.

On Thu, Jun 26, 2014 at 3:08 PM, Rohan Mehta <rohanrulz93_at_gmail.com> wrote:

> Hello everyone!
>
> I have made a C-code to count number of trimers, tetramers,..., *n*-mers
> etc. for a water-system. I have considered dimers as building blocks for
> any such *n*-mer. My program of getting dimer-pairs is written in Tcl.
> However, the program to count *n*-mers is written in C (mainly because it
> involves use of Graph Theory). Therefore I am not able to make a Tcl script
> that can be used in VMD.
>
> Is there any way we can bridge/patch C programs with Tcl shell of VMD? In
> other words, is there any way we can run the C program for VMD?
>
> Thanks in advance.
>
> Sincerely,
> Rohan Mehta.
> --
> 3rd Year Undergraduate Student
> Integrated M.Sc.(Hons.) Physics + B.E.(Hons.) Electrical and Electronics
> Engineering
> Birla Institute of Technology and Science (BITS) - Pilani, Pilani Campus
> *Phone:* +91 8058437073
> *E-Mail:* rohanrulz93_at_gmail.com
> *Web:* https://sites.google.com/site/mehtarohank/
>