Hello,<br><br>I have a similar problem with tpr files.<br>Linking to the gromacs library is fine as long as one wishes to write yet another typical analysis tool. <br>I&#39;m writing an extension for another application and if the function from gromacs library calls gmx_fatal(), everything is getting killed while I&#39;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.<br>

Now I see two solutions:<br><ol><li>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).<br>

</li><li>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.</li>

</ol>Or maybe there is a third option I don&#39;t see? What would you advise?<br><br>Krzysztof Mlynarczyk<br><br><br><br><div class="gmail_quote">2013/3/9 David van der Spoel <span dir="ltr">&lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-03-09 18:16, Gunther Lukat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
well, this requires a working gromacs installation. (The final product<br>
should run without the need to install Gromacs.)<br>
However, I just started to take a deeper look into the Gromacs library.<br>
<br>
</blockquote></div>
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.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thank you so far<br>
<br>
Dipl.-Inf. Gunther Lukat<br>
</div><a href="mailto:g.lukat@gmx.net" target="_blank">g.lukat@gmx.net</a> &lt;mailto:<a href="mailto:g.lukat@gmx.net" target="_blank">g.lukat@gmx.net</a>&gt;<br>
<a href="http://www.aplvoro.org" target="_blank">www.aplvoro.org</a> &lt;<a href="http://www.aplvoro.org" target="_blank">http://www.aplvoro.org</a>&gt;<div class="im"><br>
<br>
<br>
<br>
Am 09.03.2013 um 10:18 schrieb David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a><br></div>
&lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;&gt;<u></u>:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why don&#39;t you simply link to the gromacs library and call the<br>
appropriate reading function?<br>
<br>
Note that all floating point numbers are coded for portability using<br>
the xdr libraries, so it will be close to impossible to read with<br>
anything but the native code.<br>
</blockquote>
<br>
<br>
<br>
</div></blockquote>
<br><div class="HOEnZb"><div class="h5">
<br>
-- <br>
David van der Spoel, Ph.D., Professor of Biology<br>
Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>
Box 596, 75124 Uppsala, Sweden. Phone:  <a href="tel:%2B46184714205" value="+46184714205" target="_blank">+46184714205</a>.<br>
<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
-- <br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/<u></u>mailman/listinfo/gmx-<u></u>developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@<u></u>gromacs.org</a>.<br>
</div></div></blockquote></div><br>