h5md-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h5md-user] generic API for H5MD libraries


From: Felix Höfling
Subject: [h5md-user] generic API for H5MD libraries
Date: Fri, 10 Apr 2015 10:43:23 +0200
User-agent: Opera Mail/12.16 (Linux)

Hi,

At the time being we have already a bunch of libraries that support reading and writing H5MD [1], specifically for Fortran, Python, C (thanks to Pierre), a second one for C (Jonas, see VMD plugin), and Lua (Peter). For myself, I'm planning a C++ version.

My proposal is to specify a (generic) API for H5MD libraries which then can be implemented in the various languages. I didn't inspect all the different libraries more closely, but I suspect that the essential functions have similar interfaces.

Such a specification would be helpful to define a set of core functionality that any H5MD library should provide. Of course, it has to be written as pseudo-prototypes, e.g. it does not say whether output is passed by return value, reference or pointers, etc. Examples are given below.

Please let me know, what you think.

Best regards,

Felix


function validate_file
        Input: filename (or HDF5 group?)
        Output: boolean, true if "filename" (HDF5 tree) is in H5MD format

function read_h5md_element
        Input: HDF5 group (e.g., "/particles/A")
        Input: field name (e.g., "position", "id")
        Input (optional): step
        Output: data at given step
        Output (optional): boolean, true upon success

function write_h5md_data
        Input: HDF5 group
        Input: field name
        Input (optional): step
        Output: boolean, true upon success

[1] http://nongnu.org/h5md/software.html#reading-and-writing-h5md-files



reply via email to

[Prev in Thread] Current Thread [Next in Thread]