summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-04-12 12:37:37 +0200
committerChristoph Helma <helma@in-silico.ch>2016-04-12 12:37:37 +0200
commit84222bae2bbb9fb3e0ce3e65de1be8e7f94d2147 (patch)
tree3e041cfe44dd0bb97b261a7f10e7e44bc2dca080 /lib/compound.rb
parent515e644423998a94f07be06bf6460bcf4f96f968 (diff)
new dataset structure
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index a7518ed..84d8891 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -2,10 +2,8 @@ CACTUS_URI="http://cactus.nci.nih.gov/chemical/structure/"
module OpenTox
- class Compound
+ class Compound < Substance
require_relative "unique_descriptors.rb"
- include OpenTox
-
DEFAULT_FINGERPRINT = "MP2D"
field :inchi, type: String
@@ -347,14 +345,14 @@ module OpenTox
end
- # Convert mg to mmol
+ # Convert mmol to mg
# @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
+ # Convert mg to mmol
+ # @return [Float] value in mmol
def mg_to_mmol mg
mg.to_f/molecular_weight
end