gsd Python package

GSD provides a Python API. Use the gsd.hoomd module to read and write files for HOOMD-blue.


Package contents

The GSD main module.

The main package gsd is the root package. It holds the submodules gsd.fl and gsd.hoomd, but does not import them by default. You must explicitly import these modules before use:

import gsd.fl

import gsd.hoomd


All Python modules in GSD use the Python standard library module logging to log events. Use this module to control the verbosity and output destination:

import logging

See also

Module logging

Documentation of the logging standard module.

Signal handling

On import, gsd installs a SIGTERM signal handler that calls sys.exit so that open gsd files have a chance to flush write buffers (GSDFile.flush) when a user’s process is terminated. Use signal.signal to adjust this behavior as needed.