[gmx-developers] send atomic coordinates to fortran

Brad Dickson adynata at gmail.com
Thu Jun 21 23:10:03 CEST 2012


Hello, I'm not a C/C++ programmer and I have question that I'm sure has
been asked before. So sorry.

I would like to pass the atomic coordinates and forces to a fortran routine
and then pass the coordinates and forces back after computing something and
modifying forces. (Yes, during dynamics.) I have added a fortran routine
that works, I can pass some things, like the step number, to it and it
seems ok. I cannot figure out how to handle state_global->x and the force
vector.

How should "x" be passed to fortran?

I am using something like:
fortranfunc_(&step , $state->x );

but I'm not sure about this since the contents of "x" on the fortran side
seem odd.

I have tried to dig this from old posts and general C/C++ tutorials but
I've hit a wall.

thanks for any advice,
brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20120621/1229b12f/attachment.html>


More information about the gromacs.org_gmx-developers mailing list