The process of creating 2D depictions is explained in detail here. This way, it is possible to create a 2D image via running e.g.
obabel -O 2d_depiction.png
However, how do I generate a ball and stick 3d depiction (as image) instead?
Chemistry Stack Exchange is a question and answer site for scientists, academics, teachers, and students in the field of chemistry. It only takes a minute to sign up.Sign up to join this community
Open Babel does not generate "ball and stick 3D depictions" directly, because it's not a molecular visualization program.
That's why we started Avogadro.
There are a few formats supported in Open Babel to write out 3D depictions, e.g.:
But you can make a pseudo-3D "ball and stick" depiction in the SVG format:
obabel [file] -O file.svg -xS