cbouy / mols2grid

Interactive molecule viewer for 2D structures

Home Page:https://mols2grid.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

slochower opened this issue · comments

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

I should add that I'm calling mols2grid.display using a pandas dataframe and passing the SMILES column as an argument:

mols2grid.display(
    df,
    fixedBondLength=25,
    smiles_col="SMILES",
    coordGen=True,
    template="table",
)

Hmm that's unfortunate! Can you check on Chrome's console if their are any errors?

I had the same problem when I had a "nan" in the data frame.

Ah, yes. I think it might be related to nan in the dataframe. I think this is the relevant snippet:

image

I've just published a fix in v0.0.4 which should fix the NaN issue, can you try it ?

Perfect.