test_class.declarator: descriptor
test_class.modifier: private
test_class.original_string: private IMolecularDescriptor descriptor;
test_class.type: IMolecularDescriptor
test_class.var_name: descriptor
test_class.file: descriptor/qsarprotein/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/AminoAcidCountDescriptorTest.java
test_class.identifier: AminoAcidCountDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testAACount() throws Exception {
          IBioPolymer protein = ProteinBuilderTool.createProtein("ARNDCFQEGHIPLKMSTYVW",
                  SilentChemObjectBuilder.getInstance());
          IDescriptorResult result = descriptor.calculate(protein).getValue();
          Assert.assertTrue(result instanceof IntegerArrayResult);
          IntegerArrayResult iaResult = (IntegerArrayResult) result;
          for (int i = 0; i < iaResult.length(); i++) {
              Assert.assertTrue(iaResult.get(i) >= 1); // all AAs are found at least once
          }
          Assert.assertEquals(20, iaResult.get(8)); // glycine is in all of them, so 20 times
      }
test_case.class_method_signature: AminoAcidCountDescriptorTest.testAACount()
test_case.full_signature: @Test public void testAACount()
test_case.identifier: testAACount
test_case.invocations: createProtein getInstance getValue calculate assertTrue length assertTrue get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAACount()
focal_class.declarator: substructureSet
focal_class.modifier: private
focal_class.original_string: private IAtomContainerSet substructureSet;
focal_class.type: IAtomContainerSet
focal_class.var_name: substructureSet
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.file: descriptor/qsarprotein/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/AminoAcidCountDescriptor.java
focal_class.identifier: AminoAcidCountDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: AminoAcidCountDescriptor.AminoAcidCountDescriptor()
focal_class.full_signature: public  AminoAcidCountDescriptor()
focal_class.identifier: AminoAcidCountDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  AminoAcidCountDescriptor()
focal_class.class_method_signature: AminoAcidCountDescriptor.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: AminoAcidCountDescriptor.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: AminoAcidCountDescriptor.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: AminoAcidCountDescriptor.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: AminoAcidCountDescriptor.calculate(IAtomContainer ac)
focal_class.full_signature: @Override public DescriptorValue calculate(IAtomContainer ac)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer ac)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IAtomContainer ac)
focal_class.class_method_signature: AminoAcidCountDescriptor.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: AminoAcidCountDescriptor.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: AminoAcidCountDescriptor.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 ac) {
          ac = clone(ac); // don't modify input
          int resultLength = substructureSet.getAtomContainerCount();
          IntegerArrayResult results = new IntegerArrayResult(resultLength);
  
          UniversalIsomorphismTester universalIsomorphismTester = new UniversalIsomorphismTester();
          IAtomContainer substructure;
          for (int i = 0; i < resultLength; i++) {
              substructure = substructureSet.getAtomContainer(i);
              List<List<RMap>> maps;
              try {
                  maps = universalIsomorphismTester.getSubgraphMaps(ac, substructure);
              } catch (CDKException e) {
                  // TODO is it OK to cast Double.NaN to int?
                  for (int j = 0; j < resultLength; j++)
                      results.add((int) Double.NaN);
                  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), results,
                          getDescriptorNames(), new CDKException("Error in substructure search: " + e.getMessage()));
              }
              if (maps != null) {
                  results.add(maps.size());
              }
          }
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), results,
                  getDescriptorNames());
      }
focal_method.class_method_signature: AminoAcidCountDescriptor.calculate(IAtomContainer ac)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer ac)
focal_method.identifier: calculate
focal_method.invocations: clone getAtomContainerCount getAtomContainer getSubgraphMaps add getSpecification getParameterNames getParameters getDescriptorNames getMessage add size getSpecification getParameterNames getParameters getDescriptorNames
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer ac)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtomContainer ac)