summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-10-13 10:11:09 +0200
committerChristoph Helma <helma@in-silico.ch>2016-10-13 10:11:09 +0200
commit8d325866dd7cacdd04bd2306a9144a5e7300c7c8 (patch)
tree5e730f20a26e58e41cdff9c22bd5647c886ca834 /lib/compound.rb
parent1810b12e7faf2f0677482a3c7a8c23e0e11b8d29 (diff)
molecular_weight fixed
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index 0f178ce..ca9d5e3 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -75,9 +75,10 @@ module OpenTox
fingerprints[type]
end
- def calculated_properties types=["OPENBABEL"]
+ def calculated_properties types=["PhysChem::OPENBABEL"]
descriptors = []
types.each do |t|
+ p t
descriptors += PhysChem.descriptors OpenTox.const_get(t)
end
# TODO: speedup java descriptors
@@ -304,7 +305,7 @@ module OpenTox
# @return [Float] molecular weight
def molecular_weight
mw_feature = PhysChem.find_or_create_by(:name => "Openbabel.MW")
- calculated_physchem([mw_feature])[mw_feature.id.to_s]
+ calculated_properties[mw_feature.id.to_s]
end
private