test_class.declarator: descriptor
test_class.modifier: private
test_class.original_string: private IPBondLearningDescriptor descriptor;
test_class.type: IPBondLearningDescriptor
test_class.var_name: descriptor
test_class.declarator: lpcheck = new LonePairElectronChecker()
test_class.modifier: private
test_class.original_string: private LonePairElectronChecker  lpcheck = new LonePairElectronChecker();
test_class.type: LonePairElectronChecker
test_class.var_name: lpcheck
test_class.file: legacy/src/test/java/org/openscience/cdk/qsar/descriptors/bond/IPBondLearningDescriptorTest.java
test_class.identifier: IPBondLearningDescriptorTest
test_class.superclass: extends BondDescriptorTest
test_case.body: @Test
      @Category(SlowTest.class)
      public void testIPDescriptorReaction2() throws java.lang.Exception {
  
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("CCCCCC");
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          addExplicitHydrogens(mol);
          lpcheck.saturate(mol);
  
          double result = ((DoubleResult) descriptor.calculate(mol.getBond(0), mol).getValue()).doubleValue();
          double resultAccordingNIST = 0.0;
  
          Assert.assertEquals(resultAccordingNIST, result, 0.0001);
      }
test_case.class_method_signature: IPBondLearningDescriptorTest.testIPDescriptorReaction2()
test_case.full_signature: @Test @Category(SlowTest.class) public void testIPDescriptorReaction2()
test_case.identifier: testIPDescriptorReaction2
test_case.invocations: getInstance parseSmiles percieveAtomTypesAndConfigureAtoms addExplicitHydrogens saturate doubleValue getValue calculate getBond assertEquals
test_case.modifiers: @Test @Category(SlowTest.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIPDescriptorReaction2()
focal_class.declarator: DESCRIPTOR_NAMES = {"ipBondLearning"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] DESCRIPTOR_NAMES = {"ipBondLearning"};
focal_class.type: String[]
focal_class.var_name: DESCRIPTOR_NAMES
focal_class.file: legacy/src/main/java/org/openscience/cdk/qsar/descriptors/bond/IPBondLearningDescriptor.java
focal_class.identifier: IPBondLearningDescriptor
focal_class.class_method_signature: IPBondLearningDescriptor.IPBondLearningDescriptor()
focal_class.full_signature: public  IPBondLearningDescriptor()
focal_class.identifier: IPBondLearningDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  IPBondLearningDescriptor()
focal_class.class_method_signature: IPBondLearningDescriptor.getSpecification()
focal_class.full_signature: @Override public DescriptorSpecification getSpecification()
focal_class.identifier: getSpecification
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DescriptorSpecification
focal_class.signature: DescriptorSpecification getSpecification()
focal_class.class_method_signature: IPBondLearningDescriptor.setParameters(Object[] params)
focal_class.full_signature: @Override public void setParameters(Object[] params)
focal_class.identifier: setParameters
focal_class.modifiers: @Override public
focal_class.parameters: (Object[] params)
focal_class.return: void
focal_class.signature: void setParameters(Object[] params)
focal_class.class_method_signature: IPBondLearningDescriptor.getParameters()
focal_class.full_signature: @Override public Object[] getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] getParameters()
focal_class.class_method_signature: IPBondLearningDescriptor.getDescriptorNames()
focal_class.full_signature: @Override public String[] getDescriptorNames()
focal_class.identifier: getDescriptorNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getDescriptorNames()
focal_class.class_method_signature: IPBondLearningDescriptor.getDummyDescriptorValue(Exception e)
focal_class.full_signature: private DescriptorValue getDummyDescriptorValue(Exception e)
focal_class.identifier: getDummyDescriptorValue
focal_class.modifiers: private
focal_class.parameters: (Exception e)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue getDummyDescriptorValue(Exception e)
focal_class.class_method_signature: IPBondLearningDescriptor.calculate(IBond bond, IAtomContainer atomContainer)
focal_class.full_signature: @Override public DescriptorValue calculate(IBond bond, IAtomContainer atomContainer)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IBond bond, IAtomContainer atomContainer)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IBond bond, IAtomContainer atomContainer)
focal_class.class_method_signature: IPBondLearningDescriptor.getParameterNames()
focal_class.full_signature: @Override public String[] getParameterNames()
focal_class.identifier: getParameterNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getParameterNames()
focal_class.class_method_signature: IPBondLearningDescriptor.getParameterType(String name)
focal_class.full_signature: @Override public Object getParameterType(String name)
focal_class.identifier: getParameterType
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: Object
focal_class.signature: Object getParameterType(String name)
focal_class.superclass: extends AbstractBondDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IBond bond, IAtomContainer atomContainer) {
          double value = 0;
          // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
          String originalAtomtypeName1 = bond.getBegin().getAtomTypeName();
          Integer originalNeighborCount1 = bond.getBegin().getFormalNeighbourCount();
          IAtomType.Hybridization originalHybridization1 = bond.getBegin().getHybridization();
          Integer originalValency1 = bond.getBegin().getValency();
          String originalAtomtypeName2 = bond.getEnd().getAtomTypeName();
          Integer originalNeighborCount2 = bond.getEnd().getFormalNeighbourCount();
          IAtomType.Hybridization originalHybridization2 = bond.getEnd().getHybridization();
          Integer originalValency2 = bond.getEnd().getValency();
          Double originalBondOrderSum1 = bond.getBegin().getBondOrderSum();
          Order originalMaxBondOrder1 = bond.getBegin().getMaxBondOrder();
          Double originalBondOrderSum2 = bond.getEnd().getBondOrderSum();
          Order originalMaxBondOrder2 = bond.getEnd().getMaxBondOrder();
  
          if (!isCachedAtomContainer(atomContainer)) {
              try {
                  AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(atomContainer);
                  LonePairElectronChecker lpcheck = new LonePairElectronChecker();
                  lpcheck.saturate(atomContainer);
              } catch (CDKException e) {
                  return getDummyDescriptorValue(e);
              }
  
          }
          if (!bond.getOrder().equals(IBond.Order.SINGLE)) {
              try {
                  value = IonizationPotentialTool.predictIP(atomContainer, bond);
              } catch (CDKException e) {
                  return getDummyDescriptorValue(e);
              }
          }
          bond.getBegin().setAtomTypeName(originalAtomtypeName1);
          bond.getBegin().setHybridization(originalHybridization1);
          bond.getBegin().setValency(originalValency1);
          bond.getBegin().setFormalNeighbourCount(originalNeighborCount1);
          bond.getEnd().setAtomTypeName(originalAtomtypeName2);
          bond.getEnd().setHybridization(originalHybridization2);
          bond.getEnd().setValency(originalValency2);
          bond.getEnd().setFormalNeighbourCount(originalNeighborCount2);
          bond.getBegin().setMaxBondOrder(originalMaxBondOrder1);
          bond.getBegin().setBondOrderSum(originalBondOrderSum1);
          bond.getEnd().setMaxBondOrder(originalMaxBondOrder2);
          bond.getEnd().setBondOrderSum(originalBondOrderSum2);
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(value),
                  DESCRIPTOR_NAMES);
      }
focal_method.class_method_signature: IPBondLearningDescriptor.calculate(IBond bond, IAtomContainer atomContainer)
focal_method.full_signature: @Override public DescriptorValue calculate(IBond bond, IAtomContainer atomContainer)
focal_method.identifier: calculate
focal_method.invocations: getAtomTypeName getBegin getFormalNeighbourCount getBegin getHybridization getBegin getValency getBegin getAtomTypeName getEnd getFormalNeighbourCount getEnd getHybridization getEnd getValency getEnd getBondOrderSum getBegin getMaxBondOrder getBegin getBondOrderSum getEnd getMaxBondOrder getEnd isCachedAtomContainer percieveAtomTypesAndConfigureAtoms saturate getDummyDescriptorValue equals getOrder predictIP getDummyDescriptorValue setAtomTypeName getBegin setHybridization getBegin setValency getBegin setFormalNeighbourCount getBegin setAtomTypeName getEnd setHybridization getEnd setValency getEnd setFormalNeighbourCount getEnd setMaxBondOrder getBegin setBondOrderSum getBegin setMaxBondOrder getEnd setBondOrderSum getEnd getSpecification getParameterNames getParameters
focal_method.modifiers: @Override public
focal_method.parameters: (IBond bond, IAtomContainer atomContainer)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IBond bond, IAtomContainer atomContainer)