How to convert a large number of SMILES to 2D sdf format?

47 views
Skip to first unread message

Andrew Orry

unread,
May 7, 2018, 5:33:43 PM5/7/18
to MolSoft ICM Knowledge Base
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
#----------------------------------------------------------- 

Reply all
Reply to author
Forward
0 new messages