Hi team,
The latest version of Datagrok, which now seems to persist the RDKit-based structure rendering on horizontal scrolling (Thanks @dskatov), is now omitting the cell borders:
Hi team,
The latest version of Datagrok, which now seems to persist the RDKit-based structure rendering on horizontal scrolling (Thanks @dskatov), is now omitting the cell borders:
It seems like itâs even omitting the column headers at certain scroll positions and flickering when scrolling fast.
Hi @nico.pulver.novartis.com, thanks for reporting the issue! It may have to with the way we round the coordinates for the RDKit input, indeed, letâs check this up together today with your reproduction.
The flickering issue is definitely there (this is due to the RDKit renderer currently being a lot slower than OpenChemLibâs - there are ways to alleviate that by caching constructed molecules and/or rendered images, but first we want to find out the bottleneck and hopefully fix the root of the issue).
We have not seen the disappearing borders yet - I wonder if you experience the same issue on our dev instance? Whatâs your environment?
The flickering occurred on the column headers, not the structure depiction.
What information about the environment do you want me to share?
Browser version, OS, system font magnification settings, browser zoom level. Oh, and are borders completely gone, not just around molecules, but work fine on datasets without the molecules? Is the rest of the content missing as well or you cleaned it? Canât tell from your picture for sure since itâs âanonymizedâ. If this is the case I have an idea, Is there anything in the console? Indeed letâs see it in person later today.
Hey @nico.pulver.novartis.com, weâve discovered what may be happening out there. Following the screenshot, you are doing an R-group analysis. Are your smiles there recorded as something like â[R1]=NNC(=O)COc1cccc2ccccc12â? If so, it turns out WASM RdKit doesnât handle such input with the R-group index, thus producing an internal exception and in the course of this exception occurring â corrupting the rendered grid. Please let me know what kind of stuff you have there in R1 and R2 columns. Then Iâd find a strategy to deal with this. Thanks!
Hi Dan
The R group decomposition is performed outside of Datagrok and the results are directly written with the rest of the data to the dataframe.
The R group decomposition is done using RDKit and produces following notation:
Cc1cc(C(F)(F)F)cc(O)c1-[*:2]
Which is of course working fine with RDKit and also renders just fine.
The question is really if the issue I reported above is still occurring with the latest Datagrok and Chem package version. Letâs do more testing and see if I can reproduce this at all again.
It seems like we are still facing this issue with the latest version of Datagrok and Chem package, you deployed last week:
Hey Nico, thanks for the report! The exception is exactly the RDKitâs exception, which appears presumably for the case where the RDKit molecule is constructed from a smiles (or other notation such as MolBlock) which it doesnât properly handle. One example is a notation such as â[R1]âŚâ, with R-group index in such form with the brackets in the beginning of the smiles record. Another case which we met is an empty line before or after the MolBlock text, where RDKit crashes too.
Please let us know what there is and weâd manage to handle it in some way, or address this via RDKit. It may turn out so that not all âfull RDKitâ capabilities for parsing molecule inputs are supported in WASM RDKit (MinimalLib). Though I canât be 100% certain about it until we see more samples to reproduce.
Hi Dan, the MinimalLib supports the same SMILES and MDL block parsing capabilities as the C++ RDKit library.
The RDKit will not parse things like
Chem.MolFromSmiles("[R1]CCCC")
RDKit ERROR: [14:38:50] SMILES Parse Error: syntax error while parsing: [R1]CCCC
RDKit ERROR: [14:38:52] SMILES Parse Error: Failed parsing SMILES â[R1]CCCCâ for input: â[R1]CCCCâ
as well as MolBlocks preceded by an empty line:
AssertionError
But it will accept MolBlocks followed by an empty line:
assert(Chem.MolFromMolBlock(Chem.MolToMolBlock(Chem.MolFromSmiles(âCCCâ)) + â\nâ))
However the SMILES that Nico used doesnât have any [R#] notation.