Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mols2grid #17

Open
arifin-chemist89 opened this issue Jun 1, 2021 · 4 comments
Open

Add mols2grid #17

arifin-chemist89 opened this issue Jun 1, 2021 · 4 comments

Comments

@arifin-chemist89
Copy link
Collaborator

arifin-chemist89 commented Jun 1, 2021

Chemical gallery viewer seems very interested.
Example: https://github.com/cbouy/mols2grid

Do you think it is possible to add it to panel-chemistry?

@MarcSkovMadsen
Copy link
Collaborator

Sure.

The first thing to determine is if this is something that needs to be displayed only or if it needs bidirectional communication.

If its the first then the job is to determine how to get the html to display in a HTML pane. If its the second then its more complicated and involves a custom bokeh model.

As far as I can see this is something to display only.

image

Looking at the MolGrid.display function can give inspiration for how to display this in Panel.

image

I see two ways of "including" it in panel-chemistry. 1) We just create an example notebook showing how to use this with Panel. 2) We create a MolGrid pane that can take a molds2grid.MolGrid as input. What would you prefer @arifin-chemist89 ?

@MarcSkovMadsen
Copy link
Collaborator

Could you describe you use case and requirement some more @arifin-chemist89? This can be done in many ways. If you could write some pseudo example code of how you would like this to work. Maybe with an image or two. That would guide me the best.

@arifin-chemist89
Copy link
Collaborator Author

Thanks @MarcSkovMadsen for quick response.

There are some of use cases for it that I can imagine.

  1. If we have a list of SMILES, we could display it with mols2grid, then some structures then use the sub list for other purposes (for example to plot the properties of those molecules, created the dataset of the selected molecules).
  2. With JSME editor that you have included to the panel-chemistry, we could build the lists of SMILES that obtained from JSME, and then show the gallery by using mols2grid.
  3. Hovering over the images or button click on the image to show the 3D structures by NGL.

@arifin-chemist89
Copy link
Collaborator Author

Hi @MarcSkovMadsen, as you said, it is really easy to render it through panel's HTML pane. However, since the callback seems important, I prefer to have MolGrid pane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants