summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--application.rb2
-rw-r--r--views/predict.haml3
2 files changed, 3 insertions, 2 deletions
diff --git a/application.rb b/application.rb
index c155d1f..3b88700 100644
--- a/application.rb
+++ b/application.rb
@@ -360,7 +360,7 @@ post '/predict/?' do # post chemical name to model
redirect url_for('/predict')
end
begin
- @compound = OpenTox::Compound.from_name(params[:identifier])
+ @compound = OpenTox::Compound.from_smiles(params[:identifier])
rescue
flash[:notice] = "Could not find a structure for '#{@identifier}'. Please try again."
redirect url_for('/predict')
diff --git a/views/predict.haml b/views/predict.haml
index ec667e6..7d5e30a 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -23,7 +23,8 @@
%a{:href => 'http://www.molinspiration.com/jme/index.html', :rel => "external"} JME Editor
courtesy of Peter Ertl, Novartis</span>
%br
- %label{:for => 'identifier'} or enter a Name, InChI, Smiles, CAS, ...
+ -# %label{:for => 'identifier'} or enter a Name, InChI, Smiles, CAS, ...
+ %label{:for => 'identifier'} or enter a Smiles string
%input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'}
%br
%fieldset