Python reading smiles and render to POVRay

Hello,

Im a newbie to Avogadro so I apologise if this is a really silly
question. Im really interested in using the python binding to Avogadro
to render 3d structures from smiles using POVRay.

I was wondering if someone might be able to give me some tips or hints
on how to get started. Ive been looking through the C++ API but am
finding it a bit difficult to translate it into python commands that I
can use. The scripting page is helpful but I was wondering if there
were a few examples of a full script?

Thanks,
Steve

12.08.10, 17:32, “Steve Henshaw” steve.henshaw@gmail.com:

Hello,

Im a newbie to Avogadro so I apologise if this is a really silly
question. Im really interested in using the python binding to Avogadro
to render 3d structures from smiles using POVRay.

Hi Steve,
If you want to render many structures at once, you’d better used OpenBabel directly - load SMILES and save it to POV-Ray format, than call POV-Ray. OpenBabel has Python API, or you can use command line parameters


Regards,
Konstantin

Hi Konstantin,

Thanks for replying :slight_smile:

Ive been playing around with OpenBabel but the pov export from it is a
little shaky… it defines a pov file that contains references to an
include file (seems to be like a C preprocessor to me) that translates
between atoms and spheres etc. It hasnt been worked on for about 3
years as far as I can tell, Ill drop them a line about it but as
Avogadro (from looking through the code) generates the scene for povray
itself I was hoping to use Avogadro :slight_smile:

Thanks,
Steve

On 12/08/10 14:37, Konstantin Tokarev wrote:

12.08.10, 17:32, "Steve Henshaw"steve.henshaw@gmail.com:

Hello,

Im a newbie to Avogadro so I apologise if this is a really silly
question. Im really interested in using the python binding to
Avogadro to render 3d structures from smiles using POVRay.

Hi Steve, If you want to render many structures at once, you’d better
used OpenBabel directly - load SMILES and save it to POV-Ray format,
than call POV-Ray. OpenBabel has Python API, or you can use command
line parameters