[gmx-developers] Testing whole analysis output files

Teemu Murtola teemu.murtola at gmail.com
Fri Jul 24 09:53:58 CEST 2015


Hi,

There is no "simple" way using existing code to just test such files. It
would require a complete parser for such files (and then one would also
want to test, e.g., the legends at the beginning of xvg files), which is
certainly doable, but will be a lot of code.

The approach used in the trajectoryanalysis tests is to test the data only
before it is written into a file. If your code used the analysisdata
classes for producing output (which could be useful otherwise as well,
including some enforced modularization), then you could just reuse this
mechanism, but probably that also requires you to change your code quite a
bit.

Best regards,
Teemu


On Fri, Jul 24, 2015, 09:50 David van der Spoel <spoel at xray.bmc.uu.se>
wrote:


 I'm trying to write a test for the output files generated in my energy
patch. However, the checkOutputfiles() compares files as blocks of
strings, which is not useful for floating point numbers. Is there a
simple way of testing such files as a bunch of numbers with a tolerance?


I looked in the trajectoryanalysis/tests but did not find anything
helpful there (or did not comprehend what is being done).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20150724/b3497f61/attachment.html>


More information about the gromacs.org_gmx-developers mailing list