$chart ); }); </script> """ #: Currently supported chart kinds CHART_KINDS = ["scatter", "column"] #: Currently supported tooltip options TOOLTIP_OPTIONS = "struct" if AP_TOOLS: #: Library version VERSION = apt.get_commit(__file__) # I use this to keep track of the library versions I use in my project notebooks print("{:45s} (commit: {})".format(__name__, VERSION)) else: print("- loading highcharts...") display(HTML(HIGHCHARTS)) class ColorScale(): """Used for continuous coloring.""" def __init__(self, num_values, val_min, val_max): self.num_values = num_values self.num_val_1 = num_values - 1 self.value_min = val_min self.value_max = val_max
from rdkit.Chem import AllChem as Chem from rdkit.Chem import PandasTools as PT from . import tools, hc_tools as hct try: from misc_tools import apl_tools as apt AP_TOOLS = True except ImportError: AP_TOOLS = False if AP_TOOLS: #: Library version VERSION = apt.get_commit(__file__) # I use this to keep track of the library versions I use in my project notebooks print("{:45s} (commit: {})".format(__name__, VERSION)) else: print("{:45s} ({})".format(__name__, time.strftime("%y%m%d-%H:%M", time.localtime(op.getmtime(__file__))))) def init_PT(): """create a dummy df to initialize the RDKit PandasTools (a bit hacky, I know).""" init = pd.DataFrame.from_dict({"id": [123, 124], "Smiles": ["c1ccccc1C(=O)N", "c1ccccc1C(=O)O"]}) PT.AddMoleculeColumnToFrame(init) init_PT() def move_col(df, col, new_pos=1): """
from mol_frame import tools as mft from mol_frame.mol_images import mol_img_tag, b64_mol, add_coords, rescale from mol_frame.viewers import show_grid, write_grid molvs_s = Standardizer() molvs_l = LargestFragmentChooser() molvs_u = Uncharger() x = b64_mol # make the linter shut up try: from misc_tools import apl_tools AP_TOOLS = True #: Library version VERSION = apl_tools.get_commit(__file__) # I use this to keep track of the library versions I use in my project notebooks print("{:45s} ({})".format(__name__, VERSION)) except ImportError: AP_TOOLS = False print("{:45s} ({})".format( __name__, time.strftime("%y%m%d-%H:%M", time.localtime(op.getmtime(__file__))), )) try: import holoviews as hv hv.extension("bokeh") from bokeh.models import HoverTool