def extract_res(fname):
    """
    Extract information from res file.
    Returns a dictionary.
    The structure of he res file is not extracted
    """
    rems = []
    with open(fname) as fh:
        for line in fh:
            if 'TITL' in line:
                title = line.strip()
            if 'REM' in line:
                rems.append(line.replace('REM', '').strip())
            if 'cell' in line:
                break
    entries = title.split()
    res = {}
    res['rem'] = rems
    res['uid'] = entries[1]
    res['P'] = float(entries[2])
    res['V'] = float(entries[3])
    res['H'] = float(entries[4])
    res['nat'] = int(entries[7])
    res['sym'] = entries[8]
    res['fname'] = fname
    return res
