def parse_header(header):
    """Parse parts of the PDB header."""
    id = compile('HEADER\\s{4}\\S+.*\\S+\\s*\\S{9}\\s+(\\S{4})\\s*$'), 'id'
    dt = compile('HEADER\\s{4}\\S+.*\\S+\\s+(\\S{9})\\s+\\S{4}\\s*$'), 'date'
    nm = compile('HEADER\\s{4}(\\S+.*\\S+)\\s+\\S{9}\\s+\\S{4}\\s*$'), 'name'
    mc = compile(
        'REMARK 280\\s+MATTHEWS COEFFICIENT,\\s+VM\\s+\\(ANGSTROMS\\*\\*3/DA\\):\\s+(\\d+\\.\\d+)'
        ), 'matthews'
    sc = compile(
        'REMARK 280\\s+SOLVENT CONTENT,\\s+VS\\s+\\(%\\):\\s+(\\d+\\.\\d+)'
        ), 'solvent_content'
    sg = compile('REMARK 290\\s+SYMMETRY OPERATORS FOR SPACE GROUP:\\s+(.*\\S)'
        ), 'space_group'
    xt = compile('REMARK 200\\s+EXPERIMENT TYPE\\s+:\\s+(.*\\S)'
        ), 'experiment_type'
    rs = compile('REMARK   2\\s+RESOLUTION\\.\\s+(\\d+\\.\\d+)\\s+ANGSTROMS\\.'
        ), 'resolution'
    rf = compile('REMARK   3\\s+FREE R VALUE\\s+:\\s+(\\d+\\.\\d+)'), 'r_free'
    xd = compile('EXPDTA\\s+([\\w\\-]+).*'), 'expdta'
    c1 = compile('CRYST1\\s+((\\d+\\.\\d+\\s+){6})'), 'cryst1'
    ra = compile(
        'DBREF\\s+\\S{4}\\s+\\S\\s+\\d+\\s+\\d+\\s+\\S+\\s+(\\S+)\\s+\\S+\\s+\\d+\\s+\\d+\\s+$'
        ), 'dbref_acc'
    rx = compile(
        'DBREF\\s+\\S{4}\\s+\\S\\s+\\d+\\s+\\d+\\s+\\S+\\s+\\S+\\s+(\\S+)\\s+\\d+\\s+\\d+\\s+$'
        ), 'dbref_acc_full'
    tests = [id, dt, nm, mc, sc, sg, xt, rs, rf, xd, c1, ra, rx]
    results = {}
    for line in header:
        for regexp, name in tests:
            try:
                results.update({name: regexp.search(line).group(1).strip()})
                continue
            except AttributeError:
                pass
    return results
