test_class.declarator: mol
test_class.modifier: private static
test_class.original_string: private static IAtomContainer mol;
test_class.type: IAtomContainer
test_class.var_name: mol
test_class.file: tool/charges/src/test/java/org/openscience/cdk/charges/InductivePartialChargesTest.java
test_class.identifier: InductivePartialChargesTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testCalculateCharges_IAtomContainer() throws java.lang.Exception {
          double[] testResult = {0.197, -0.492, 0.051, 0.099, 0.099};
          Point3d c_coord = new Point3d(1.392, 0.0, 0.0);
          Point3d f_coord = new Point3d(0.0, 0.0, 0.0);
          Point3d h1_coord = new Point3d(1.7439615035767404, 1.0558845107302222, 0.0);
          Point3d h2_coord = new Point3d(1.7439615035767404, -0.5279422553651107, 0.914422809754875);
          Point3d h3_coord = new Point3d(1.7439615035767402, -0.5279422553651113, -0.9144228097548747);
  
          IAtomContainer mol = new AtomContainer(); // molecule is CF
  
          Atom c = new Atom("C");
          mol.addAtom(c);
          c.setPoint3d(c_coord);
  
          Atom f = new Atom("F");
          mol.addAtom(f);
          f.setPoint3d(f_coord);
  
          Atom h1 = new Atom("H");
          mol.addAtom(h1);
          h1.setPoint3d(h1_coord);
  
          Atom h2 = new Atom("H");
          mol.addAtom(h2);
          h2.setPoint3d(h2_coord);
  
          Atom h3 = new Atom("H");
          mol.addAtom(h3);
          h3.setPoint3d(h3_coord);
  
          mol.addBond(0, 1, IBond.Order.SINGLE); // 1
          mol.addBond(0, 2, IBond.Order.SINGLE); // 1
          mol.addBond(0, 3, IBond.Order.SINGLE); // 1
          mol.addBond(0, 4, IBond.Order.SINGLE); // 1
          InductivePartialCharges ipc = new InductivePartialCharges();
          ipc.assignInductivePartialCharges(mol);
          for (int i = 0; i < mol.getAtomCount(); i++) {
              Assert.assertEquals(testResult[i],
                      ((Double) mol.getAtom(i).getProperty("InductivePartialCharge")).doubleValue(), 0.1);
              //logger.debug("CHARGE AT " + ac.getAtomAt(i).getSymbol() + " " + ac.getAtomAt(i).getProperty("MMFF94charge"));
          }
      }
test_case.class_method_signature: InductivePartialChargesTest.testCalculateCharges_IAtomContainer()
test_case.full_signature: @Test public void testCalculateCharges_IAtomContainer()
test_case.identifier: testCalculateCharges_IAtomContainer
test_case.invocations: addAtom setPoint3d addAtom setPoint3d addAtom setPoint3d addAtom setPoint3d addAtom setPoint3d addBond addBond addBond addBond assignInductivePartialCharges getAtomCount assertEquals doubleValue getProperty getAtom
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCalculateCharges_IAtomContainer()
focal_class.declarator: pauling
focal_class.modifier: private static
focal_class.original_string: private static double[]     pauling;
focal_class.type: double[]
focal_class.var_name: pauling
focal_class.declarator: ifac    = null
focal_class.modifier: private
focal_class.original_string: private IsotopeFactory      ifac    = null;
focal_class.type: IsotopeFactory
focal_class.var_name: ifac
focal_class.declarator: factory = null
focal_class.modifier: private
focal_class.original_string: private AtomTypeFactory     factory = null;
focal_class.type: AtomTypeFactory
focal_class.var_name: factory
focal_class.declarator: logger  = LoggingToolFactory.createLoggingTool(InductivePartialCharges.class)
focal_class.modifier: private static
focal_class.original_string: private static ILoggingTool logger  = LoggingToolFactory.createLoggingTool(InductivePartialCharges.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.file: tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java
focal_class.identifier: InductivePartialCharges
focal_class.interfaces: implements IChargeCalculator
focal_class.class_method_signature: InductivePartialCharges.InductivePartialCharges()
focal_class.full_signature: public  InductivePartialCharges()
focal_class.identifier: InductivePartialCharges
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  InductivePartialCharges()
focal_class.class_method_signature: InductivePartialCharges.assignInductivePartialCharges(IAtomContainer ac)
focal_class.full_signature: public IAtomContainer assignInductivePartialCharges(IAtomContainer ac)
focal_class.identifier: assignInductivePartialCharges
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer ac)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer assignInductivePartialCharges(IAtomContainer ac)
focal_class.class_method_signature: InductivePartialCharges.calculateCharges(IAtomContainer container)
focal_class.full_signature: @Override public void calculateCharges(IAtomContainer container)
focal_class.identifier: calculateCharges
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer container)
focal_class.return: void
focal_class.signature: void calculateCharges(IAtomContainer container)
focal_class.class_method_signature: InductivePartialCharges.getPaulingElectronegativities(IAtomContainer ac, boolean modified)
focal_class.full_signature: public double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified)
focal_class.identifier: getPaulingElectronegativities
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer ac, boolean modified)
focal_class.return: double[]
focal_class.signature: double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified)
focal_class.class_method_signature: InductivePartialCharges.getAtomicSoftnessCore(IAtomContainer ac, int atomPosition)
focal_class.full_signature: public double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition)
focal_class.identifier: getAtomicSoftnessCore
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer ac, int atomPosition)
focal_class.return: double
focal_class.signature: double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition)
focal_class.class_method_signature: InductivePartialCharges.getAtomicChargeIncrement(IAtomContainer ac, int atomPosition, double[] ElEn, int as)
focal_class.full_signature: private double getAtomicChargeIncrement(IAtomContainer ac, int atomPosition, double[] ElEn, int as)
focal_class.identifier: getAtomicChargeIncrement
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer ac, int atomPosition, double[] ElEn, int as)
focal_class.return: double
focal_class.signature: double getAtomicChargeIncrement(IAtomContainer ac, int atomPosition, double[] ElEn, int as)
focal_class.class_method_signature: InductivePartialCharges.getCovalentRadius(String symbol, IBond.Order maxBondOrder)
focal_class.full_signature: private double getCovalentRadius(String symbol, IBond.Order maxBondOrder)
focal_class.identifier: getCovalentRadius
focal_class.modifiers: private
focal_class.parameters: (String symbol, IBond.Order maxBondOrder)
focal_class.return: double
focal_class.signature: double getCovalentRadius(String symbol, IBond.Order maxBondOrder)
focal_class.class_method_signature: InductivePartialCharges.calculateSquaredDistanceBetweenTwoAtoms(IAtom atom1, IAtom atom2)
focal_class.full_signature: private double calculateSquaredDistanceBetweenTwoAtoms(IAtom atom1, IAtom atom2)
focal_class.identifier: calculateSquaredDistanceBetweenTwoAtoms
focal_class.modifiers: private
focal_class.parameters: (IAtom atom1, IAtom atom2)
focal_class.return: double
focal_class.signature: double calculateSquaredDistanceBetweenTwoAtoms(IAtom atom1, IAtom atom2)
focal_method.body: public IAtomContainer assignInductivePartialCharges(IAtomContainer ac) throws Exception {
          if (factory == null) {
              factory = AtomTypeFactory
                      .getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt", ac.getBuilder());
          }
  
          int stepsLimit = 9;
          IAtom[] atoms = AtomContainerManipulator.getAtomArray(ac);
          double[] pChInch = new double[atoms.length * (stepsLimit + 1)];
          double[] ElEn = new double[atoms.length * (stepsLimit + 1)];
          double[] pCh = new double[atoms.length * (stepsLimit + 1)];
          double[] startEE = getPaulingElectronegativities(ac, true);
          for (int e = 0; e < atoms.length; e++) {
              ElEn[e] = startEE[e];
              //logger.debug("INDU: initial EE "+startEE[e]);
          }
          //double tmp1 = 0;
          //double tmp2 = 0;
          for (int s = 1; s < 10; s++) {
              for (int a = 0; a < atoms.length; a++) {
                  pChInch[a + (s * atoms.length)] = getAtomicChargeIncrement(ac, a, ElEn, s);
                  pCh[a + (s * atoms.length)] = pChInch[a + (s * atoms.length)] + pCh[a + ((s - 1) * atoms.length)];
                  ElEn[a + (s * atoms.length)] = ElEn[a + ((s - 1) * atoms.length)]
                          + (pChInch[a + (s * atoms.length)] / getAtomicSoftnessCore(ac, a));
                  if (s == 9) {
                      atoms[a].setProperty("InductivePartialCharge", new Double(pCh[a + (s * atoms.length)]));
                      atoms[a].setProperty("EffectiveAtomicElectronegativity", new Double(ElEn[a + (s * atoms.length)]));
                  }
                  //tmp1 = pCh[a + (s * atoms.length)];
                  //tmp2 = ElEn[a + (s * atoms.length)];
                  //logger.debug("DONE step " + s + ", atom " + atoms[a].getSymbol() + ", ch " + tmp1 + ", ee " + tmp2);
              }
          }
          return ac;
      }
focal_method.class_method_signature: InductivePartialCharges.assignInductivePartialCharges(IAtomContainer ac)
focal_method.full_signature: public IAtomContainer assignInductivePartialCharges(IAtomContainer ac)
focal_method.identifier: assignInductivePartialCharges
focal_method.invocations: getInstance getBuilder getAtomArray getPaulingElectronegativities getAtomicChargeIncrement getAtomicSoftnessCore setProperty setProperty
focal_method.modifiers: public
focal_method.parameters: (IAtomContainer ac)
focal_method.return: IAtomContainer
focal_method.signature: IAtomContainer assignInductivePartialCharges(IAtomContainer ac)