This module provides a file reader for the H5MD format.
Construct H5MD reader.
| Parameters: |
|
|---|
Construct a group reader.
| Parameters: |
|
|---|---|
| Returns: | instance of group reader |
Close file.
HDF5 root group of the file.
Filename of the file.
H5MD major and minor version of file.
Name of the program that created the file.
Version of the program that created the file.
Creation time of the file in seconds since the Unix epoch.
This time stamp may be converted to a human-readable time using os.date:
halmd.log.info(("file created at %s"):format(os.date("%c", file.creation_time)))
Name of author of the file.
Check whether file is H5MD file.
| Parameters: | path – filename |
|---|---|
| Returns: | true if file is H5MD file, false if not, or nil if file does not exist |
This function is useful to validate a command-line argument:
local parser = halmd.utility.program_options.argument_parser()
parser:add_argument("trajectory", {
help = "trajectory file name"
, type = "string"
, required = true
, action = function(args, key, value)
if not halmd.io.readers.h5md.check(value) then
error(("not an H5MD file: %s"):format(value), 0)
end
args[key] = value
end
})