From ca2bb0f90335b1f2c4ecc28ee423e85b281ffcf0 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 4 Nov 2015 17:50:17 +0100 Subject: neighbor search delegated to database backend --- test/compound.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test/compound.rb') diff --git a/test/compound.rb b/test/compound.rb index 22c152b..ff20c1c 100644 --- a/test/compound.rb +++ b/test/compound.rb @@ -162,7 +162,7 @@ print c.sdf end def test_fingerprint_db_neighbors - skip + #skip training_dataset = Dataset.from_csv_file File.join(DATA_DIR,"EPAFHM.csv") [ "CC(=O)CC(C)C#N", @@ -170,8 +170,18 @@ print c.sdf "C(=O)CC(C)C#N", ].each do |smi| c = OpenTox::Compound.from_smiles smi + t = Time.now neighbors = c.db_neighbors(:training_dataset_id => training_dataset.id, :min_sim => 0.2) - p neighbors + p Time.now - t + t = Time.now + neighbors2 = c.fingerprint_neighbors({:type => "MP2D", :training_dataset_id => training_dataset.id, :min_sim => 0.2}) + p Time.now - t + p neighbors.size + p neighbors2.size + #p neighbors + #p neighbors2 + #p neighbors2 - neighbors + #assert_equal neighbors, neighbors2 end end end -- cgit v1.2.3