def get_neighbors_in_shell(self, origin, r, dr, include_index=False, include_image=False):
        """
        Returns all sites in a shell centered on origin (coords) between radii
        r-dr and r+dr.

        Args:
            origin (3x1 array): Cartesian coordinates of center of sphere.
            r (float): Inner radius of shell.
            dr (float): Width of shell.
            include_index (bool): Whether to include the non-supercell site
                in the returned data
            include_image (bool): Whether to include the supercell image
                in the returned data

        Returns:
            [(site, dist, index) ...] since most of the time, subsequent
            processing
            requires the distance. Index only supplied if include_index = True.
            The index is the index of the site in the original (non-supercell)
            structure. This is needed for ewaldmatrix by keeping track of which
            sites contribute to the ewald sum.
            Image only supplied if include_image = True
        """
        outer = self.get_sites_in_sphere(origin, r + dr,
                                         include_index=include_index,
                                         include_image=include_image)
        inner = r - dr
        return [t for t in outer if t[1] > inner]
def get_neighbors_in_shell ( self , origin , r , dr , include_index = False , include_image = False ) : outer = self . get_sites_in_sphere ( origin , r + dr , include_index = include_index , include_image = include_image ) inner = r - dr return [ t for t in outer if t [ 1 ] > inner ]
Returns all sites in a shell centered on origin (coords) between radii
        r-dr and r+dr.

        Args:
            origin (3x1 array): Cartesian coordinates of center of sphere.
            r (float): Inner radius of shell.
            dr (float): Width of shell.
            include_index (bool): Whether to include the non-supercell site
                in the returned data
            include_image (bool): Whether to include the supercell image
                in the returned data

        Returns:
            [(site, dist, index) ...] since most of the time, subsequent
            processing
            requires the distance. Index only supplied if include_index = True.
            The index is the index of the site in the original (non-supercell)
            structure. This is needed for ewaldmatrix by keeping track of which
            sites contribute to the ewald sum.
            Image only supplied if include_image = True