Exemplo n.º 1
0
        public void TestSetMaxIterations_Int()
        {
            Electronegativity pe = new Electronegativity();
            int maxIter          = 10;

            pe.MaxIterations = maxIter;
            Assert.AreEqual(maxIter, pe.MaxIterations);
        }
Exemplo n.º 2
0
        public void TestSetMaxResonStruc_Int()
        {
            Electronegativity pe = new Electronegativity();
            int maxRes           = 10;

            pe.MaxResonanceStructures = maxRes;
            Assert.AreEqual(maxRes, pe.MaxResonanceStructures);
        }
Exemplo n.º 3
0
        public void TestCalculateSigmaElectronegativity_IAtomContainer_IAtom()
        {
            double[]          testResult = { 11.308338, 8.7184094, 7.5289848, 7.5289848, 7.5289848 };
            Electronegativity pe         = new Electronegativity();

            IAtomContainer molecule = builder.NewAtomContainer();

            molecule.Atoms.Add(builder.NewAtom("F"));
            molecule.Atoms.Add(builder.NewAtom("C"));
            molecule.AddBond(molecule.Atoms[0], molecule.Atoms[1], BondOrder.Single);

            AddExplicitHydrogens(molecule);
            AtomContainerManipulator.PercieveAtomTypesAndConfigureAtoms(molecule);
            CDK.LonePairElectronChecker.Saturate(molecule);

            for (int i = 0; i < molecule.Atoms.Count; i++)
            {
                Assert.AreEqual(testResult[i], pe.CalculateSigmaElectronegativity(molecule, molecule.Atoms[i]), 0.001);
            }
        }
Exemplo n.º 4
0
        public void TestGetMaxIterations()
        {
            Electronegativity pe = new Electronegativity();

            Assert.AreEqual(6, pe.MaxIterations);
        }
Exemplo n.º 5
0
        public void TestGetMaxResonStruc()
        {
            Electronegativity pe = new Electronegativity();

            Assert.AreEqual(50, pe.MaxResonanceStructures);
        }