summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-10-13 19:48:21 +0200
committerChristoph Helma <helma@in-silico.ch>2016-10-13 19:48:21 +0200
commit2dc66aef3b7932105868ee8c7d32ad975e142d1b (patch)
treed7c7e4bec5e931eda0ccf04a343f0ca3015e3b60 /lib/compound.rb
parent160e75e696452ac61e651664ac56d16ce1c9c4b6 (diff)
compound tests fixed
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index b47364c..6c53cde 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -300,9 +300,8 @@ module OpenTox
# Calculate molecular weight of Compound with OB and store it in object
# @return [Float] molecular weight
def molecular_weight
- mw_feature = PhysChem.find_or_create_by(:name => "Openbabel.MW").id.to_s
- calculate_properties unless properties[mw_feature]
- properties[mw_feature]
+ mw_feature = PhysChem.find_or_create_by(:name => "Openbabel.MW")
+ calculate_properties([mw_feature]).first
end
private