Interactive chemical viewer for 2D structures of small molecules

Overview

👀 mols2grid

Pypi version Conda version

Tests status Code coverage Build status

Powered by RDKit Open In Colab

mols2grid is an interactive chemical viewer for 2D structures of small molecules, based on RDKit.

Demo showing mols2grid's integration in a Jupyter notebook

➡️ Try the demo notebook on Google Colab

🐍 Installation


mols2grid was developped for Python 3.6+ and requires rdkit (>=2020.03.1), pandas and jinja2 as dependencies.
The easiest way to install it is from conda:

conda install -c conda-forge mols2grid

Alternatively, you can also use pip:

pip install mols2grid

It is compatible with Jupyter Notebook and Google Colab (Visual Studio notebooks and Jupyterlab are not supported) and can run on Streamlit.

📜 Usage


import mols2grid

mols2grid.display("path/to/molecules.sdf",
                  # RDKit's MolDrawOptions parameters
                  fixedBondLength=25,
                  # rename fields for the output document
                  rename={"SOL": "Solubility",
                          "SOL_classification": "Class",
                          "NAME": "Name"},
                  # set what's displayed on the grid
                  subset=["ID", "img", "Solubility"],
                  # set what's displayed on the tooltips
                  tooltip=["Name", "smiles", "Class", "Solubility"],
                  # style for the grid labels and tooltips
                  style={"Solubility": lambda x: "color: red" if x < -3 else "color: black"},
                  # change the precision and format (or other transformations)
                  transform={"Solubility": lambda x: f"{x:+.2f}"})

Input parameters

You can setup the grid from various inputs:

  • a pandas DataFrame (with a column of SMILES or RDKit molecules, controlled by the smiles_col and mol_col parameters),
  • a list of RDKit molecules (with properties accessible through the mol.GetPropsAsDict() method),
  • or an SDF file

You can also rename each field of your input with the rename parameter. Please note that 3 fields are automatically added regardless of your input: mols2grid-id, SMILES and img. If a "SMILES" field already exists, it will not be overwritten.

Parameters for the drawing of each molecule

  • useSVG=True: use SVG images or PNG
  • coordGen=True: use the coordGen library instead of the RDKit one to depict the molecules in 2D
  • removeHs=False: remove explicit hydrogen atoms from the drawings
  • size=(160, 120): size of each image
  • use_coords=True: use the coordinates of the input molecules if available
  • MolDrawOptions=None: RDKit's MolDrawOptions class. Useful for making highly customized drawings. You can also leave this to None, and directly use the attributes of this class as parameters like addStereoAnnotation=True

Parameters for the grid

You can control the general look of the document through the template argument:

  • template="pages" (default) which is displayed above. It integrates nicely with Jupyter notebooks and has a search bar
  • template="table", which displays the full list of molecules (no pages). Useful if you ever need to print the full list of molecules on paper (or print to PDF)

Both templates can be configured with the same parameters (a lot of which are CSS declarations). For the pages template, the following parameters are available:

  • subset=None: list or None
    Columns to be displayed in each cell of the grid. Each column's value will be displayed from top to bottom in the same order given here. Use "img" for the image of the molecule. Default: all columns (with "img" in first position)
  • tooltip=None: list or None
    Columns to be displayed as a tooltip when hovering/clicking on the image of a cell. Use None for no tooltip.
  • tooltip_fmt="{key}: {value}": str
    Format string of each key/value pair in the tooltip
  • tooltip_trigger="click hover": str
    Sequence of triggers for the tooltip: (click, hover, focus)
  • tooltip_placement="bottom": str
    Position of the tooltip: auto, top, bottom, left, right
  • n_cols=5: int
    Number of columns per page
  • n_rows=3 : int
    Number of rows per page
  • border="1px solid #cccccc": str
    Styling of the border around each cell (CSS)
  • gap=0: int or str
    Size of the margin around each cell (CSS)
  • fontsize="12pt": str
    Font size of the text displayed in each cell (CSS)
  • fontfamily"'DejaVu', sans-serif": str
    Font used for the text in each cell (CSS)
  • textalign="center": str
    Alignment of the text in each cell (CSS)
  • hover_color="#e7e7e7": str
    Background color when hovering a cell (CSS)
  • style=None: dict or None
    CSS styling applied to each item in a cell. The dict must follow a key: function structure where the key must correspond to one of the columns in subset or tooltip. The function takes the item's value as input, and outputs a valid CSS styling. For example, if you want to color the text corresponding to the "Solubility" column in your dataframe:
    style={"Solubility": lambda x: "color: red" if x < -3 else ""}
    You can also style a whole cell using __all__ as a key, the corresponding function then has access to all values for each cell:
    style={"__all__": lambda x: "background-color: yellow" if x["Solubility"] < -5 else ""}
  • transform=None: dict or None
    Functions applied to specific items in all cells. The dict must follow a key: function structure where the key must correspond to one of the columns in subset or tooltip. The function takes the item's value as input and transforms it. For example, to round the "Solubility" to 2 decimals, and display the "Melting point" in Celsius instead of Fahrenheit with a single digit precision and some text before ("MP") and after ("°C") the value:
    transform={"Solubility": lambda x: f"{x:.2f}",
               "Melting point": lambda x: f"MP: {5/9*(x-32):.1f}°C"}
    These transformations only affect columns in subset and tooltip and do not interfere with style.
  • selection=True : bool
    Enables the selection of molecules using a checkbox. Only usefull in the context of a Jupyter notebook. You can retrieve your selection of molecules (index and SMILES) through mols2grid.get_selection()
  • custom_css=None : str or None
    Custom CSS properties applied to the content of the HTML document
  • custom_header=None : str or None
    Custom libraries (CSS or JS) to be loaded in the header of the document
  • callback=None : str or callable
    JavaScript or Python callback to be executed when clicking on an image. A dictionnary containing the data for the full cell is directly available as data in JS. For Python, the callback function must have data as the first argument to the function. All the values in the data dict are parsed as strings, except "mols2grid-id" which is always an integer.
  • sort_by : str or None
    Sort the grid according to the following field (which must be present in subset or tooltip).

Less options are available for the table template, you can check the complete list of arguments with help(mols2grid.MolGrid.to_table)

Output parameters

You can either:

  • save the grid with mols2grid.save(input, output="path/grid.html", ...). The file that is generated is a standalone HTML document that should work with most web browsers.
  • display it directly in a Jupyter notebook with mols2grid.display(...) (optionnal argument: width="100%", height=None)

🚀 Resources


👏 Acknowledgments


License


Unless otherwise noted, all files in this directory and all subdirectories are distributed under the Apache License, Version 2.0:

    Copyright 2021 Cédric BOUYSSET

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
Comments
  • Selection Option for Streamlit

    Selection Option for Streamlit

    Hello, thanks a lot for sharing your project!

    The README says that the checkbox option is relevant only in the context of Jupyter Notebook. Is there no way of extracting the selection through Streamlit?

    Thank you in advance and apologies for the trivial question.

    enhancement 
    opened by eereenah-fast 11
  • AttributeError: 'MolDraw2DSVG' object has no attribute 'SetDrawOptions'

    AttributeError: 'MolDraw2DSVG' object has no attribute 'SetDrawOptions'

    import pandas as pd
    import mols2grid
    
    smiles = ["CCO", "c1ccccc1", "N", "CO", "O=S(=O)(-O)(-O)", "CCC", "CCC=O"]
    df = pd.DataFrame({"smi": smiles,
                       "id": range(1, len(smiles) + 1)})
    mg = mols2grid.MolGrid(df, smiles_col="smi", size=(110, 90))
    mg.display(subset=["id", "img"], n_cols=7)
    

    I was trying to visualize a list of SMILES, as shown in your colab. But I got the following error message.

    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    <ipython-input-26-cbf1ce952db4> in <module>
          7                    "id": range(1, len(smiles) + 1)})
          8 # setup the grid
    ----> 9 mg = mols2grid.MolGrid(df, smiles_col="smi", size=(110, 90))
         10 mg.display(subset=["id", "img"], n_cols=7)
    
    ~/anaconda3/lib/python3.7/site-packages/mols2grid/molgrid.py in __init__(self, df, smiles_col, mol_col, coordGen, useSVG, mapping, **kwargs)
         74         dataframe.dropna(axis=0, subset=[mol_col], inplace=True)
         75         # generate drawings
    ---> 76         dataframe["img"] = dataframe[mol_col].apply(self.mol_to_img, **kwargs)
         77         self.dataframe = dataframe
         78         self.mol_col = mol_col
    
    ~/anaconda3/lib/python3.7/site-packages/pandas/core/series.py in apply(self, func, convert_dtype, args, **kwds)
       4133             else:
       4134                 values = self.astype(object)._values
    -> 4135                 mapped = lib.map_infer(values, f, convert=convert_dtype)
       4136 
       4137         if len(mapped) and isinstance(mapped[0], Series):
    
    pandas/_libs/lib.pyx in pandas._libs.lib.map_infer()
    
    ~/anaconda3/lib/python3.7/site-packages/pandas/core/series.py in f(x)
       4118 
       4119             def f(x):
    -> 4120                 return func(x, *args, **kwds)
       4121 
       4122         else:
    
    ~/anaconda3/lib/python3.7/site-packages/mols2grid/molgrid.py in mol_to_img(self, mol, **kwargs)
        170         """Convert an RDKit mol to an HTML img tag containing a drawing of the
        171         molecule"""
    --> 172         img = self.draw_mol(mol, **kwargs)
        173         if self.useSVG:
        174             return img
    
    ~/anaconda3/lib/python3.7/site-packages/mols2grid/molgrid.py in draw_mol(self, mol, size, use_coords, MolDrawOptions, **kwargs)
        158         for key, value in kwargs.items():
        159             setattr(MolDrawOptions, key, value)
    --> 160         d2d.SetDrawOptions(MolDrawOptions)
        161         if not use_coords:
        162             mol = deepcopy(mol)
    
    AttributeError: 'MolDraw2DSVG' object has no attribute 'SetDrawOptions'
    

    could you please take a look maybe? Thanks!

    opened by LiuCMU 8
  • Conda forge package available

    Conda forge package available

    Hello @cbouy.

    I just wanted to tell you that I have created a conda package for mols2grid at https://github.com/conda-forge/mols2grid-feedstock: mamba install -c conda-forge mols2grid.

    Feel free to make a PR to the feedstock if you want to be added as a maintainer of the package.


    As a side note, I am also the author of the datamol library (https://github.com/datamol-org/datamol), in case you want to use it in mol2grid. It also has a nice 3D conformer viewer that could potentially be added to mol2grid.

    Close once you have read this, since this is not a real issue :-)

    opened by hadim 6
  • template=

    template="pages" appears blank but template="table" works fine

    Thanks for putting this together! It's really nice. I'm unclear how to proceed to debug this, but I'm able to get images only when I use template="table". If I try template="pages" (or leave it blank), then I can only see the "Sort by" bar, screenshot below. I've tested this using mols2grid version 0.0.3, in a relatively clean conda environment, on macOS using Chrome Version 89.0.4389.90 and Firefox 87.0b9.

    image

    opened by slochower 6
  • Inuiry regaring filtering in saved html & images in tooltip.

    Inuiry regaring filtering in saved html & images in tooltip.

    Thank you for creating this really nifty tool for generation of html reports of chemical data, it has been really helpful for exporting results to other non-computational scientists to view results.

    I wanted to ask two things regarding the current capabilities of mols2grid and if these were possible:

    1. In the tooltip, is it possible to render the image of a particular feature of the molecule? The image I am trying to render is a rdkit generated pillow image of the bemis murcko scaffold of the molecule so that viewers can easily see the scaffold of a molecule of interest. Currently just adding a column from a pandas.DataFrame containing pillow objects of those images just shows up blank in the html report so I was wondering if this feature was supported and if there are any extra steps I need to do for it to work?

    2. For the filtering sliders demonstrated in the collab notebooks, are there any ways to include this into the saved html report? I was trying to allow the chemists to do some filtering based on frequency of bemis murcko scaffold to find those molecules which occur the most.

    Thank you and I look forward to your reply. 😊

    opened by JSLJ23 5
  • Feature request: allow string formatting for values in subsets

    Feature request: allow string formatting for values in subsets

    Hi, thanks again.

    It's really handy that you built-in CSS styling of the labels and tooltips, like color: red. It would also be great to support Python string formatting (e.g., to trim the string representation of floats). For example:

    image

    I'm guessing this will be tricky since it looks like you're building up the CSS manually here: https://github.com/cbouy/mols2grid/blob/849cf49a105b941c3c6918bb4b91d9b4d348c4ed/mols2grid/molgrid.py#L316

    ...but I think it's something to consider for the future.

    opened by slochower 5
  • Directly using an RDKit mol with the `mol_col` parameter

    Directly using an RDKit mol with the `mol_col` parameter

    Added an option "mdl_col" to use coordinates allready present in DataFrame or other input. There are probably other ways to implement this, but I needed a way to draw molecules with the coordinates prepared in advance.

    opened by fredrikw 5
  • Different MolGrid instances

    Different MolGrid instances "share" .get_selection

    Hello. We added one more MolGrid instance and it appears that the first MolGrid selection affects what is selected in the second MolGrid.

    import mols2grid
    
    m1 = mols2grid.MolGrid()
    m2 = mols2grid.MolGrid()
    
    # select the first item on m1
    
    m2.get_selection()
    # shows the item selected with the index of m1
    

    Version: mols2grid-0.2.2

    I am bit busy now but I'll try to have a look in the near future.

    opened by bieniekmateusz 4
  • template=

    template="table" gives blank result

    Hi, I love mols2grid! Thanks for the hard work.

    I'm having the inverse problem of what is described here: https://github.com/cbouy/mols2grid/issues/8

    template="table" gives blank output, but template="pages" works fine.

    There are no NaNs in my pandas dataframe.

    Using mols2grid 0.2.1 with rdkit 2021.09.4 in a conda environment, Jinja2 3.0.2, pandas 1.4.0 on macOS, browser is Brave Version 1.35.104.

    Thanks!

    opened by adelenelai 3
  • MolGrid.get_selection() always returns empty dict

    MolGrid.get_selection() always returns empty dict

    Hi cbouy,

    Thanks for making this tool available - it's great!

    I'm trying out the code (with jupyter notebook) and I've observed that after selecting a molecule entry in the mol2grid.MolGrid I am not able to retrieve the selection through mol2grid.MolGrid.get_selection() - an empty dict is returned irrespective of the selection. I have looked through your google colab examples too (RDkit UGM and solubility examples) and see the same behaviour so I think there's an issue within mol2grid.

    Thanks in advance, Pete

    opened by prcurran 3
  • Fix text search

    Fix text search

    Fixes #34.

    Text searches containing any of the following regex characters -[]{}()*+?.,\^$|# would automatically return an empty grid, preventing searching for CAS numbers and any other identifier or text containing the above characters.

    This has been temporarily patched until a proper fix is released in the underlying list.js library.

    opened by cbouy 1
  • suggestion - support for py-shiny

    suggestion - support for py-shiny

    Hi,

    I love your package and was wondering if you had thought about supporting py-shiny, a web frame work that was just announced. It would be a great addition to the ecosystem.

    Shiny is a very popular framework for developing scientific apps based in R and I am expecting that py-shiny will be equally popular, especially in cheminformatics due to packages such as yours and rdkit.

    Cheers,

    Iain

    opened by iainmwallace 0
Releases(v1.1.0)
  • v1.1.0(Dec 24, 2022)

    Added

    • Predefined JavaScript callbacks in the mols2grid.callbacks module. Those can be extensively configured:
      • info: displays a bigger image alongside some common descriptors for the molecule
      • show_3d: displays the molecule in 3D
      • external_link: opens a new tab. By default, opens Leruli.com using the SMILES of the molecule.
    • Support for tuple of molecules in display and save.

    Changed

    • The "click" event is now automatically removed from tooltip_trigger when specifying a callback.

    Fixed

    • Issue #34: text searches containing any of the following regex characters -[]{}()*+?.,\^$|# would automatically return an empty grid, preventing searching for CAS numbers and any other identifier or text containing the above characters. This has been temporarily patched until a proper fix is released in the underlying list.js library.
    • The link to the KNIME component on the corresponding badges has been fixed.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Sep 4, 2022)

    Added

    • Notebooks running in VSCode and Jupyter Lab now support accessing selections from Python, executing Python callback functions, and filtering based on other widgets.

    Changed

    • Python callbacks can now also be lambda functions.
    • If prerender=True, substructure highlighting will be automatically disabled by default instead of raising an error.
    • When exporting a selection to a SMILES file through the GUI, the output no longer contains a header.
    • Relies on a custom ipywidget to handle communication between the front-end/Javascript and the back-end/Python.
    • When calling grid.filter and other filtering methods, mols2grid will now use the filtering code based on ipywidgets, except for Streamlit where it will use the older JavaScript version of the code to maintain compatibility.

    Fixed

    • Automatically fitting to the content's height in Streamlit.

    Removed

    • mapping argument for renaming fields, replaced by rename in v0.1.0.
    • mols2grid.selection, replaced by mols2grid.get_selection() in v0.1.0.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(May 29, 2022)

  • v0.2.3(May 10, 2022)

  • v0.2.2(Apr 4, 2022)

    Added

    • A proper documentation page with tutorials can now be accessed online.
    • Added a single_highlight=False parameter to only highlight a single match per molecule in substructure queries.
    • Added a "Check matching" button that only selects items that match the current search and/or filters.
    • Added custom_css, custom_header and sort_by to the "table" template

    Changed

    • Compounds matching a substructure search are now aligned to the query molecule before rendering the image.
    • When doing a substructure search, all matches are now highlighted by default. To only show a single one, use single_highlight=True.
    • The Check all, Uncheck all and Invert selection buttons have been fixed. They now actually check/uncheck ALL items, and not just the ones matching the current search. A Check matching button has been added to reproduce the old behaviour.
    • If both subset and tooltip are None, the index and image will be directly displayed on the grid while the remaining fields will be in the tooltip. This makes the default representation much more readable.
    • The default number of columns is now 5 for template="table" (same as the other default template)

    Fixed

    • template="table" now correctly displays images when prerender=True (Issue #27)
    • Displaying the grid with template="table" in a notebook now automatically fits to the content of the table.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Feb 23, 2022)

    Fixes

    • Field names containing spaces are now correctly delt with
    • The text search now looks for matches inside the values of the tooltip fields, rather than inside the HTML code of the tooltip which included tags and other irrelevant text
    • Fixed an encoding bug when saving the grid as an HTML file on French Windows, which uses CP-1252 encoding instead of UTF-8
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 10, 2022)

    Added

    • cache_selection=True allows to retrieve the checkbox state when re-displaying a grid, as long as they have the same name. Fixes #22
    • prerender=False moves the rendering of molecule images from Python to the browser and only when the molecule is on the current page, giving a performance boost and allowing to process much larger files. Fixes #17
    • substruct_highlight=True highlight the atoms that matched the substructure query when using the SMARTS search (only available when prerender=False). Fixes #18
    • Added CSV save option. Exports all the data present in subset and tooltip for the current selection
    • Support for .sdf.gz files
    • Added automated tests of the interface, which should prevent future updates from breaking things

    Changed

    • Python 3.6 is no longer supported
    • Molecule images are now generated by the web browser (see prerender=False argument)
    • The coordinates of the input file are now ignored by default (use_coords=False). This change was made to comply with generating images from SMILES string with the browser by default.
    • Python callbacks are now automatically registered in Google Colab
    • Javascript callbacks can access RDKit as either RDKit or RDKitModule
    • The "img" field is now available from the callback data
    • The subset parameter now throws an error if "img" is not present
    • Clicking "Check all"/"Uncheck all" should now be faster
    • Bumped RDKit JS version to 2021.9.4 to better support moldrawoptions
    • Installation now requires jinja2>=2.11.0 to prevent an error when given a pathlib.Path object instead of a string

    Fixed

    • Callbacks now work when selection=False. Fixes: Issue #22
    • Using both transform and style should now display the labels as expected in the tooltip
    • Fixed a race condition when clicking checkboxes on different grids
    • Fixed the gap argument not being properly taken into account
    • Automatic resizing of the iframe (used in mols2Grid.display) should now work even better
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Oct 10, 2021)

    Added

    • The grid can be filtered using pandas DataFrame's query and loc logic (mostly useful to combine with ipywidgets) with MolGrid.filter_by_index and MolGrid.filter.
    • Selections can now be modified (select and unselect all, or invert) and exported (to clipboard or a SMILES file) even without a notebook kernel. Fixes: Issue #16.
    • The grid can be sorted according to the selection status and to values in the tooltips.
    • Added tracking the selection in multiple grids at the same time (i.e. it's not a global object that get's overwritten anymore).
    • Added support for executing custom JavaScript code or Python function when clicking on a molecule's image through the callback argument.
    • Added the mols2grid.make_popup_callback helper function to create a popup-like window as a JavaScript callback.
    • Added styling for the whole cell through style={"__all__": userfunction}.
    • Added mols2grid.get_selection() allowing users to specify which grid selection should be returned. Without argument, the most recently updated grid is returned.
    • Added mols2grid.list_grids() to return a list of grid names available.
    • Added the mols2grid.sdf_to_dataframe function to easily convert an SDF file to a pandas DataFrame.
    • Added the custom_css argument to pass custom CSS for the HTML document.
    • Added the sort_by argument to change how the grid elements are ordered

    Changed

    • The functions in style and transform are now also applied to tooltips.
    • The sizing of the iframe displaying the grid is now fully automated and more precise.
    • Reorganized the code to separate the JS, CSS and HTML templates.

    Fixed

    • Fixed mols2grid.save that returned an error about missing the output argument.
    • The tooltip is now compatible with the "focus" mode: tooltip_trigger="focus".
    • Fixed rendering SVG images in tooltips.

    Deprecated

    • Deprecated mols2grid.selection in favor of mols2grid.get_selection().
    • Deprecated mapping in favor of rename in the MolGrid class and mols2grid.display.
    Source code(tar.gz)
    Source code(zip)
  • v0.0.6(May 14, 2021)

  • v0.0.5(Apr 8, 2021)

    CHANGELOG

    Added

    • New transform parameter that accepts a dictionary of field-function items where each function transforms the input value that will be displayed. Fixes: Issue #10

    Fixed

    • Running mols2grid could throw an ImportError (instead of ModuleNotFoundError) if the google module was installed, but not google.colab. Solved by PR #11
    • Private molecule properties (i.e properties starting with _) were not registered when reading properties from RDKit molecules (SDF or list of mols).
    Source code(tar.gz)
    Source code(zip)
  • v0.0.4(Apr 1, 2021)

    CHANGELOG

    Changed

    • The demo notebook can now be run on Google Colab

    Fixed

    • DataFrames with NaN values would previously lead to an empty grid as NaN were converted to nan (not recognized by JS) instead of NaN.
    • Selection of molecules in Google Colab now works as expected.
    • Saved documents are now displayed properly
    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(Mar 31, 2021)

    CHANGELOG

    Added

    • SMARTS search: the "🔎" button now lets users choose between a text search or a SMARTS search. This relies on RDKit's "MinimalLib" JS wrapper which is still in beta, and will likely break at some point. Use at your own risk!
    • Sorting: added a "Sort by" button that lets users choose in which order the molecules should be listed. Default: by index. Fixes: Issue #7
    • MolDrawOptions drawing parameter: this will allow further customization of the drawing options.
    • Selection: added checkboxes to each cell. Clicking on a checkbox will add the molecule's corresponding index and SMILES to the mols2grid.selection dictionnary.
    • New input formats: dict and record (list of dicts) are automatically converted to a pandas DataFrame when used as input to the MolGrid class. The mols2grid.display function only accepts the dict option (since the list format is already used for lists of RDKit molecules).
    • New input options: mol_col parameter. Adds the ability to directly use an RDKit mol instead of relying on a SMILES intermediate. This makes using the 2D coordinates of the input mol a possibility, instead of systematically generating new ones. It also allows for adding annotations and highlights on drawings. Introduces 2 new parameters:
      • mol_col=None: Column of the dataframe containing RDKit molecules
      • use_coords=True: directly use the coordinates from each molecule, or generate new ones

    Changed

    • The "mols2grid-id" now keeps track of molecules that could not be read by RDKit. This makes relying on the index of the corresponding entry more reliable.

    Deprecated

    Removed

    Fixed

    • The "mols2grid-id" field is now correctly set in the internal DataFrame and the JavaScript List.
    • Using the search bar will now only search inside the fields listed in subset and tooltip and exclude the img field.
    • When using the display function, the height of the iframe is now automatically set based on the different parameters, instead of a fixed 600px height. Fixes: Issue #6
    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(Mar 23, 2021)

    CHANGELOG

    • Fixed NoTemplateError when installing from PyPI
    • Added wrapper functions to the save and display methods for easier usage
    • Added a search bar
    Source code(tar.gz)
    Source code(zip)
Owner
Cédric Bouysset
PhD 👨‍🔬 Chemoinformatics, Molecular Modeling & Machine Learning
Cédric Bouysset
Python module for drawing and rendering beautiful atoms and molecules using Blender.

Batoms is a Python package for editing and rendering atoms and molecules objects using blender. A Python interface that allows for automating workflows.

Xing Wang 1 Jul 6, 2022
Splore - a simple graphical interface for scrolling through and exploring data sets of molecules

Scroll through and exPLORE molecule sets The splore framework aims to offer a si

null 3 Jun 18, 2022
A central task in drug discovery is searching, screening, and organizing large chemical databases

A central task in drug discovery is searching, screening, and organizing large chemical databases. Here, we implement clustering on molecular similarity. We support multiple methods to provide a interactive exploration of chemical space.

NVIDIA Corporation 124 Jan 7, 2023
Minimal Ethereum fee data viewer for the terminal, contained in a single python script.

Minimal Ethereum fee data viewer for the terminal, contained in a single python script. Connects to your node and displays some metrics in real-time.

null 48 Dec 5, 2022
Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal)

Mandelbrot-set-Realtime-Viewer- Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal) Control: "WASD" - movement, "

null 22 Oct 31, 2022
Tidy data structures, summaries, and visualisations for missing data

naniar naniar provides principled, tidy ways to summarise, visualise, and manipulate missing data with minimal deviations from the workflows in ggplot

Nicholas Tierney 611 Dec 22, 2022
Interactive Data Visualization in the browser, from Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords hi

Bokeh 17.1k Dec 31, 2022
An interactive GUI for WhiteboxTools in a Jupyter-based environment

whiteboxgui An interactive GUI for WhiteboxTools in a Jupyter-based environment GitHub repo: https://github.com/giswqs/whiteboxgui Documentation: http

Qiusheng Wu 105 Dec 15, 2022
The interactive graphing library for Python (includes Plotly Express) :sparkles:

plotly.py Latest Release User forum PyPI Downloads License Data Science Workspaces Our recommended IDE for Plotly’s Python graphing library is Dash En

Plotly 12.7k Jan 5, 2023
Interactive Data Visualization in the browser, from Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords hi

Bokeh 14.7k Feb 13, 2021
Draw interactive NetworkX graphs with Altair

nx_altair Draw NetworkX graphs with Altair nx_altair offers a similar draw API to NetworkX but returns Altair Charts instead. If you'd like to contrib

Zachary Sailer 206 Dec 12, 2022
Interactive plotting for Pandas using Vega-Lite

pdvega: Vega-Lite plotting for Pandas Dataframes pdvega is a library that allows you to quickly create interactive Vega-Lite plots from Pandas datafra

Altair 342 Oct 26, 2022
The interactive graphing library for Python (includes Plotly Express) :sparkles:

plotly.py Latest Release User forum PyPI Downloads License Data Science Workspaces Our recommended IDE for Plotly’s Python graphing library is Dash En

Plotly 8.9k Feb 18, 2021
Interactive Data Visualization in the browser, from Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords hi

Bokeh 14.7k Feb 18, 2021
Draw interactive NetworkX graphs with Altair

nx_altair Draw NetworkX graphs with Altair nx_altair offers a similar draw API to NetworkX but returns Altair Charts instead. If you'd like to contrib

Zachary Sailer 156 Feb 6, 2021
Interactive plotting for Pandas using Vega-Lite

pdvega: Vega-Lite plotting for Pandas Dataframes pdvega is a library that allows you to quickly create interactive Vega-Lite plots from Pandas datafra

Altair 340 Feb 1, 2021
Easily convert matplotlib plots from Python into interactive Leaflet web maps.

mplleaflet mplleaflet is a Python library that converts a matplotlib plot into a webpage containing a pannable, zoomable Leaflet map. It can also embe

Jacob Wasserman 502 Dec 28, 2022
SummVis is an interactive visualization tool for text summarization.

SummVis is an interactive visualization tool for analyzing abstractive summarization model outputs and datasets.

Robustness Gym 246 Dec 8, 2022
An interactive dashboard built with python that enables you to visualise how rent prices differ across Sweden.

sweden-rent-dashboard An interactive dashboard built with python that enables you to visualise how rent prices differ across Sweden. The dashboard/web

Rory Crean 5 Dec 19, 2021