X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=python_packaging%2Fsrc%2Fgmxapi%2Fsimulation%2Ffileio.py;h=57a9ac576fa245ae1adf1de8521f0262cc9e620e;hb=6e6e449b7659f882b1f0dfdcf14eb1279b074aae;hp=f1790fa7dafda86971d0b27ef4dcf26602676bbf;hpb=de7b57567f8aaa2e29f653d843ebf5db93a88af3;p=alexxy%2Fgromacs.git diff --git a/python_packaging/src/gmxapi/simulation/fileio.py b/python_packaging/src/gmxapi/simulation/fileio.py index f1790fa7da..57a9ac576f 100644 --- a/python_packaging/src/gmxapi/simulation/fileio.py +++ b/python_packaging/src/gmxapi/simulation/fileio.py @@ -1,7 +1,7 @@ # # This file is part of the GROMACS molecular simulation package. # -# Copyright (c) 2019, by the GROMACS development team, led by +# Copyright (c) 2019,2021, by the GROMACS development team, led by # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, # and including many others, as listed in the AUTHORS file in the # top-level source directory and at http://www.gromacs.org. @@ -43,7 +43,6 @@ __all__ = ['TprFile', 'read_tpr', 'write_tpr_file'] import os -import gmxapi._gmxapi as _gmxapi from gmxapi import exceptions @@ -88,6 +87,7 @@ class TprFile(object): return "{}('{}', '{}')".format(self.__class__.__name__, self.filename, self.mode) def __enter__(self): + import gmxapi._gmxapi as _gmxapi self._tprFileHandle = _gmxapi.read_tprfile(self.filename) return self @@ -251,6 +251,7 @@ def write_tpr_file(output, input=None): Returns: TBD : possibly a completion condition of some sort and/or handle to the new File """ + import gmxapi._gmxapi as _gmxapi # TODO: (Data model) Decide how to find output data sources. if not hasattr(input, 'parameters'):