Source code for gmx.version

# Version file generated by CMake
Provide version and release information.

    major (int): gmxapi major version number.
    minor (int): gmxapi minor version number.
    patch (int): gmxapi patch level number.
    release (bool): True if imported gmx module is an officially tagged release, else False.

__version__ = "0.0.7"
major = 0
minor = 0
patch = 7

# Note: this is not automatically updated. See RELEASE.txt and
release = True

[docs]def api_is_at_least(major_version, minor_version=0, patch_version=0): """Allow client to check whether installed module supports the requested API level. Arguments: major_version (int): gmxapi major version number. minor_version (int): optional gmxapi minor version number (default: 0). patch_version (int): optional gmxapi patch level number (default: 0). Returns: True if installed gmx package is greater than or equal to the input level Note that if gmx.version.release is False, the package is not guaranteed to correctly or fully support the reported API level. """ from gmx.exceptions import TypeError if not isinstance(major_version, int) or not isinstance(minor_version, int) or not isinstance(patch_version, int): raise TypeError('Version levels must be provided as integers.') return (major >= major_version) and (minor >= minor_version) and (patch >= patch_version)