test_class.file: tool/charges/src/test/java/org/openscience/cdk/charges/PolarizabilityTest.java
test_class.identifier: PolarizabilityTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testcalculateGHEffectiveAtomPolarizability_Isopentyl_iodide() throws Exception {
          double testResult = 8.69; /* from thesis Wolfgang Hanebeck, TUM */
          Polarizability pol = new Polarizability();
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("C(C)(C)CCI");
          double result = pol.calculateGHEffectiveAtomPolarizability(mol, mol.getAtom(5), 100, true);
          Assert.assertEquals(testResult, result, 0.01);
      }
test_case.class_method_signature: PolarizabilityTest.testcalculateGHEffectiveAtomPolarizability_Isopentyl_iodide()
test_case.full_signature: @Test public void testcalculateGHEffectiveAtomPolarizability_Isopentyl_iodide()
test_case.identifier: testcalculateGHEffectiveAtomPolarizability_Isopentyl_iodide
test_case.invocations: getInstance parseSmiles calculateGHEffectiveAtomPolarizability getAtom assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testcalculateGHEffectiveAtomPolarizability_Isopentyl_iodide()
focal_class.declarator: logger = LoggingToolFactory.createLoggingTool(Polarizability.class)
focal_class.modifier: private static
focal_class.original_string: private static ILoggingTool logger = LoggingToolFactory.createLoggingTool(Polarizability.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.file: tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
focal_class.identifier: Polarizability
focal_class.class_method_signature: Polarizability.Polarizability()
focal_class.full_signature: public  Polarizability()
focal_class.identifier: Polarizability
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Polarizability()
focal_class.class_method_signature: Polarizability.addExplicitHydrogens(IAtomContainer container)
focal_class.full_signature: private void addExplicitHydrogens(IAtomContainer container)
focal_class.identifier: addExplicitHydrogens
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer container)
focal_class.return: void
focal_class.signature: void addExplicitHydrogens(IAtomContainer container)
focal_class.class_method_signature: Polarizability.getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom)
focal_class.full_signature: public double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom)
focal_class.identifier: getPolarizabilitiyFactorForAtom
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom)
focal_class.return: double
focal_class.signature: double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom)
focal_class.class_method_signature: Polarizability.calculateKJMeanMolecularPolarizability(IAtomContainer atomContainer)
focal_class.full_signature: public double calculateKJMeanMolecularPolarizability(IAtomContainer atomContainer)
focal_class.identifier: calculateKJMeanMolecularPolarizability
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: double
focal_class.signature: double calculateKJMeanMolecularPolarizability(IAtomContainer atomContainer)
focal_class.class_method_signature: Polarizability.calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_class.full_signature: public double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_class.identifier: calculateGHEffectiveAtomPolarizability
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_class.return: double
focal_class.signature: double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_class.class_method_signature: Polarizability.calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              boolean addExplicitH, int[][] distanceMatrix)
focal_class.full_signature: public double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              boolean addExplicitH, int[][] distanceMatrix)
focal_class.identifier: calculateGHEffectiveAtomPolarizability
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom,
              boolean addExplicitH, int[][] distanceMatrix)
focal_class.return: double
focal_class.signature: double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              boolean addExplicitH, int[][] distanceMatrix)
focal_class.class_method_signature: Polarizability.calculateBondPolarizability(IAtomContainer atomContainer, IBond bond)
focal_class.full_signature: public double calculateBondPolarizability(IAtomContainer atomContainer, IBond bond)
focal_class.identifier: calculateBondPolarizability
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer, IBond bond)
focal_class.return: double
focal_class.signature: double calculateBondPolarizability(IAtomContainer atomContainer, IBond bond)
focal_class.class_method_signature: Polarizability.getKJPolarizabilityFactor(IAtomContainer atomContainer, IAtom atom)
focal_class.full_signature: private double getKJPolarizabilityFactor(IAtomContainer atomContainer, IAtom atom)
focal_class.identifier: getKJPolarizabilityFactor
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom)
focal_class.return: double
focal_class.signature: double getKJPolarizabilityFactor(IAtomContainer atomContainer, IAtom atom)
focal_class.class_method_signature: Polarizability.getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom)
focal_class.full_signature: private int getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom)
focal_class.identifier: getNumberOfHydrogen
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom)
focal_class.return: int
focal_class.signature: int getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom)
focal_method.body: public double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH) {
          double polarizabilitiy = 0;
  
          IAtomContainer acH;
          if (addExplicitH) {
              acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer);
              addExplicitHydrogens(acH);
          } else {
              acH = atomContainer;
          }
  
          List<IAtom> startAtom = new ArrayList<>(1);
          startAtom.add(0, atom);
          double bond;
  
          polarizabilitiy += getKJPolarizabilityFactor(acH, atom);
          for (int i = 0; i < acH.getAtomCount(); i++) {
              if (!acH.getAtom(i).equals(atom)) {
                  bond = PathTools.breadthFirstTargetSearch(acH, startAtom, acH.getAtom(i), 0, influenceSphereCutOff);
                  if (bond == 1) {
                      polarizabilitiy += getKJPolarizabilityFactor(acH, acH.getAtom(i));
                  } else {
                      polarizabilitiy += (Math.pow(0.5, bond - 1) * getKJPolarizabilityFactor(acH, acH.getAtom(i)));
                  }//if bond==0
              }//if !=atom
          }//for
          return polarizabilitiy;
      }
focal_method.class_method_signature: Polarizability.calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_method.full_signature: public double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_method.identifier: calculateGHEffectiveAtomPolarizability
focal_method.invocations: newInstance getBuilder addExplicitHydrogens add getKJPolarizabilityFactor getAtomCount equals getAtom breadthFirstTargetSearch getAtom getKJPolarizabilityFactor getAtom pow getKJPolarizabilityFactor getAtom
focal_method.modifiers: public
focal_method.parameters: (IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)
focal_method.return: double
focal_method.signature: double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
              int influenceSphereCutOff, boolean addExplicitH)