simulariumio/md/md_converter.py
def _get_display_data_for_type(
        raw_type_name: str, jmol_colors: pd.DataFrame, input_data: MdData
    ) -> DisplayData:
        """
        Get the DisplayData with atomic element colors from Jmol
        """
        element_type = guess_atom_element(raw_type_name)
        color = MdConverter._get_element_hex_color(element_type, jmol_colors)
        display_data = None
        if raw_type_name in input_data.display_data:
            display_data = copy.copy(input_data.display_data[raw_type_name])
        else:
            type_name = MdConverter._get_type_name(raw_type_name, input_data)
            if element_type in input_data.display_data:
                display_data = copy.copy(input_data.display_data[element_type])
                display_data.name = type_name
            else:
                display_data = DisplayData(name=type_name)
        if display_data.color:
            return display_data
        display_data.color = color
        return display_data

        Get the DisplayData with atomic element colors from Jmol
        
Get the DisplayData with atomic element colors from Jmol
Get the DisplayData with atomic element colors from Jmol
def _get_display_data_for_type(
        raw_type_name: str, jmol_colors: pd.DataFrame, input_data: MdData
    ) -> DisplayData:
        element_type = guess_atom_element(raw_type_name)
        color = MdConverter._get_element_hex_color(element_type, jmol_colors)
        display_data = None
        if raw_type_name in input_data.display_data:
            display_data = copy.copy(input_data.display_data[raw_type_name])
        else:
            type_name = MdConverter._get_type_name(raw_type_name, input_data)
            if element_type in input_data.display_data:
                display_data = copy.copy(input_data.display_data[element_type])
                display_data.name = type_name
            else:
                display_data = DisplayData(name=type_name)
        if display_data.color:
            return display_data
        display_data.color = color
        return display_data
def _get_display_data_for_type ( raw_type_name : str , jmol_colors : pd . DataFrame , input_data : MdData ) -> DisplayData : element_type = guess_atom_element ( raw_type_name ) color = MdConverter . _get_element_hex_color ( element_type , jmol_colors ) display_data = None if raw_type_name in input_data . display_data : display_data = copy . copy ( input_data . display_data [ raw_type_name ] ) else : type_name = MdConverter . _get_type_name ( raw_type_name , input_data ) if element_type in input_data . display_data : display_data = copy . copy ( input_data . display_data [ element_type ] ) display_data . name = type_name else : display_data = DisplayData ( name = type_name ) if display_data . color : return display_data display_data . color = color return display_data
Get the DisplayData with atomic element colors from Jmol
Get the DisplayData with atomic element colors from Jmol
"""
        Get the DisplayData with atomic element colors from Jmol
        """
raw_type_name
str
jmol_colors
pd.DataFrame
input_data
MdData