-
-
Save maasha/62ffc5caa4eee1d750c49a2c0e883b60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pp' | |
require 'open3' | |
entries = File.open('/Users/iehdk/install/src/chem-O-matic/data/mega.sdf').read.split("$$$$") | |
entries.each do |entry| | |
Open3.popen3("obabel -i sdf -o smi") do |stdin, stdout, stderr, wait_thr| | |
entries.each do |entry| | |
stdin.puts entry | |
stdin.close | |
stdout.each_line { |line| puts line } | |
end | |
puts wait_thr.value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment