|
From: Noel O'B. <bao...@gm...> - 2009-03-04 18:01:57
|
Hello Michael,
Regarding the GUI, I'll let Chris answer.
File names with spaces require quotation marks around them. This is a
feature of the Windows command line, not babel. You will have a
similar problem on Linux, except that the spaces will need to be
escaped instead.
I'm sure there's a way to do what you want using the Windows command
line, but for me it's easier to use Python. If you install the Python
module, the following code should work:
import pybel
import glob
smiles = []
for molfile in glob.glob("*.mol"):
mol = pybel.readfile("mol", molfile).next() # Assuming a single molecule
mol.title = molfile
smiles.append(mol.write("smi"))
print >> open("result.smi", "w"), "".join(smiles)
- Noel
2009/2/27 Michael Fisher <mf...@ta...>:
> I’ve started using the OpenBabel GUI. I have two directories with .mol
> files I want to get SMILES strings for. One has about 3500 files, the other
>>13000. There appears to be an input file limit of about 700 files.
> Obviously, I could do 700 at a time, but I then have to concatenate all the
> files (at least twenty for the big directory). Am I right that there’s a
> limit? Is there a way to get around it?
>
>
>
> FYI, the filenames contain numerous spaces, periods and commas, so the
> command line version of babel (which I’ve tried) crashes. Also, I’m
> presently stuck doing this in Windows XP. If I switch to Fedora, will the
> command line version ignore punctuations? Will there still be a limit on
> input files in the GUI?
>
>
>
> Mike
>
>
>
> ________________________________
> IMPORTANT NOTICE: TAKASAGO DISCLAIMER This e-mail may be confidential and/or
> subject to legal privilege, and is for the use of the intended addressee
> only. Any unauthorized use, dissemination, or copying of the information in
> this message is strictly prohibited. If you have received this message in
> error, please notify the sender immediately and delete this message.
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> OpenBabel-discuss mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
|