def coord_to_index(coord, map_obj):
    """
    Converts atomic residue coordinates into map indices
    :param coord: coordinate in angstrom
    :param map_obj: map object
    :return: float indices
    """
    st = map_obj.n_start
    vs = map_obj.voxel_size
    orig = map_obj.origin

    x_index = coord[2] / vs[2] - orig[2] / vs[2] - st[2]
    y_index = coord[1] / vs[1] - orig[1] / vs[1] - st[1]
    z_index = coord[0] / vs[0] - orig[0] / vs[0] - st[0]
    return x_index, y_index, z_index