/** * Constructor for the PiElectronegativityDescriptor object */ public PiElectronegativityDescriptor() { electronegativity = new PiElectronegativity(); }
/** * calculate the electronegativity of orbitals pi. * * @param ac IAtomContainer * @param atom atom for which effective atom electronegativity should be calculated * * @return piElectronegativity */ public double calculatePiElectronegativity(IAtomContainer ac, IAtom atom) { return calculatePiElectronegativity(ac, atom, maxI, maxRS); }
/** * A unit test suite for JUnit. * * @cdk.inchi InChI=1/C4H8/c1-3-4-2/h3H,1,4H2,2H3 * * @return The test suite * @throws Exception */ @Test public void testCalculatePiElectronegativity_IAtomContainer_IAtom() throws Exception { PiElectronegativity pe = new PiElectronegativity(); 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++) { if (i == 0) Assert.assertNotSame(0.0, pe.calculatePiElectronegativity(molecule, molecule.getAtom(i))); else Assert.assertEquals(0.0, pe.calculatePiElectronegativity(molecule, molecule.getAtom(i)), 0.001); } }
PiElectronegativity electronegativity = new PiElectronegativity(); if (containerS.getAtomContainer(0).contains(atomR)) { electronegativity.setMaxIterations(6); double result = electronegativity.calculatePiElectronegativity(resonance, atomP); result1.add(result);
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testSetMaxIterations_Int() throws Exception { PiElectronegativity pe = new PiElectronegativity(); int maxIter = 10; pe.setMaxIterations(maxIter); Assert.assertSame(maxIter, pe.getMaxIterations()); }
if (maxIterations != -1 && maxIterations != 0) electronegativity.setMaxIterations(maxIterations); if (maxResonStruc != -1 && maxResonStruc != 0) electronegativity.setMaxResonStruc(maxResonStruc); double result = electronegativity.calculatePiElectronegativity(clone, localAtom);
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testSetMaxResonStruc_Int() throws Exception { PiElectronegativity pe = new PiElectronegativity(); int maxRes = 10; pe.setMaxResonStruc(maxRes); Assert.assertSame(maxRes, pe.getMaxResonStruc()); } }
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testGetMaxIterations() throws Exception { PiElectronegativity pe = new PiElectronegativity(); Assert.assertSame(6, pe.getMaxIterations()); }
/** * A unit test suite for JUnit. * * @return The test suite * @throws Exception */ @Test public void testGetMaxResonStruc() throws Exception { PiElectronegativity pe = new PiElectronegativity(); Assert.assertSame(50, pe.getMaxResonStruc()); }
/** * A unit test suite for JUnit. * * @cdk.inchi InChI=1/C4H8/c1-3-4-2/h3H,1,4H2,2H3 * * @return The test suite * @throws Exception */ @Test public void testCalculatePiElectronegativity_IAtomContainer_IAtom_Int_Int() throws Exception { PiElectronegativity pe = new PiElectronegativity(); 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++) { if (i == 0) Assert.assertNotSame(0.0, pe.calculatePiElectronegativity(molecule, molecule.getAtom(i), 6, 50)); else Assert.assertEquals(0.0, pe.calculatePiElectronegativity(molecule, molecule.getAtom(i), 6, 50), 0.001); } }
PiElectronegativity electronegativity = new PiElectronegativity(); if (containerS.getAtomContainer(0).contains(atomR)) { electronegativity.setMaxIterations(6); double result = electronegativity.calculatePiElectronegativity(resonance, atomP); result1.add(result);
PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsiliPartialCharges peoe = new GasteigerMarsiliPartialCharges(); GasteigerPEPEPartialCharges pepe = new GasteigerPEPEPartialCharges(); results[1] += pielectronegativity.calculatePiElectronegativity(container, atom);
/** * A unit test suite for JUnit. * * @return The test suite */ @Test public void testPiElectronegativity() { Assert.assertNotNull(new PiElectronegativity()); }
/** * calculate the electronegativity of orbitals pi. * * @param ac IAtomContainer * @param atom atom for which effective atom electronegativity should be calculated * * @return piElectronegativity */ public double calculatePiElectronegativity(IAtomContainer ac, IAtom atom) { return calculatePiElectronegativity(ac, atom, maxI, maxRS); }
PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsiliPartialCharges peoe = new GasteigerMarsiliPartialCharges(); GasteigerPEPEPartialCharges pepe = new GasteigerPEPEPartialCharges(); results[1] = pielectronegativity.calculatePiElectronegativity(container, atom);
/** * A unit test suite for JUnit. * * @return The test suite */ @Test public void testPiElectronegativity_Int_Int() { Assert.assertNotNull(new PiElectronegativity(6, 50)); }