test_class.declarator: descriptor
test_class.original_string: IPAtomicLearningDescriptor      descriptor;
test_class.type: IPAtomicLearningDescriptor
test_class.var_name: descriptor
test_class.declarator: sp      = new SmilesParser(DefaultChemObjectBuilder.getInstance())
test_class.modifier: private
test_class.original_string: private SmilesParser            sp      = new SmilesParser(DefaultChemObjectBuilder.getInstance());
test_class.type: SmilesParser
test_class.var_name: sp
test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: private
test_class.original_string: private IChemObjectBuilder      builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
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/atomic/IPAtomicLearningDescriptorTest.java
test_class.identifier: IPAtomicLearningDescriptorTest
test_class.superclass: extends AtomicDescriptorTest
test_case.body: @Test
      @Category(SlowTest.class)
      public void testIPDescriptor1() throws Exception {
  
          IAtomContainer mol = builder.newInstance(IAtomContainer.class);
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addBond(0, 1, IBond.Order.SINGLE);
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addBond(1, 2, IBond.Order.SINGLE);
          mol.addAtom(builder.newInstance(IAtom.class, "Cl"));
          mol.addBond(2, 3, IBond.Order.SINGLE);
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          addExplicitHydrogens(mol);
          lpcheck.saturate(mol);
  
          double result = ((DoubleResult) descriptor.calculate(mol.getAtom(3), mol).getValue()).doubleValue();
          double resultAccordingNIST = 10.8;
          Assert.assertEquals(resultAccordingNIST, result, 0.4);
      }
test_case.class_method_signature: IPAtomicLearningDescriptorTest.testIPDescriptor1()
test_case.full_signature: @Test @Category(SlowTest.class) public void testIPDescriptor1()
test_case.identifier: testIPDescriptor1
test_case.invocations: newInstance addAtom newInstance addAtom newInstance addBond addAtom newInstance addBond addAtom newInstance addBond percieveAtomTypesAndConfigureAtoms addExplicitHydrogens saturate doubleValue getValue calculate getAtom assertEquals
test_case.modifiers: @Test @Category(SlowTest.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIPDescriptor1()
focal_class.declarator: DESCRIPTOR_NAMES = {"ipAtomicLearning"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] DESCRIPTOR_NAMES = {"ipAtomicLearning"};
focal_class.type: String[]
focal_class.var_name: DESCRIPTOR_NAMES
focal_class.file: legacy/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicLearningDescriptor.java
focal_class.identifier: IPAtomicLearningDescriptor
focal_class.class_method_signature: IPAtomicLearningDescriptor.IPAtomicLearningDescriptor()
focal_class.full_signature: public  IPAtomicLearningDescriptor()
focal_class.identifier: IPAtomicLearningDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  IPAtomicLearningDescriptor()
focal_class.class_method_signature: IPAtomicLearningDescriptor.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: IPAtomicLearningDescriptor.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: IPAtomicLearningDescriptor.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: IPAtomicLearningDescriptor.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: IPAtomicLearningDescriptor.calculate(IAtom atom, IAtomContainer container)
focal_class.full_signature: @Override public DescriptorValue calculate(IAtom atom, IAtomContainer container)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtom atom, IAtomContainer container)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IAtom atom, IAtomContainer container)
focal_class.class_method_signature: IPAtomicLearningDescriptor.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: IPAtomicLearningDescriptor.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 AbstractAtomicDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
          double value = 0;
          // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
          String originalAtomtypeName = atom.getAtomTypeName();
          Integer originalNeighborCount = atom.getFormalNeighbourCount();
          Integer originalValency = atom.getValency();
          IAtomType.Hybridization originalHybrid = atom.getHybridization();
          Double originalBondOrderSum = atom.getBondOrderSum();
          Order originalMaxBondOrder = atom.getMaxBondOrder();
  
          if (!isCachedAtomContainer(container)) {
              try {
                  AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(container);
  
                  LonePairElectronChecker lpcheck = new LonePairElectronChecker();
                  lpcheck.saturate(container);
              } catch (CDKException e) {
                  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                          Double.NaN), getDescriptorNames(), e);
  
              }
          }
  
          try {
              value = IonizationPotentialTool.predictIP(container, atom);
          } catch (CDKException e) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                      Double.NaN), getDescriptorNames(), e);
          }
          // restore original props
          atom.setAtomTypeName(originalAtomtypeName);
          atom.setFormalNeighbourCount(originalNeighborCount);
          atom.setValency(originalValency);
          atom.setHybridization(originalHybrid);
          atom.setMaxBondOrder(originalMaxBondOrder);
          atom.setBondOrderSum(originalBondOrderSum);
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(value),
                  getDescriptorNames());
  
      }
focal_method.class_method_signature: IPAtomicLearningDescriptor.calculate(IAtom atom, IAtomContainer container)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtom atom, IAtomContainer container)
focal_method.identifier: calculate
focal_method.invocations: getAtomTypeName getFormalNeighbourCount getValency getHybridization getBondOrderSum getMaxBondOrder isCachedAtomContainer percieveAtomTypesAndConfigureAtoms saturate getSpecification getParameterNames getParameters getDescriptorNames predictIP getSpecification getParameterNames getParameters getDescriptorNames setAtomTypeName setFormalNeighbourCount setValency setHybridization setMaxBondOrder setBondOrderSum getSpecification getParameterNames getParameters getDescriptorNames
focal_method.modifiers: @Override public
focal_method.parameters: (IAtom atom, IAtomContainer container)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtom atom, IAtomContainer container)