[gmx-developers] TPR parsing
Krzysztof Mlynarczyk
mitomaster at gmail.com
Sun Mar 17 13:29:54 CET 2013
Hello,
I have a similar problem with tpr files.
Linking to the gromacs library is fine as long as one wishes to write yet
another typical analysis tool.
I'm writing an extension for another application and if the function from
gromacs library calls gmx_fatal(), everything is getting killed while I'd
like to tell the user that there was an error and wait for further
instructions. I can do that with trajectories if I use libxdrfile package
that returns error codes instead of exiting.
Now I see two solutions:
1. Port tpr reading routines to libxdrfile and make them return error
codes that can be checked and handled. This would be the most elegant
solution but requires quite a bit of work (and subsequent maintenance to
keep it in sync with current gmx version - but perhaps that could be
automated with a script).
2. Write an external program that will be called with system() function
and extracts the needed tpr data. Errors in it would not affect the
extension and main application. This is the fastest way, but makes the
plugin gromacs-dependent.
Or maybe there is a third option I don't see? What would you advise?
Krzysztof Mlynarczyk
2013/3/9 David van der Spoel <spoel at xray.bmc.uu.se>
> On 2013-03-09 18:16, Gunther Lukat wrote:
>
>> Hi,
>> well, this requires a working gromacs installation. (The final product
>> should run without the need to install Gromacs.)
>> However, I just started to take a deeper look into the Gromacs library.
>>
>> Just FYI in gmx 4.6 the license has changed to LGPL which means it is
> allowed to link in the *unmodified* library in closed source software.
> Check the COPYING file.
>
> Thank you so far
>>
>> Dipl.-Inf. Gunther Lukat
>> g.lukat at gmx.net <mailto:g.lukat at gmx.net>
>> www.aplvoro.org <http://www.aplvoro.org>
>>
>>
>>
>>
>> Am 09.03.2013 um 10:18 schrieb David van der Spoel <spoel at xray.bmc.uu.se
>> <mailto:spoel at xray.bmc.uu.se>>**:
>>
>>
>> Why don't you simply link to the gromacs library and call the
>>> appropriate reading function?
>>>
>>> Note that all floating point numbers are coded for portability using
>>> the xdr libraries, so it will be close to impossible to read with
>>> anything but the native code.
>>>
>>
>>
>>
>>
>
> --
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
> spoel at xray.bmc.uu.se http://folding.bmc.uu.se
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/**mailman/listinfo/gmx-**developers<http://lists.gromacs.org/mailman/listinfo/gmx-developers>
> Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-developers-request@**gromacs.org<gmx-developers-request at gromacs.org>
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130317/3801d818/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list