[gmx-developers] interface for externally calculated forces

Rene Staritzbichler rene.staritzbichler at biophys.mpg.de
Tue May 31 16:37:34 CEST 2011


Dear Anton, Gerrit, David, all other developers,

Thanks for your replies!

Being a newbie to this list and also to coding in Gromacs, I am wondering how to proceed from here?

It seems that everybody who replied agreed that the interface would be great to include into the main releases.
David suggested to have this interface replace the existing QM/MM interface.
The setup Anton suggested of a callback to a python script sounds like a good way to do it.

Is that now part of the agenda?
Is there anything else I can do?
Are there other people to contact?

Best wishes and thanks for your work!

Rene






On 05/04/2011 05:19 PM, Anton Feenstra wrote:
> On 04/05/11 17:09, Rene Staritzbichler wrote:
>> Anton,
>>
>>
>> Wouldn't that make the interplay of Gromacs and the external program a
>> bit more tricky?
>>
>>
>> For the interface to be as general as possible, the external program
>> would need to read from a file, do its calculations and write to a file.
>>
>>
>> A callback is usually something like passing a function as a pointer to
>> another function.
>> But I saw that only within one program so far.
>> Can one use that for the coordination of two separate programs?
>
> That of course depends on what interface(s) the other program allows. 
> If you can call it as a library function, that would allow passing a 
> pointer to a function. But I think making a callback to something like 
> the python wrapper, and then handling any calling is a good design.
>
> Using the callback, you could still implement it using file IO etc and 
> starting the other program, making it equivalent to the script option 
> your proposed. But the callback could be much more manageable, more 
> flexible, and potentially more efficient.
>
> We have this now implemented to the point where you can initiate an MD 
> run from your python script by calling a (new) library 'libmdrun'.
> The mdrunnner function (vanilla gromacs) is now split into md_init(), 
> md_integrate() and md_finalize() (and yes we found memory leaks and 
> fixed all of them). Adding a callback functionality would not be much 
> of a problem.
>
>



More information about the gromacs.org_gmx-developers mailing list