test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/ChiClusterDescriptorTest.java
test_class.identifier: ChiClusterDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testCovalentMetal() throws Exception {
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("CCCC[Sn](CCCC)(CCCC)c1cc(Cl)c(Nc2nc(C)nc(N(CCC)CC3CC3)c2Cl)c(Cl)c1");
          DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
          Assert.assertNotNull(ret);
      }
test_case.class_method_signature: ChiClusterDescriptorTest.testCovalentMetal()
test_case.full_signature: @Test public void testCovalentMetal()
test_case.identifier: testCovalentMetal
test_case.invocations: getInstance parseSmiles getValue calculate assertNotNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCovalentMetal()
focal_class.declarator: logger = LoggingToolFactory.createLoggingTool(ChiClusterDescriptor.class)
focal_class.modifier: private static
focal_class.original_string: private static ILoggingTool   logger = LoggingToolFactory.createLoggingTool(ChiClusterDescriptor.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: sp
focal_class.modifier: private
focal_class.original_string: private SmilesParser          sp;
focal_class.type: SmilesParser
focal_class.var_name: sp
focal_class.declarator: NAMES  = {"SC-3", "SC-4", "SC-5", "SC-6", "VC-3", "VC-4", "VC-5", "VC-6"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES  = {"SC-3", "SC-4", "SC-5", "SC-6", "VC-3", "VC-4", "VC-5", "VC-6"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiClusterDescriptor.java
focal_class.identifier: ChiClusterDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: ChiClusterDescriptor.ChiClusterDescriptor()
focal_class.full_signature: public  ChiClusterDescriptor()
focal_class.identifier: ChiClusterDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ChiClusterDescriptor()
focal_class.class_method_signature: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.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: ChiClusterDescriptor.order3(IAtomContainer atomContainer)
focal_class.full_signature: private List order3(IAtomContainer atomContainer)
focal_class.identifier: order3
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List
focal_class.signature: List order3(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiClusterDescriptor.order4(IAtomContainer atomContainer)
focal_class.full_signature: private List order4(IAtomContainer atomContainer)
focal_class.identifier: order4
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List
focal_class.signature: List order4(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiClusterDescriptor.order5(IAtomContainer atomContainer)
focal_class.full_signature: private List order5(IAtomContainer atomContainer)
focal_class.identifier: order5
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List
focal_class.signature: List order5(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiClusterDescriptor.order6(IAtomContainer atomContainer)
focal_class.full_signature: private List order6(IAtomContainer atomContainer)
focal_class.identifier: order6
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List
focal_class.signature: List order6(IAtomContainer atomContainer)
focal_class.superclass: extends AbstractMolecularDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtomContainer container) {
          if (sp == null) sp = new SmilesParser(container.getBuilder());
  
          // removeHydrogens does a deep copy, so no need to clone
          IAtomContainer localAtomContainer = AtomContainerManipulator.removeHydrogens(container);
          CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(container.getBuilder());
          Iterator<IAtom> atoms = localAtomContainer.atoms().iterator();
          while (atoms.hasNext()) {
              IAtom atom = atoms.next();
              IAtomType type;
              try {
                  type = matcher.findMatchingAtomType(localAtomContainer, atom);
                  AtomTypeManipulator.configure(atom, type);
              } catch (Exception e) {
                  return getDummyDescriptorValue(new CDKException("Error in atom typing: " + e.getMessage()));
              }
          }
          CDKHydrogenAdder hAdder = CDKHydrogenAdder.getInstance(container.getBuilder());
          try {
              hAdder.addImplicitHydrogens(localAtomContainer);
          } catch (CDKException e) {
              return getDummyDescriptorValue(new CDKException("Error in hydrogen addition: " + e.getMessage()));
          }
  
          List subgraph3 = order3(localAtomContainer);
          List subgraph4 = order4(localAtomContainer);
          List subgraph5 = order5(localAtomContainer);
          List subgraph6 = order6(localAtomContainer);
  
          double order3s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph3);
          double order4s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph4);
          double order5s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph5);
          double order6s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph6);
  
          double order3v, order4v, order5v, order6v;
          try {
              order3v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph3);
              order4v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph4);
              order5v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph5);
              order6v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph6);
          } catch (CDKException e) {
              return getDummyDescriptorValue(new CDKException("Error in substructure search: " + e.getMessage()));
          }
          DoubleArrayResult retval = new DoubleArrayResult();
          retval.add(order3s);
          retval.add(order4s);
          retval.add(order5s);
          retval.add(order6s);
  
          retval.add(order3v);
          retval.add(order4v);
          retval.add(order5v);
          retval.add(order6v);
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), retval,
                  getDescriptorNames());
  
      }
focal_method.class_method_signature: ChiClusterDescriptor.calculate(IAtomContainer container)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer container)
focal_method.identifier: calculate
focal_method.invocations: getBuilder removeHydrogens getInstance getBuilder iterator atoms hasNext next findMatchingAtomType configure getDummyDescriptorValue getMessage getInstance getBuilder addImplicitHydrogens getDummyDescriptorValue getMessage order3 order4 order5 order6 evalSimpleIndex evalSimpleIndex evalSimpleIndex evalSimpleIndex evalValenceIndex evalValenceIndex evalValenceIndex evalValenceIndex getDummyDescriptorValue getMessage add add add add add add add 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)