From 17d7315f32111b9ade6295a0de95c4160ee42841 Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 29 Oct 2015 09:56:37 +0000 Subject: avoid duplicated obconversion in from_smiles --- lib/compound.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compound.rb b/lib/compound.rb index 7a3dc5c..028a8cd 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -92,7 +92,8 @@ module OpenTox return nil #Compound.find_or_create_by(:warning => "SMILES parsing failed for '#{smiles}', this may be caused by an incorrect SMILES string.") else - Compound.find_or_create_by :smiles => obconversion(smiles,"smi","can") + #Compound.find_or_create_by :smiles => obconversion(smiles,"smi","can") + Compound.find_or_create_by(:smiles => smiles) end end -- cgit v1.2.3