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 02/08/2019 10:27, John Mayfield wrote:
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 isn't really set up for rendering queries.
Anyways if you want to do it just add a helper routine to sets the
implicit hydrogen counts to 0, for non aromatics you can put them
C1C[N]CN([H])C1
image.png
The radicals there are specific to the WebApp so you would just get a
plain N - I may actually make than option as I don't like it (Noel
Talked me into it).
Other option You can also use the old *BasicAtomGenerator* which never
puts hydrogens on anything...
John
On Thu, 1 Aug 2019 at 18:12, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:
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 depicting a query structure)
or I
don't want any hydrogens to be displayed?
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net <mailto:Cdk-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/cdk-user
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user