def get_configuration(filename=CONFIGNAME):
global cfg, configuration    <EOL>cfg = GMXConfigParser(filename=filename)   <EOL>globals().update(cfg.configuration)        <EOL>configuration = cfg.configuration          <EOL>return cfg<EOL>
Reads and parses the configuration file.

    Default values are loaded and then replaced with the values from
    ``~/.gromacswrapper.cfg`` if that file exists. The global
    configuration instance :data:`gromacswrapper.config.cfg` is updated
    as are a number of global variables such as :data:`configdir`,
    :data:`qscriptdir`, :data:`templatesdir`, :data:`logfilename`, ...

    Normally, the configuration is only loaded when the :mod:`gromacs`
    package is imported but a re-reading of the configuration can be forced
    anytime by calling :func:`get_configuration`.

    :Returns: a dict with all updated global configuration variables