def iximg2cart(structure, ix, img):
    """
    Get Cartesian coordinates of atom with index, ix, and image, img, in the
    Pymatgen structure, structure.

    Args
    ----
    structure: pymatgen.core.Structure
        Pymatgen Structure object.

    ix: int
        Index of atom in structure.

    img: np.ndarray
        (1x3) array representing the perioidic image of the atom.
    """
    return structure.lattice.get_cartesian_coords(structure[ix].frac_coords+img)