[gmx-developers] interface for externally calculated forces

Rene Staritzbichler Rene.Staritzbichler at biophys.mpg.de
Wed May 4 17:09:45 CEST 2011


On 04/05/11 12:34, Gerrit Groenhof wrote: > On 05/04/2011 10:28 AM,
David van der Spoel wrote: >> On 2011-05-04 10.02, Rene Staritzbichler
wrote: >>> Dear Gromacs Team, >>> >>> I have been implementing an
interface for external programs into an >>> older version of Gromacs
with the help of Gerrit Groenhof. >>> >>> The interface should allow to
do these steps: >>> - write atom coordinates into a xyz file >>> - call
an external program or script >>> - read externally calculated forces,
energy and virial from file and sum >>> them to internally calculated
ones >>> >>> Ideally one would have a line in the option file: >>>
external_forces = call.sh coordinates.xyz forces.dat >>> >>> Gerrit
agreed that this would be of general interest and that it would >>> be
great to have it included into the main Gromacs release. >>> Carsten
from his lab mentioned that Gromacs is currently transferred to >>> C++
and that I should ask here in this forum when it could be included. >>>
>>> Best wishes, >>> >>> René Staritzbichler >>> >>> >>> >>> >> Could
this replace the QM-MM interfaces? > > It was in fact loosely based on
the QM/MM interface > > Maybe it can replace the existing QM interfaces,
provided some > bookkeeping routines split up the QM and MM parts.
Coming to think of > it, the user could provide a script that calls the
QM routine, scans the > QM output and dumps a file with the forces in
the rigth format. May make > the QM/MM business a lot more simple. A
potentially more efficient option could be to use a callback function of
sorts, e.g. in python, which eliminates the file IO and system call
overhead. This could be based on the 'MD wrapper' (based on GromPy) that
René Pool developed in our group. See his earlier mails for details. It
isn't publicly available yet, but we can share the code with you. --
Groetjes, Anton _____________
_______________________________________________________ | | | | _ _
___,| K. Anton Feenstra | | / \ / \'| | | IBIVU/Bioinformatics - Free
University Amsterdam | |( | )| | | De Boelelaan 1083A - 1081 HV
Amsterdam - Netherlands | | \_/ \_/ | | | Tel +31 20 59 87783 - Fax +31
20 59 87653 - Room P136 | | | Feenstra at few.vu.nl -
www.few.vu.nl/~feenstra/ | | | "Everybody is Smashing Things Down"
(Offspring) |
|_____________|_______________________________________________________|






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? 


Thanks, René










///////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


René Staritzbichler, Ph.D
Max-Planck Institut für Biophysik
Max von Laue Str 3
60438 Frankfurt
rene.staritzbichler at biophys.mpg.de
+ 49 - 69 - 6303 - 1604


\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////////////












More information about the gromacs.org_gmx-developers mailing list