From: Leandro Martínez (
Date: Thu May 24 2007 - 10:02:01 CDT

Dear Yinlong,
Depending on the ammount and complexity of the parameters you need
to pass to the fortran program and the data you want to get from it,
you can simply use the "exec" command of tcl and make the fortran program
get the arguments in the command line.

For example, if you want to compute the sum of two numbers, you could do:

set sum [ exec sum 2 3 ]
set sum [ string trim $sum ] #or other manipulation you may need

the fortran program would be:

program sum
real a, b, c
call getarg(1,a)
call getarg(2,b)
c = a + b
write(*,*) c

This is simple and I have used this for more sophisticated things, but
obviously it depends on the complexity of the data being transfered.

On 5/24/07, Axel Kohlmeyer <> wrote:
> dear long,
> here's the plugin sourcecode, so you get an impression
> for how you can do it 'by hand'. i'll answer in more
> detail to your mail on the mailing list.
> cheers,
> axel.
> --
> =======================================================================
> Axel Kohlmeyer
> Center for Molecular Modeling -- University of Pennsylvania
> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.