Q.
I need to convert 5 Million SMILES strings to SDF format. What is the best way to do this?
A.
You need to read and convert it by chunks because 5M will not fit into the memory of your computer. You can use the following script
#-----------------------------------------------------------
l_commands = no
delete system "My_5M_DB.sdf"
while (yes)
read table separator = "\t" "/data/My_5M_DB.smi" keep header
limit=10000 name="t"
if (l_out) break
add column t Chemical( t.SMILES ) name="mol" index=1
write table t mol append "My_5M_DB.sdf"
endwhile
quit
#-----------------------------------------------------------