diff options
author | gebele <gebele@in-silico.ch> | 2015-10-29 09:56:37 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2015-10-29 09:56:37 +0000 |
commit | 17d7315f32111b9ade6295a0de95c4160ee42841 (patch) | |
tree | 013cb12f4ffaa670e77dae169f814d9a01abe5fa /lib/compound.rb | |
parent | de68ec507750a9b0878188400f5d01bd32569d70 (diff) |
avoid duplicated obconversion in from_smiles
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |