summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2015-08-24 12:17:07 +0200
committerChristoph Helma <helma@in-silico.ch>2015-08-24 12:17:07 +0200
commit8c6c59980bc82dc2177147f2fe34adf8bfbc1539 (patch)
tree35fb78389a9ac2d54d4d2190c41a8269a754f205 /lib/compound.rb
parent398d8ca681db3aa0a0552eee026705e60dd8449d (diff)
Model::Prediction with tests, initial indexesv0.0.8
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index c0d6536..fa57aff 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -22,6 +22,8 @@ module OpenTox
field :fp4, type: Array
field :fp4_size, type: Integer
+ index({smiles: 1}, {unique: true})
+
# Overwrites standard Mongoid method to create fingerprints before database insertion
def self.find_or_create_by params
compound = self.find_or_initialize_by params