def METHOD_NAME(self, mat, nuc, val):
    """Sets atom density instead of total number.
    Parameters
    ----------
    mat : str, int, openmc.Material or slice
        Material index.
    nuc : str, int or slice
        Nuclide index.
    val : numpy.ndarray
        Array of densities to set in [atom/cm^3]
    """
    mat = self._get_mat_index(mat)
    if isinstance(nuc, str):
        nuc = self.index_nuc[nuc]
    self[mat, nuc] = val * self.volume[mat]