Пример #1
0
        public void TestCalculateBondPolarizability_IAtomContainer_IBond()
        {
            var    sp     = CDK.SmilesParser;
            var    mol    = sp.ParseSmiles("NCCN(C)(C)");
            double result = Polarizability.CalculateBondPolarizability((IAtomContainer)mol, mol.Bonds[0]);

            Assert.IsFalse(double.IsNaN(result));
        }
Пример #2
0
        public void TestCalculateGHEffectiveAtomPolarizability_Ethyl_chloride()
        {
            double testResult = 4.62; /* from thesis Wolfgang Hanebeck, TUM */
            var    sp         = CDK.SmilesParser;
            var    mol        = sp.ParseSmiles("CCCl");
            double result     = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[2], 100, true);

            Assert.AreEqual(testResult, result, 0.01);
        }
Пример #3
0
        public void TestCalculateKJMeanMolecularPolarizability()
        {
            double testResult = 2.61;
            var    sp         = CDK.SmilesParser;
            var    mol        = sp.ParseSmiles("C");
            double result     = Polarizability.CalculateKJMeanMolecularPolarizability(mol);

            Assert.AreEqual(testResult, result, 0.01);
        }
Пример #4
0
        public void TestCalculateGHEffectiveAtomPolarizability_Allyl_mercaptan()
        {
            double testResult = 6.25; /* from thesis Wolfgang Hanebeck, TUM */
            var    sp         = CDK.SmilesParser;
            var    mol        = sp.ParseSmiles("C=CCS");
            double result     = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[3], 100, true);

            Assert.AreEqual(testResult, result, 0.01);
        }
Пример #5
0
        public void TestCalculateGHEffectiveAtomPolarizability_Isopentyl_iodide()
        {
            double testResult = 8.69; /* from thesis Wolfgang Hanebeck, TUM */
            var    sp         = CDK.SmilesParser;
            var    mol        = sp.ParseSmiles("C(C)(C)CCI");
            double result     = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[5], 100, true);

            Assert.AreEqual(testResult, result, 0.01);
        }
Пример #6
0
        public void TestGetPolarizabilitiyFactorForAtom_IAtomContainer_IAtom()
        {
            var    sp     = CDK.SmilesParser;
            var    mol    = sp.ParseSmiles("NCCN(C)(C)");
            double result = Polarizability.GetPolarizabilitiyFactorForAtom(mol, mol.Atoms[0]);

            Assert.IsFalse(double.IsNaN(result));
            result = Polarizability.GetPolarizabilitiyFactorForAtom(mol, mol.Atoms[3]);
            Assert.IsFalse(double.IsNaN(result));
        }
Пример #7
0
        public void TestCalculateGHEffectiveAtomPolarizability_IAtomContainer_IAtom_Int_Boolean()
        {
            double[] testResult = { 4.73, 6.92 };
            var      sp         = CDK.SmilesParser;
            var      mol        = sp.ParseSmiles("NCCN(C)(C)");
            double   result     = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[0], 100, true);

            Assert.AreEqual(testResult[0], result, 0.01);
            result = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[3], 100, true);
            Assert.AreEqual(testResult[1], result, 0.01);
        }
Пример #8
0
        public void TestCalculateGHEffectiveAtomPolarizability_Ethanolamine()
        {
            double[] testResult = { 4.26, 3.60 }; // from thesis Wolfgang Hanebeck, TUM
            var      sp         = CDK.SmilesParser;
            var      mol        = sp.ParseSmiles("NCCO");
            double   result     = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[3], 100, true);

            Assert.AreEqual(testResult[1], result, 0.01);
            result = Polarizability.CalculateGHEffectiveAtomPolarizability(mol, mol.Atoms[0], 100, true);
            Assert.AreEqual(testResult[0], result, 0.01);
        }