Collections:
"babel ... -o svg -xX" - Hide Implicit H in SVG
How to hide those H symbols (Hydrogen symbols) implicitly added to non-carbon terminal atoms in SVG with the "babel" command?
✍: FYIcenter.com
If you want to hide those Hydrogen symbols implicitly added to non-carbon terminal atoms in SVG format,
you can use the "-o svg -xX" option with the "babel" command.
Here is how the "-xX" option is described in Open Babel help document: "X - All atoms are explicitly declared. Useful if we don't want any extra hydrogens drawn to fill the valence."
For example, the following command generate a SVG picture with no implicit hydrogen symbols for the tyrosine molecule:
fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -O tyrosine-no-hydrogen.svg -xX 1 molecule converted
As a comparison, running the following command generates a SVG picture with implicit hydrogen symbols of the same molecule:
fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -O tyrosine.svg 1 molecule converted
Open both output files, tyrosine.svg and tyrosine-no-hydrogen.svg, in a Web browser, you see the differences:
Note that "-xX" option was added in Open Babel 2.4 for SVG format.
⇒ "babel ... -o svg -xC" - Hide Terminal C in SVG
⇐ "babel ... -o svg -xS" - Ball/Stick Depiction in SVG
2020-07-22, 1954🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1005395 Names: InChIKey: CMWKITSNTDAEDT-UHFFFAOYS A-NSMILES: O=Cc1ccccc1N(...
Molecule Summary: ID: FYI-1003944 Names: InChIKey: FZEPXXHITBIOIY-UHFFFAOYS A-NSMILES: Fc3ccc(c2ccc1...
Molecule Summary: ID: FYI-1001181 SMILES: CO/C(=C\\c1ccc(O)c(OC)c1 )C(=O)NCCc2c[nH]cn2Received at FY...
Molecule Summary: ID: FYI-1004135 Names: InChIKey: XWFCFMXQTBGXQW-GOSISDBHS A-NSMILES: O=C(O)c6cn(C1...
Molecule Summary: ID: FYI-1002828 Names: InChIKey: GAHQYTUGPPZEML-BNZHPNKGS A-NSMILES: C/C(/C=C/C(=O...