def atom_dict_to_atom_dict(d, aniso_dict):
    """Turns an .mmcif atom dictionary into an atomium atom data dictionary.

    :param dict d: the .mmcif atom dictionary.
    :param dict d: the mapping of atom IDs to anisotropy.
    :rtype: ``dict``"""
    charge = 'pdbx_formal_charge'
    atom = {'x': d['Cartn_x'], 'y': d['Cartn_y'], 'z': d['Cartn_z'],
        'element': d['type_symbol'], 'name': d.get('label_atom_id'),
        'occupancy': d.get('occupancy', 1), 'bvalue': d.get(
        'B_iso_or_equiv'), 'charge': d.get(charge, 0) if d.get(charge) !=
        '?' else 0, 'alt_loc': d.get('label_alt_id') if d.get(
        'label_alt_id') != '.' else None, 'anisotropy': aniso_dict.get(int(
        d['id']), [0, 0, 0, 0, 0, 0])}
    for key in ['x', 'y', 'z', 'charge', 'bvalue', 'occupancy']:
        if atom[key] is not None:
            atom[key] = float(atom[key])
    return atom
