/** * Constructor for the BondSigmaElectronegativityDescriptor object. */ public BondSigmaElectronegativityDescriptor() { electronegativity = new Electronegativity(); }
/** * Constructor for the SigmaElectronegativityDescriptor object */ public SigmaElectronegativityDescriptor() { electronegativity = new Electronegativity(); }
/** * A unit test suite for JUnit. * * @return The test suite */ @Test public void testElectronegativity() { Assert.assertNotNull(new Electronegativity()); }
/** * A unit test suite for JUnit. * * @return The test suite */ @Test public void testElectronegativity_Int_Int() { Assert.assertNotNull(new Electronegativity(6, 50)); }
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testGetMaxIterations() throws Exception { Electronegativity pe = new Electronegativity(); Assert.assertSame(6, pe.getMaxIterations()); }
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testGetMaxResonStruc() throws Exception { Electronegativity pe = new Electronegativity(); Assert.assertSame(50, pe.getMaxResonStruc()); }
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testSetMaxIterations_Int() throws Exception { Electronegativity pe = new Electronegativity(); int maxIter = 10; pe.setMaxIterations(maxIter); Assert.assertSame(maxIter, pe.getMaxIterations()); }
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testSetMaxResonStruc_Int() throws Exception { Electronegativity pe = new Electronegativity(); int maxRes = 10; pe.setMaxResonStruc(maxRes); Assert.assertSame(maxRes, pe.getMaxResonStruc()); } }
Electronegativity electronegativity = new Electronegativity(); PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsiliPartialCharges peoe = new GasteigerMarsiliPartialCharges();
Electronegativity electronegativity = new Electronegativity(); PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsiliPartialCharges peoe = new GasteigerMarsiliPartialCharges();
/** * A unit test suite for JUnit. * * @cdk.inchi InChI=1/CH3F/c1-2/h1H3 * * @return The test suite * @throws Exception */ @Test public void testCalculateSigmaElectronegativity_IAtomContainer_IAtom() throws Exception { double[] testResult = {11.308338, 8.7184094, 7.5289848, 7.5289848, 7.5289848}; Electronegativity pe = new Electronegativity(); IAtomContainer molecule = builder.newInstance(IAtomContainer.class); molecule.addAtom(new Atom("F")); molecule.addAtom(new Atom("C")); molecule.addBond(0, 1, IBond.Order.SINGLE); addExplicitHydrogens(molecule); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule); lpcheck.saturate(molecule); for (int i = 0; i < molecule.getAtomCount(); i++) Assert.assertEquals(testResult[i], pe.calculateSigmaElectronegativity(molecule, molecule.getAtom(i)), 0.001); }
/** * A unit test suite for JUnit. * * @cdk.inchi InChI=1/CH3F/c1-2/h1H3 * * @return The test suite * @throws Exception */ @Test public void testCalculateSigmaElectronegativity_IAtomContainer_IAtom_Int_Int() throws Exception { double[] testResult = {11.308338, 8.7184094, 7.5289848, 7.5289848, 7.5289848}; Electronegativity pe = new Electronegativity(); IAtomContainer molecule = builder.newInstance(IAtomContainer.class); molecule.addAtom(new Atom("F")); molecule.addAtom(new Atom("C")); molecule.addBond(0, 1, IBond.Order.SINGLE); addExplicitHydrogens(molecule); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule); lpcheck.saturate(molecule); for (int i = 0; i < molecule.getAtomCount(); i++) { Assert.assertEquals(testResult[i], pe.calculateSigmaElectronegativity(molecule, molecule.getAtom(i), 6, 50), 0.001); } }