summaryrefslogtreecommitdiff
path: root/scripts/functional-groups-smarts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/functional-groups-smarts.rb')
-rwxr-xr-xscripts/functional-groups-smarts.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/functional-groups-smarts.rb b/scripts/functional-groups-smarts.rb
new file mode 100755
index 0000000..0fd0520
--- /dev/null
+++ b/scripts/functional-groups-smarts.rb
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+require 'csv'
+
+smarts = {}
+File.open("../functional-groups.txt").each_line do |row|
+ name,sma = row.chomp.split ": "
+ smarts[name] = "'#{sma}'"
+end
+
+names = []
+CSV.foreach("../data/functional-groups-reduced4R.csv") do |row|
+ names << row[0].gsub(" ", "_")
+end
+names.uniq.each{|name| puts [name,smarts[name]].join ","}