summaryrefslogtreecommitdiff
path: root/test/feature.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-05-09 15:51:50 +0200
committerChristoph Helma <helma@in-silico.ch>2016-05-09 15:51:50 +0200
commita18218bd1586edd8097729d242abb8947d6988df (patch)
treee94ac3bffb25751ed7e11a626ddde8b96f1de816 /test/feature.rb
parente2e7045c3efeb59dd650b78772009281e7fa56a0 (diff)
parent0b416e3b55a9256915a2427afe5bc112bcabc203 (diff)
development branch mergedv0.9.3
Diffstat (limited to 'test/feature.rb')
-rw-r--r--test/feature.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/feature.rb b/test/feature.rb
index 69204ab..c224e41 100644
--- a/test/feature.rb
+++ b/test/feature.rb
@@ -55,4 +55,23 @@ class FeatureTest < MiniTest::Test
assert original.smarts, "CN"
end
+ def test_physchem_description
+ assert_equal 355, PhysChem.descriptors.size
+ assert_equal 15, PhysChem.openbabel_descriptors.size
+ assert_equal 295, PhysChem.cdk_descriptors.size
+ assert_equal 45, PhysChem.joelib_descriptors.size
+ assert_equal 310, PhysChem.unique_descriptors.size
+ end
+
+ def test_physchem
+ assert_equal 355, PhysChem.descriptors.size
+ c = Compound.from_smiles "CC(=O)CC(C)C"
+ logP = PhysChem.find_or_create_by :name => "Openbabel.logP"
+ assert_equal 1.6215, logP.calculate(c)
+ jlogP = PhysChem.find_or_create_by :name => "Joelib.LogP"
+ assert_equal 3.5951, jlogP.calculate(c)
+ alogP = PhysChem.find_or_create_by :name => "Cdk.ALOGP.ALogP"
+ assert_equal 0.35380000000000034, alogP.calculate(c)
+ end
+
end