summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
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