summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2015-08-19 14:17:44 +0200
committerChristoph Helma <helma@in-silico.ch>2015-08-19 14:17:44 +0200
commit4fb010f4c0f30e5b23d39e191ce36587827f8f4e (patch)
tree144098b705eb20ae4ebd3aa12f67da19befb5db8
parent57bb9c2c691d350dce8c30b862030973043818cc (diff)
name conversion fixedv1.0.0beta1
-rw-r--r--lib/compound.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index 6d755da..c0d6536 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -75,7 +75,7 @@ module OpenTox
# @return [OpenTox::Compound] Compound
def self.from_sdf sdf
# do not store sdf because it might be 2D
- Compound.find_or_create_by :smiles => obconversion(sdf,"sdf","can")
+ Compound.from_smiles obconversion(sdf,"sdf","can")
end
# Create a compound from name. Relies on an external service for name lookups.
@@ -84,7 +84,7 @@ module OpenTox
# @param name [String] can be also an InChI/InChiKey, CAS number, etc
# @return [OpenTox::Compound] Compound
def self.from_name name
- Compound.find_or_create_by :smiles => RestClientWrapper.get(File.join(CACTUS_URI,URI.escape(name),"smiles"))
+ Compound.from_smiles RestClientWrapper.get(File.join(CACTUS_URI,URI.escape(name),"smiles"))
end
# Get InChI