From 8c973e16028cb95c978bb08cf79369a5c3520c31 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Sun, 28 Feb 2016 12:43:38 +0100 Subject: physchem feature class --- test/feature.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/feature.rb') diff --git a/test/feature.rb b/test/feature.rb index 69204ab..9a8a056 100644 --- a/test/feature.rb +++ b/test/feature.rb @@ -55,4 +55,20 @@ class FeatureTest < MiniTest::Test assert original.smarts, "CN" end + def test_physchem_description + assert_equal 355, PhysChem.descriptors.size + assert_equal 330, 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 -- cgit v1.2.3