test_class.declarator: descriptor
test_class.original_string: ProtonAffinityHOSEDescriptor            descriptor;
test_class.type: ProtonAffinityHOSEDescriptor
test_class.var_name: descriptor
test_class.declarator: lpcheck = new LonePairElectronChecker()
test_class.original_string: LonePairElectronChecker                 lpcheck = new LonePairElectronChecker();
test_class.type: LonePairElectronChecker
test_class.var_name: lpcheck
test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: private final static
test_class.original_string: private final static IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.file: descriptor/qsaratomic/src/test/java/org/openscience/cdk/qsar/descriptors/atomic/ProtonAffinityHOSEDescriptorTest.java
test_class.identifier: ProtonAffinityHOSEDescriptorTest
test_class.superclass: extends AtomicDescriptorTest
test_case.body: @Test
      public void testAffinityDescriptor1() 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.DOUBLE);
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addBond(1, 2, IBond.Order.SINGLE);
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addBond(2, 3, IBond.Order.DOUBLE);
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addBond(3, 4, IBond.Order.SINGLE);
          mol.addAtom(builder.newInstance(IAtom.class, "C"));
          mol.addBond(4, 5, IBond.Order.DOUBLE);
          mol.addBond(5, 0, IBond.Order.SINGLE);
          mol.addAtom(builder.newInstance(IAtom.class, "Cl"));
          mol.addBond(0, 6, IBond.Order.SINGLE);
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          Aromaticity.cdkLegacy().apply(mol);
          addExplicitHydrogens(mol);
          lpcheck.saturate(mol);
  
          double result = ((DoubleResult) descriptor.calculate(mol.getAtom(6), mol).getValue()).doubleValue();
          double resultAccordingNIST = 753.1;
  
          Assert.assertEquals(resultAccordingNIST, result, 0.00001);
      }
test_case.class_method_signature: ProtonAffinityHOSEDescriptorTest.testAffinityDescriptor1()
test_case.full_signature: @Test public void testAffinityDescriptor1()
test_case.identifier: testAffinityDescriptor1
test_case.invocations: newInstance addAtom newInstance addAtom newInstance addBond addAtom newInstance addBond addAtom newInstance addBond addAtom newInstance addBond addAtom newInstance addBond addBond addAtom newInstance addBond percieveAtomTypesAndConfigureAtoms apply cdkLegacy addExplicitHydrogens saturate doubleValue getValue calculate getAtom assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAffinityDescriptor1()
focal_class.declarator: NAMES = {"protonAffiHOSE"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES = {"protonAffiHOSE"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.declarator: maxSpheresToUse = 10
focal_class.original_string: int                           maxSpheresToUse = 10;
focal_class.type: int
focal_class.var_name: maxSpheresToUse
focal_class.declarator: db              = new Affinitydb()
focal_class.modifier: private
focal_class.original_string: private Affinitydb            db              = new Affinitydb();
focal_class.type: Affinitydb
focal_class.var_name: db
focal_class.file: descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/ProtonAffinityHOSEDescriptor.java
focal_class.identifier: ProtonAffinityHOSEDescriptor
focal_class.class_method_signature: ProtonAffinityHOSEDescriptor.ProtonAffinityHOSEDescriptor()
focal_class.full_signature: public  ProtonAffinityHOSEDescriptor()
focal_class.identifier: ProtonAffinityHOSEDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ProtonAffinityHOSEDescriptor()
focal_class.class_method_signature: ProtonAffinityHOSEDescriptor.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: ProtonAffinityHOSEDescriptor.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: ProtonAffinityHOSEDescriptor.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: ProtonAffinityHOSEDescriptor.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: ProtonAffinityHOSEDescriptor.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: ProtonAffinityHOSEDescriptor.familyHalogen(IAtom atom)
focal_class.full_signature: private boolean familyHalogen(IAtom atom)
focal_class.identifier: familyHalogen
focal_class.modifiers: private
focal_class.parameters: (IAtom atom)
focal_class.return: boolean
focal_class.signature: boolean familyHalogen(IAtom atom)
focal_class.class_method_signature: ProtonAffinityHOSEDescriptor.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: ProtonAffinityHOSEDescriptor.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.class_method_signature: ProtonAffinityHOSEDescriptor.extractInfo(String str)
focal_class.full_signature: private static List<String> extractInfo(String str)
focal_class.identifier: extractInfo
focal_class.modifiers: private static
focal_class.parameters: (String str)
focal_class.return: List<String>
focal_class.signature: List<String> extractInfo(String str)
focal_class.superclass: extends AbstractAtomicDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
          double value;
  
          try {
              int i = container.indexOf(atom);
              if (i < 0) throw new CDKException("atom was not a memeber of the provided container");
  
              // don't modify the original
              container = container.clone();
              atom = container.getAtom(i);
  
              AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(container);
              LonePairElectronChecker lpcheck = new LonePairElectronChecker();
              lpcheck.saturate(container);
          } catch (CDKException | CloneNotSupportedException e) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                      Double.NaN), NAMES, null);
          }
  
          value = db.extractAffinity(container, atom);
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(value),
                                     NAMES);
  
      }
focal_method.class_method_signature: ProtonAffinityHOSEDescriptor.calculate(IAtom atom, IAtomContainer container)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtom atom, IAtomContainer container)
focal_method.identifier: calculate
focal_method.invocations: indexOf clone getAtom percieveAtomTypesAndConfigureAtoms saturate getSpecification getParameterNames getParameters extractAffinity getSpecification getParameterNames getParameters
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)