Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread John Mayfield
I think you probably want this: new DepictionGenerator().withParam(StandardGenerator.Visibility.class, new SymbolVisibility() { @Override public boolean visible(IAtom atom, List

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread Tim Dudgeon
On 02/08/2019 15:42, John Mayfield wrote: 1. explicit hydrogens are also not rendered Er... I showed the example with the explicit hydrogens being rendered. Let's clarify, what does "explicit hydrogen" mean to you? Sorry, my mistake. The explicit H is displayed. I was getting mixed up

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread John Mayfield
> > 1. explicit hydrogens are also not rendered Er... I showed the example with the explicit hydrogens being rendered. Let's clarify, what does "explicit hydrogen" mean to you? > 2. Carbon symbols are displayed (as if the withCarbonSymbols() method had > been called). The "Visibility" option

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread Egon Willighagen
On Fri, Aug 2, 2019 at 11:28 AM John Mayfield wrote: > Other option You can also use the old *BasicAtomGenerator* which never > puts hydrogens on anything... > Documentation on the old generator stack can be found in this copy of the Groovy CDK book, "Depiction" chapter:

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread Tim Dudgeon
Hi John, Iterating the atoms and setting the implicit H count to zero does hide the implicit hydrogens but results in two nasty side effects: 1. explicit hydrogens are also not rendered 2. Carbon symbols are displayed (as if the withCarbonSymbols() method had been called). Tim On

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread John Mayfield
It's not an option - and I would hesitant to add it as it's "at best ambiguous" (quoting Brecher's IUPAC :-)). Symyx/Accelrys/BioVia Draw like to hide the hydrogens by default which is where I think the acceptability crept in from. You right that for queries there's a use-case, but the depiction

[Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-01 Thread Tim Dudgeon
Can someone point to examples of how to control the display of hydrogens when depicting using DepictionGenerator? It looks like implicit hydrogens are displayed on terminal and hetero atoms which is not unreasonable, but what if I ONLY want explicit hydrogens to be displayed (e.g. when