export structures into individual files

User 9b8828123a

26-10-2009 16:34:30

Dear moderator

I´m using the IJC version 3.0.4 Usually, calculation softwares demand chemical structures be uploaded in individual files (one molecule per file). I´d like to know if either IJC or JC for Excel can export this way from a file containing all structures.

Thanks in advance for your kind help,


User 2ddf1d2229

26-10-2009 17:12:48

Possibly you could do the following?

1) Export a SD file bigfile.sdf from IJC containing all data

2) Split the exported SD file into individual file using Babel (http://openbabel.org/wiki/Main_Page), something like:

babel -isdf bigfile.sdf -osdf file.sdf -m

(-m option should force output of files file1.sdf, file2.sdf, file3.sdf etc.)



ChemAxon fa971619eb

26-10-2009 17:39:19

Yes, you cannot do this directly in IJC or JC4XL, so your best option is to export to SDF and then somehow split the file into its individual molecules and give each one some meaningful file name.

We will try to add this to both products.


User 9b8828123a

26-10-2009 19:39:06

Dear Andy and Tim, I appreciate a lot your help. I´d be very useful for IJC and JC4XL users to have these utilities in a near future.

Andy, I followed your advice of checking the OpenBabel software out. However,  I can´t find the specific output format you suggested me. Would you mind to give me more explicit and specific instructions please?

Sorry for bothering, thakyou.


User 2ddf1d2229

27-10-2009 08:22:53

I specified "sdf" as the input and output options but perhaps you have to use "sd" or even "mol" instead? The page at http://openbabel.org/wiki/MDL_Molfile seems to suggest openbabel would work for SD files. You could also try removing the -i/-o flags when running the program, i.e. try:

babel bigfile.sdf file.sdf -m



User 9b8828123a

27-10-2009 09:46:10

Dear Andy,

I have run the instruction you sent me in the comand-line interface and it worked out. Thanks for your help.

Shortly after, I found a little program for automatic file conversion to SDF:

Start Notepad, and enter the following text:

@echo off
set convertto=sdf
echo Converting %~nx1 to %convertto% format
set outputfilename="%~ndp1.%convertto%"
babel.exe %1 %outputfilename%

Do you think something similar can be done for the automatic file splitting? Can you help me with this? Currently, my programing skills are too limited, I´ve just programed some symbolic and numerical calculations in matematica.


User 2ddf1d2229

27-10-2009 10:16:20

That is good that it worked, I will use that method in future too.

The small script should work in Windows as long as you append -m to the end of the line starting with babel.exe...




User 9b8828123a

27-10-2009 11:17:19


The little former script with the -m append at the and of the last line seems to work out very well...congratulations!! It´s an efficient way to convert to sdf format and split the file simultaneously.

Thanks a lot,



User 2ddf1d2229

27-10-2009 11:19:41

No problem, I learnt something too!