Collections:
"babel ... -o svg -xS" - Ball/Stick Depiction in SVG
How to generate a ball and stick depiction of a molecule in SVG with the "babel" command?
✍: FYIcenter.com
If you want to a ball and stick depiction of a molecule in SVG format,
you can use the "-o svg -xS" option with the "babel" command.
For example, the following command generate a ball and stick depiction of of the tyrosine molecule in SVG format:
fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -O tyrosine-ball-stick.svg -xS 1 molecule converted
As a comparison, running the following command generates a normal skeleton depiction of of the same molecule in SVG format:
fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -O tyrosine-skeleton.svg 1 molecule converted
Open both output files, tyrosine-skeleton.svg and tyrosine-ball-stick.svg, in a Web browser, you see the differences:
Note that "-xS" option was added in Open Babel 2.4 for SVG format.
⇒ "babel ... -o svg -xX" - Hide Implicit H in SVG
⇐ "babel ... -o svg -xi" - Show Atom Indices in SVG
2020-07-15, 1403🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1005794 Names: InChIKey: UFEOMHFPJREVTP-UHFFFAOYS A-NSMILES: CC(=O)OCC(=O)...
Molecule Summary: ID: FYI-1001829 SMILES: F/C=C/F Received at FYIcenter.com on: 2022-12-19
Molecule Summary: ID: FYI-1002821 Names: InChIKey: AVTRWXCLWDQMCF-UHFFFAOYS A-NSMILES: NS(=O)(=O)c2c...
How to convert Convert SDF to SVG (Scalable Vector Graphics) using "sdf2svg" PHP script? I want to s...
Molecule Summary: ID: FYI-1000282 SMILES: C1CCCC2(CCC1)CCCC2 Received at FYIcenter.com on: 2021-03-0...