openforcefield.utils.utils.temporary_cd

openforcefield.utils.utils.temporary_cd(dir_path)[source]

Context to temporary change the working directory.

Parameters
dir_pathstr

The directory path to enter within the context

Examples

>>> dir_path = '/tmp'
>>> with temporary_cd(dir_path):
...     pass  # do something in dir_path