Hi there Ana,

If you just need a file translator, you might want to consider using Open
Babel directly: http://openbabel.org/wiki/Main_Page

Avogadro uses Open Babel for a lot of its file translations. After you
compile/install open Babel and get the executables, you just need to run
something like:

obabel -icml -osmi -OoutputFilename

Whatever after -i is the input file type. After -o is output file type, and
I believe after -O is output file name.

https://openbabel.org/docs/dev/Command-line_tools/babel.html

You would be able to write a python script and use subprocess to run this
command multiple times.

Patrick

On Tuesday, June 28, 2016, Anastasya Karchevskaya <alsal...@me.com> wrote:

>
> I wish I could use Avogadro from the terminal, either Windows or Linux. I
> don’t need GUI and actually need to use Avogadro as a file translator for
> 100K files (approximately), avogadro reads my file properly and is able to
> save it as smiles (as the test has shown), but I need somewhat like:
>
> for file in folder…
>
>
> I can write Python scripts as well, but I just don’t get it from the
> instructions: a) how to start python console in Avogadro b) How to open
> file and save it?
>
> If it is a Python script I would do somewhat like:
>
> import os
>
> folderInp = “blablabla1”
> folderOutp = “blablabla2”
>
> for fileMol2 in os.listdir(folderInp):
>
> file = Avogadro.open(folderInp + fileMol2)
> newPath = folderOutp + fileMol2.split(‘.mol2’)[0] + ‘.smi'
> fileSave = Avogadro.save(“.smi”, file, newPath)
>
> But I don’t know how to do that in Avogadro/with Avogadro?
>
> Here is what I have ion settings:
>
>
> And here’s what I have in the toolbox:
>
>
> So there’s no Python Console. O_O
>
> Thank you,
>
> Regards,
>
> Ana
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Avogadro-Discuss mailing list
Avogadro-Discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-discuss

Reply via email to