test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/HybridizationRatioDescriptorTest.java
test_class.identifier: HybridizationRatioDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testHybRatioDescriptor3() throws Exception {
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("[H]C#N");
          Assert.assertEquals(Double.NaN, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 0.1);
      }
test_case.class_method_signature: HybridizationRatioDescriptorTest.testHybRatioDescriptor3()
test_case.full_signature: @Test public void testHybRatioDescriptor3()
test_case.identifier: testHybRatioDescriptor3
test_case.invocations: getInstance parseSmiles assertEquals doubleValue getValue calculate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHybRatioDescriptor3()
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HybridizationRatioDescriptor.java
focal_class.identifier: HybridizationRatioDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: HybridizationRatioDescriptor.HybridizationRatioDescriptor()
focal_class.full_signature: public  HybridizationRatioDescriptor()
focal_class.identifier: HybridizationRatioDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HybridizationRatioDescriptor()
focal_class.class_method_signature: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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: HybridizationRatioDescriptor.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) {
          try {
              IAtomContainer clone = (IAtomContainer) container.clone();
              AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(clone);
              int nsp2 = 0;
              int nsp3 = 0;
              for (IAtom atom : clone.atoms()) {
                  if (atom.getAtomicNumber() != IElement.C) continue;
                  if (atom.getHybridization() == Hybridization.SP2)
                      nsp2++;
                  else if (atom.getHybridization() == Hybridization.SP3) nsp3++;
              }
              double ratio = nsp3 / (double) (nsp2 + nsp3);
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(),
                      new DoubleResult(ratio), getDescriptorNames());
          } catch (CloneNotSupportedException e) {
              return getDummyDescriptorValue(e);
          } catch (CDKException e) {
              return getDummyDescriptorValue(e);
          }
      }
focal_method.class_method_signature: HybridizationRatioDescriptor.calculate(IAtomContainer container)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer container)
focal_method.identifier: calculate
focal_method.invocations: clone percieveAtomTypesAndConfigureAtoms atoms getAtomicNumber getHybridization getHybridization getSpecification getParameterNames getParameters getDescriptorNames getDummyDescriptorValue getDummyDescriptorValue
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer container)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtomContainer container)