From: Ajasja Ljubetič (
Date: Thu Jun 26 2014 - 05:25:30 CDT

Since VMD is running TCL, the keywords are "Call C from TCL
Depending on your problem the top three or four results might be useful.
SWIG is also always an option. An example of C-TCL integration can also be
found here:
Disclamer: I have not used any of the tools my self (yet:)

Best regards,

On 26 June 2014 11:38, Rohan Mehta <> 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:*
> *Web:*