From 8c6c59980bc82dc2177147f2fe34adf8bfbc1539 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 24 Aug 2015 12:17:07 +0200 Subject: Model::Prediction with tests, initial indexes --- lib/compound.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/compound.rb') 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 -- cgit v1.2.3