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,
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.)
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.
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.
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
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 Converting %~nx1 to %convertto% format
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.
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...
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,
No problem, I learnt something too!