From 3f5baac10a84c789779443c77363ac8a568d93b1 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 30 Jan 2020 14:39:57 -0500 Subject: [PATCH] MDP files should not be written as binary --- gromacs/cbook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gromacs/cbook.py b/gromacs/cbook.py index 7b12a9c2..b11d1d4f 100644 --- a/gromacs/cbook.py +++ b/gromacs/cbook.py @@ -744,7 +744,7 @@ def create_portable_topology(topol, struct, **kwargs): processed = kwargs.pop('processed', os.path.join(_topoldir, 'pp_'+_topol)) grompp_kwargs, mdp_kwargs = filter_grompp_options(**kwargs) mdp_kwargs = add_mdp_includes(topol, mdp_kwargs) - with tempfile.NamedTemporaryFile(suffix='.mdp') as mdp: + with tempfile.NamedTemporaryFile(suffix='.mdp', mode='w') as mdp: mdp.write('; empty mdp file\ninclude = {include!s}\n'.format(**mdp_kwargs)) mdp.flush() grompp_kwargs['p'] = topol