test_class.declarator: names
test_class.modifier: private
test_class.original_string: private String[] names;
test_class.type: String[]
test_class.var_name: names
test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/KierHallSmartsDescriptorTest.java
test_class.identifier: KierHallSmartsDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void test2() throws Exception {
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("c1c(CN)cc(CCNC)cc1C(CO)CC(=O)CCOCCCO");
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          Aromaticity.cdkLegacy().apply(mol);
  
          DescriptorValue value = descriptor.calculate(mol);
          IntegerArrayResult result = (IntegerArrayResult) value.getValue();
  
          Assert.assertEquals(79, result.length());
          Assert.assertEquals(2, result.get(getIndex("khs.sOH")));
          Assert.assertEquals(1, result.get(getIndex("khs.dO")));
          Assert.assertEquals(1, result.get(getIndex("khs.ssO")));
          Assert.assertEquals(1, result.get(getIndex("khs.sNH2")));
          Assert.assertEquals(1, result.get(getIndex("khs.ssNH")));
      }
test_case.class_method_signature: KierHallSmartsDescriptorTest.test2()
test_case.full_signature: @Test public void test2()
test_case.identifier: test2
test_case.invocations: getInstance parseSmiles percieveAtomTypesAndConfigureAtoms apply cdkLegacy calculate getValue assertEquals length assertEquals get getIndex assertEquals get getIndex assertEquals get getIndex assertEquals get getIndex assertEquals get getIndex
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test2()
focal_class.declarator: names
focal_class.modifier: private static
focal_class.original_string: private static String[] names;
focal_class.type: String[]
focal_class.var_name: names
focal_class.declarator: SMARTS = EStateFragments.getPatterns()
focal_class.modifier: private static final
focal_class.original_string: private static final SmartsPattern[] SMARTS = EStateFragments.getPatterns();
focal_class.type: SmartsPattern[]
focal_class.var_name: SMARTS
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/KierHallSmartsDescriptor.java
focal_class.identifier: KierHallSmartsDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: KierHallSmartsDescriptor.KierHallSmartsDescriptor()
focal_class.full_signature: public  KierHallSmartsDescriptor()
focal_class.identifier: KierHallSmartsDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  KierHallSmartsDescriptor()
focal_class.class_method_signature: KierHallSmartsDescriptor.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: KierHallSmartsDescriptor.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: KierHallSmartsDescriptor.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: KierHallSmartsDescriptor.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: KierHallSmartsDescriptor.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: KierHallSmartsDescriptor.calculate(IAtomContainer container)
focal_class.full_signature: @Override public DescriptorValue calculate(IAtomContainer container)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer container)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IAtomContainer container)
focal_class.class_method_signature: KierHallSmartsDescriptor.getDescriptorResultType()
focal_class.full_signature: @Override public IDescriptorResult getDescriptorResultType()
focal_class.identifier: getDescriptorResultType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IDescriptorResult
focal_class.signature: IDescriptorResult getDescriptorResultType()
focal_class.class_method_signature: KierHallSmartsDescriptor.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: KierHallSmartsDescriptor.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 AbstractMolecularDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtomContainer container) {
          if (container == null || container.getAtomCount() == 0) {
              return getDummyDescriptorValue(new CDKException("Container was null or else had no atoms"));
          }
  
          IAtomContainer atomContainer;
          try {
              atomContainer = (IAtomContainer) container.clone();
              for (IAtom atom : atomContainer.atoms()) {
                  if (atom.getImplicitHydrogenCount() == null)
                      atom.setImplicitHydrogenCount(0);
              }
              atomContainer = AtomContainerManipulator.removeHydrogens(atomContainer);
          } catch (CloneNotSupportedException e) {
              return getDummyDescriptorValue(new CDKException("Error during clone"));
          }
  
          int[] counts = new int[SMARTS.length];
          SmartsPattern.prepare(atomContainer);
          for (int i = 0; i < SMARTS.length; i++) {
              counts[i] = SMARTS[i].matchAll(atomContainer).countUnique();
          }
  
          IntegerArrayResult result = new IntegerArrayResult();
          for (Integer i : counts)
              result.add(i);
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), result,
                                     getDescriptorNames());
      }
focal_method.class_method_signature: KierHallSmartsDescriptor.calculate(IAtomContainer container)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer container)
focal_method.identifier: calculate
focal_method.invocations: getAtomCount getDummyDescriptorValue clone atoms getImplicitHydrogenCount setImplicitHydrogenCount removeHydrogens getDummyDescriptorValue prepare countUnique matchAll add getSpecification getParameterNames getParameters getDescriptorNames
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer container)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtomContainer container)