When I place the hydrogen adder in front of 2D coordinate generation followed by Interactive Table View (or HTML report), the structures no longer show hetero-atom types. All the previously illustrated and colored oxygen and nitrogen atoms are simple black stick diagrams (like carbon).
I wasn't able to reproduce this behavior. The structure diagrams show the right atoms even if the hydrogen adder node was before the 2D coordinates node. I have used Smiles and SDF molecules as input. Maybe the file your are using is causing this strange behavior?
I'm unclear on how the input file would cause the effect. I've reproduced this with multiple SD files. I'm certain that none of them have hydrogens in the SD file - could that be the issue?? Seems odd that the oxygens and nitrogens would fail to display. I'll try to get a screen shot of the workflow and the results I'm getting.
Here are some screenshots of my workflow and the results I'm getting.
First, here is a shot of the workflow itself:
If you follow the upper flow in which no hydrogens are added, the Interactive View looks like this:
If you follow the lower flow in which hydrogens are added, the Interactive View looks like this:
Could you try to convert the CDK molecules (with 2D coordinates) back into SDF (using the CDK->SDF node) and check if the hetero atoms are really gone or if it is only a problem with the renderer?
I'm out on vacation right now - no access to my KNIME computer. I'll give that a try when I return and report the results...
I apologize for the delay. I put in a CDK to SDF node followed by an Interactive Table at various points in the workflow - before the Hydrogen Adder, after the Hydrogen Adder, and after the 2D Coordinates node. In all cases the heteroatoms in the displayed MOL file blocks were intact.
Ah, OK. So it is very likely a problem with the renderer. I will have a look at it next week when I'm back in the office.
Let me know if I can do any more tests or evaluations.
So far I have found a simple workaround: If you force the 2D Coordinates node to generate coordinates in the dialog, the molecules look fine again. It has to do something with the coordinates on the freshly added hydrogen atoms.
I expected that the structure depictions would contain the hydrogens as well, but they are absent. Is that the expected behavior? It would be nice to depict polar hydrogens (OH, NH, NH2, etc) in the absence of others.
Thank you for following up so well with all my requests!!
The hydrogens are purposely not display. Currently we have no way to set options on cell renderers. Thus the CDK renderer would always display the hydrogens or never. We decided for "never" as most of the time the hydrogens are not of interest. The only thing I can think of is a global option in the KNIME/CDK preferences which would affect your whole workspace. Or we provide a special node with a view where the user can change several render settings.
For my purposes, the global option affecting the whole workspace would be fine. I have never had a situation where I want to view one structure differently from any other. Typically I want them all the same, so a global options works well. Back to hydrogens, I agree that all hydrogens is too much, but polar hydrogens would be nice.
Back to hydrogens, I agree that all hydrogens is too much, but polar hydrogens would be nice.
The CDK renderer has only the option to show explicit and/or implicit hydrogens but not polar ones. I will ask the CDK developers if it is possible to add an option for polar hydrogens.