summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
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 615ea6e..4436e9d 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -4,6 +4,8 @@ require 'openbabel'
class Compound
DEFAULT_FINGERPRINT = "MP2D"
+ attr_reader :smiles, :fingerprints
+
def initialize smiles
@smiles = smiles
@fingerprints = {}
@@ -123,10 +125,10 @@ class Compound
# Create a compound from SDF
# @param [String] SDF
- # @return [OpenTox::Compound]
+ # @return [Compound]
def self.from_sdf sdf
# do not store sdf because it might be 2D
- Compound.from_smiles obconversion(sdf,"sdf","can")
+ self.new obconversion(sdf,"sdf","can")
end
# Create a compound from name. Relies on an external service for name lookups.