[gmx-developers] libxml2 versus JSON

Erik Lindahl erik.lindahl at gmail.com
Mon May 23 16:43:19 CEST 2016


Hi,

> On 23 May 2016, at 16:13, Mark Abraham <mark.j.abraham at gmail.com> wrote:
> 
[snip]
> 
> The external parsing library that we wrap for use by GROMACS will need good support for schema handling, but I haven't identified a candidate for that for JSON (David or Erik, did you?).

RapidJSON even includes preliminary schema support; I think I found a couple of rough edges when I played around with it last week, but I’m not sure whether those edges were in me or the library.  They are targeting full schema support for release 1.1, so even if there are some bugs I would suspect they are small enough that we might be able to fix those ourselves.

I thought about a couple of other things when playing around:

1) We should not code for any specific library or file format in most GROMACS code, but rather define a module that handles settings/data in a hierarchical manner, and then the calls to any specific library only happens inside this module. This module needs a bit of design and implementation work.

2) The actual implementations are trivial, but we should spend efforts on explicit nomenclature and a good hierarchical structure for the mdp file. As Mark mentioned, one idea is to make it possible to extend the format by simply adding an extra node with data for module X, and then all parsing for that is delegated to module X.

3) We need a similar choice of structure for data (e.g. scattering factors) and force fields, but only on the highest level. The lower-level stuff we can wait with until we actually implement a specific file.

4) We need schemas to validate the files.

Cheers,

Erik 


More information about the gromacs.org_gmx-developers mailing list