def set_gmxrc_environment(gmxrc):
<EOL>envvars = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>']<EOL>cmdargs = ['<STR_LIT>', '<STR_LIT:-c>', "<STR_LIT>".format(gmxrc,<EOL>'<STR_LIT:U+0020>'.join(['<STR_LIT>'.format(v) for v in envvars]))]<EOL>if not gmxrc:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return<EOL><DEDENT>try:<EOL><INDENT>out = subprocess.check_output(cmdargs)<EOL>out = out.strip().split()<EOL>for key, value in zip(envvars, out):<EOL><INDENT>value = str(value.decode('<STR_LIT:ascii>').replace('<STR_LIT>', '<STR_LIT>'))  <EOL>os.environ[key] = value<EOL>logger.debug("<STR_LIT>", key, value)<EOL><DEDENT><DEDENT>except (subprocess.CalledProcessError, OSError):<EOL><INDENT>logger.warning("<STR_LIT>"<EOL>"<STR_LIT>", gmxrc)<EOL><DEDENT>
Set the environment from ``GMXRC`` provided in *gmxrc*.

    Runs ``GMXRC`` in a subprocess and puts environment variables loaded by it
    into this Python environment.

    If *gmxrc* evaluates to ``False`` then nothing is done. If errors occur
    then only a warning will be logged. Thus, it should be safe to just call
    this function.