<div dir="ltr">Honestly, I&#39;m not too sure. I always have trouble with patch files. Maybe I generated it incorrectly.<div><br></div><div>If it were me, I would just download the three C files from <a href="https://github.com/mdtraj/mdtraj/tree/master/mdtraj/formats/xtc/src">https://github.com/mdtraj/mdtraj/tree/master/mdtraj/formats/xtc/src</a> and overwrite the corresponding files in your source tree, and then check git-diff.</div><div><div><br></div><div>-Robert</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 12, 2015 at 1:33 AM, 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> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-05-12 09:14, Robert McGibbon wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here&#39;s a patch file for the changes in MDTraj against<br>
xdrfile-1.1.4.tar.gz from<br>
<a href="http://www.gromacs.org/Developer_Zone/Programming_Guide/XTC_Library" target="_blank">http://www.gromacs.org/Developer_Zone/Programming_Guide/XTC_Library</a>:<br>
<br>
<a href="https://gist.github.com/rmcgibbo/ed7be1fff89e3467f1bc" target="_blank">https://gist.github.com/rmcgibbo/ed7be1fff89e3467f1bc</a><br>
</blockquote>
<br></span>
Pardon my ignorance, but I tried a few things without success. How do I apply this patch to a freshly checked out xdrfile src tree?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
Most of the patch file is noise from changing some error messages, but<br>
there are a couple of meaningful things, like the check here<br></span>
&lt;<a href="https://gist.github.com/rmcgibbo/ed7be1fff89e3467f1bc#file-xdrfile-1-1-4-src-patch-L68-L73" target="_blank">https://gist.github.com/rmcgibbo/ed7be1fff89e3467f1bc#file-xdrfile-1-1-4-src-patch-L68-L73</a>&gt;.<span class=""><br>
If I recall correctly, that originated because some trajectories<br>
collected on Folding@Home had become corrupted in such a way that<br>
reading them segfaulted the python interpreter.<br>
<br>
-Robert<br>
<br>
On Mon, May 11, 2015 at 11:57 PM, David van der Spoel<br></span><span class="">
&lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a> &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;&gt; wrote:<br>
<br>
    On 2015-05-12 08:21, Robert McGibbon wrote:<br>
<br>
        For what it&#39;s worth, the MDTraj python package (similar to<br>
        MDAnalysis)<br>
        also includes a modified version of xdrfile, which fixes a few small<br>
        bugs. The changes are described here:<br>
        <a href="https://github.com/mdtraj/mdtraj/tree/master/mdtraj/formats/xtc/src" target="_blank">https://github.com/mdtraj/mdtraj/tree/master/mdtraj/formats/xtc/src</a>.<br>
<br>
        One of the bugs (a segfault on reading certain malformed xtc<br>
        files) was<br>
        reported to the gromacs-dev list a while ago, but nobody seemed<br>
        interested:<br>
        <a href="https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-developers/2014-September/007942.html" target="_blank">https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-developers/2014-September/007942.html</a><br>
<br>
    Is the patch somewhere? I&#39;d be happy to apply some more patches and<br>
    then release a new version of the library.<br>
<br>
        -Robert<br>
<br>
        On Mon, May 11, 2015 at 11:16 PM, David van der Spoel<br>
        &lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a> &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;<br></span><div><div class="h5">
        &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a> &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;&gt;&gt; wrote:<br>
<br>
             On 2015-05-11 23:23, Dominik &#39;Rathann&#39; Mierzejewski wrote:<br>
<br>
                 Dear developers,<br>
                 there seems to be a fork of GROMACS&#39; xdrfile by the<br>
        MDAnalysis<br>
                 project:<br>
        <a href="https://github.com/MDAnalysis/mdanalysis/tree/develop/package/src/xdrfile" target="_blank">https://github.com/MDAnalysis/mdanalysis/tree/develop/package/src/xdrfile</a><br>
<br>
                 What are the plans for xdrfile? Would you be open to<br>
        incorporating<br>
                 MDAnalysis&#39; fork changes into your library?<br>
<br>
                 They have added proper python bindings (via swig) and<br>
        some new C<br>
                 APIs.<br>
                 There are also small changes in API, for example in<br>
        read_trr (new<br>
                 parameter) and xdrstdio_(get|set)pos() functions<br>
        (parameter types).<br>
                 I&#39;m attaching a sanitized diff of the C code. Python<br>
        changes are too<br>
                 extensive to make a diff of.<br>
<br>
                 The reason I&#39;m asking is that I&#39;m trying to package<br>
        MDAnalysis for<br>
                 Fedora (and I became the GROMACS maintainer in Fedora<br>
        recently<br>
                 as well).<br>
                 Our guidelines forbid bundling of third-party libraries<br>
        - system<br>
                 versions are to be used. xdrfile is already packaged in<br>
        Fedora, but<br>
                 MDAnalysis bundles its fork - libxdrfile2 which I have<br>
        to unbundle<br>
                 and package separately. It would make everyone&#39;s life<br>
        much easier if<br>
                 xdrfile could be simply updated to include the new python<br>
                 bindings and<br>
                 APIs so that MDAnalysis could use them.<br>
<br>
                 Regards,<br>
                 Dominik<br>
<br>
<br>
<br>
             Are these changes compatible with the latest xdrfile<br>
        changes? There<br>
             has not been a release recently though.<br>
<br>
<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>
        &lt;tel:%2B46184714205&gt;<br>
             &lt;tel:%2B46184714205&gt;.<br>
        <a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a> &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;<br></div></div>
        &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a> &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;&gt;<span class=""><br>
        <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
             --<br>
             Gromacs Developers mailing list<br>
<br>
             * Please search the archive at<br>
        <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a><br>
             before posting!<br>
<br>
             * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
             * For (un)subscribe requests visit<br>
        <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
             or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a><br>
        &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>&gt;<br></span>
             &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a><div><div class="h5"><br>
        &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>&gt;&gt;.<br>
<br>
<br>
<br>
<br>
<br>
<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>
    &lt;tel:%2B46184714205&gt;.<br>
    <a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a> &lt;mailto:<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;<br>
    <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
    --<br>
    Gromacs Developers mailing list<br>
<br>
    * Please search the archive at<br>
    <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a><br>
    before posting!<br>
<br>
    * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
    * For (un)subscribe requests visit<br>
    <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
    or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a><br>
    &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>&gt;.<br>
<br>
<br>
<br>
<br>
</div></div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<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>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</div></div></blockquote></div><br></div>