I want to convert mol
files to InChiKey
. I am using OpenBabel
for the conversion but I have over 500
mol files and converting them one by one is too time consuming. Is there some way to convert them all at once?
Edit 1 This is a sample mol file
0187.cdx
Sample
8 8 0 0 0 0 0 0 0 0999 V2000
-0.4125 0.7145 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.8250 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.4125 -0.7145 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.4125 -0.7145 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
0.8250 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.4125 0.7145 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
-1.6500 0.0000 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0
1.6500 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 0
2 3 1 0
3 4 2 0
4 5 1 0
5 6 2 0
6 1 1 0
2 7 1 0
5 8 1 0
M END
Also I want to know is there some other format which can combine mol files into one.I think I had heard of another format like mol
which can combine many mol files,but I cannot remember the name of that format
Edit 2- What is SDF
format? Can it combine many mol files into one?
for i in $(ls *.mol); do name=${i%.mol}; babel -imol $i -oinchi $name.inchi; done
$\endgroup$for i in *.mol; do ...
should also work ;) $\endgroup$