def assign_metrics_to_assembly(mmcif_dict, assembly):
    """Takes an assembly dict, and goes through an mmcif dictionary looking for
    relevant energy etc. information to update it with.

    :param dict mmcif_dict: The dictionary to read.
    :param dict assembly: The assembly to update."""
    for a in mmcif_dict.get('pdbx_struct_assembly_prop', []):
        if a['biol_id'] == str(assembly['id']):
            if a['type'] == 'MORE':
                assembly['delta_energy'] = float(a['value'].split('/')[0])
            elif a['type'] == 'SSA (A^2)':
                assembly['surface_area'] = float(a['value'].split('/')[0])
            elif a['type'] == 'ABSA (A^2)':
                assembly['buried_surface_area'] = float(a['value'].split(
                    '/')[0])
