def add_scaled_residues_highlight_to_nglview(self, view, structure_resnums, chain=None, color='red',
                                                 unique_colors=False, opacity_range=(0.5,1), scale_range=(.7, 10),
                                                 multiplier=None):
        """Add a list of residue numbers (which may contain repeating residues) to a view, or add a dictionary of
            residue numbers to counts. Size and opacity of added residues are scaled by counts.

        Args:
            view (NGLWidget): NGLWidget view object
            structure_resnums (int, list, dict): Residue number(s) to highlight, or a dictionary of residue number to
                frequency count
            chain (str, list): Chain ID or IDs of which residues are a part of. If not provided, all chains in the
                mapped_chains attribute will be used. If that is also empty, and exception is raised.
            color (str): Color to highlight residues with
            unique_colors (bool): If each mutation should be colored uniquely (will override color argument)
            opacity_range (tuple): Min/max opacity values (residues that have higher frequency counts will be opaque)
            scale_range (tuple): Min/max size values (residues that have higher frequency counts will be bigger)

        """
        # TODO: likely to move these functions to a separate nglview/utils folder since they are not coupled to the structure
        # TODO: add color by letter_annotations!
        if not chain:
            chain = self.mapped_chains
            if not chain:
                raise ValueError('Please input chain ID to display residue on')
        else:
            chain = ssbio.utils.force_list(chain)

        if isinstance(structure_resnums, dict):
            if not multiplier:
                multiplier = 1
            opacity_dict = ssbio.utils.scale_calculator(multiplier, structure_resnums, rescale=opacity_range)
            scale_dict = ssbio.utils.scale_calculator(multiplier, structure_resnums, rescale=scale_range)
        else:
            opacity_dict = {x: max(opacity_range) for x in ssbio.utils.force_list(structure_resnums)}
            scale_dict = {x: max(scale_range) for x in ssbio.utils.force_list(structure_resnums)}

        if isinstance(structure_resnums, list):
            structure_resnums = list(set(structure_resnums))
        elif isinstance(structure_resnums, dict):
            structure_resnums = list(structure_resnums.keys())
        elif isinstance(structure_resnums, int):
            structure_resnums = ssbio.utils.force_list(structure_resnums)
        else:
            raise ValueError('Input must either be a list of residue numbers or a dictionary of residue numbers '
                             'and their frequency.')

        colors = sns.color_palette("hls", len(structure_resnums)).as_hex()

        to_show_chains = '( '
        for c in chain:
            to_show_chains += ':{} or'.format(c)
        to_show_chains = to_show_chains.strip(' or ')
        to_show_chains += ' )'

        for i, x in enumerate(structure_resnums):
            if isinstance(x, tuple):
                to_show_res = '( '
                for mut in x:
                    to_show_res += '{} or '.format(mut)
                to_show_res = to_show_res.strip(' or ')
                to_show_res += ' )'
            else:
                to_show_res = x

            log.info('Selection: {} and not hydrogen and {}'.format(to_show_chains, to_show_res))

            if unique_colors:
                view.add_ball_and_stick(selection='{} and not hydrogen and {}'.format(to_show_chains, to_show_res),
                                        color=colors[i], opacity=opacity_dict[x], scale=scale_dict[x])
            else:
                view.add_ball_and_stick(selection='{} and not hydrogen and {}'.format(to_show_chains, to_show_res),
                                        color=color, opacity=opacity_dict[x], scale=scale_dict[x])
Add a list of residue numbers (which may contain repeating residues) to a view, or add a dictionary of
            residue numbers to counts. Size and opacity of added residues are scaled by counts.

        Args:
            view (NGLWidget): NGLWidget view object
            structure_resnums (int, list, dict): Residue number(s) to highlight, or a dictionary of residue number to
                frequency count
            chain (str, list): Chain ID or IDs of which residues are a part of. If not provided, all chains in the
                mapped_chains attribute will be used. If that is also empty, and exception is raised.
            color (str): Color to highlight residues with
            unique_colors (bool): If each mutation should be colored uniquely (will override color argument)
            opacity_range (tuple): Min/max opacity values (residues that have higher frequency counts will be opaque)
            scale_range (tuple): Min/max size values (residues that have higher frequency counts will be bigger)