summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-02-09 11:04:00 +0100
committerChristoph Helma <helma@in-silico.ch>2016-02-09 11:04:00 +0100
commitf61b7d3c65d084747dc1bf87214e5ec0c57326be (patch)
tree2b647dbdb563a18d4f3140cdcc26f6233e4b2fbd /lib/compound.rb
parentd6eced29e104b9bc1923b2ac89b2700a48adf07a (diff)
pls regression
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index 040fd6f..8f37247 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -38,7 +38,7 @@ module OpenTox
compound
end
- def fingerprint type="MP2D"
+ def fingerprint type=DEFAULT_FINGERPRINT
unless fingerprints[type]
return [] unless self.smiles
#http://openbabel.org/docs/dev/FileFormats/MolPrint2D_format.html#molprint2d-format
@@ -337,12 +337,14 @@ module OpenTox
end
- # Get mg from mmol
+ # Convert mg to mmol
# @return [Float] value in mg
def mmol_to_mg mmol
mmol.to_f*molecular_weight
end
+ # Convert mmol to mg
+ # @return [Float] value in mg
def mg_to_mmol mg
mg.to_f/molecular_weight
end