diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-07-28 15:22:53 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-07-28 15:22:53 +0200 |
commit | dbf513ce686f1c0db1ed2d6af1fa96c86352e709 (patch) | |
tree | 80cf2510ef279f0a6211ae129604a203e31470e1 /application.rb |
initial commit
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/application.rb b/application.rb new file mode 100644 index 0000000..09f3188 --- /dev/null +++ b/application.rb @@ -0,0 +1,21 @@ +require 'sinatra' +require "sinatra/reloader" +require "haml" +require 'yaml' +require "./pubchem.rb" +also_reload './pubchem.rb' + +get '/?' do +=begin + @compound = PubChem::Compound.new + smiles = "OC(=O)C1=C(C=CC=C1)OC(=O)C" + #smiles = "c1cc(CC)ccc1" + #smiles = "CC(=O)Nc1ccc(O)cc1" + smiles = "C1=CC(=C(C=C1Cl)Cl)OCC(=O)O" + #@compound.from_smiles smiles + @compound.get_neighbors smiles + File.open("compound.yaml","w+"){|f| f.puts @compound.to_yaml} +=end + @compound = YAML.load_file "compound.yaml" + haml :index +end |