test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/ChiPathDescriptorTest.java
test_class.identifier: ChiPathDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testDan154() throws Exception {
  
          IAtomContainer mol = new AtomContainer();
          IAtom a1 = mol.getBuilder().newInstance(IAtom.class, "C");
          a1.setPoint2d(new Point2d(0.0, 1.5));
          mol.addAtom(a1);
          IAtom a2 = mol.getBuilder().newInstance(IAtom.class, "C");
          a2.setPoint2d(new Point2d(0.0, 0.0));
          mol.addAtom(a2);
          IAtom a3 = mol.getBuilder().newInstance(IAtom.class, "C");
          a3.setPoint2d(new Point2d(-1.2990381056766584, -0.7500000000000001));
          mol.addAtom(a3);
          IAtom a4 = mol.getBuilder().newInstance(IAtom.class, "C");
          a4.setPoint2d(new Point2d(-2.598076211353316, -2.220446049250313E-16));
          mol.addAtom(a4);
          IAtom a5 = mol.getBuilder().newInstance(IAtom.class, "C");
          a5.setPoint2d(new Point2d(-2.5980762113533165, 1.5));
          mol.addAtom(a5);
          IAtom a6 = mol.getBuilder().newInstance(IAtom.class, "C");
          a6.setPoint2d(new Point2d(-1.2990381056766582, 2.2500000000000004));
          mol.addAtom(a6);
          IAtom a7 = mol.getBuilder().newInstance(IAtom.class, "Cl");
          a7.setPoint2d(new Point2d(-1.2990381056766582, 3.7500000000000004));
          mol.addAtom(a7);
          IAtom a8 = mol.getBuilder().newInstance(IAtom.class, "Cl");
          a8.setPoint2d(new Point2d(1.2990381056766576, -0.7500000000000007));
          mol.addAtom(a8);
          IBond b1 = mol.getBuilder().newInstance(IBond.class, a2, a1, IBond.Order.DOUBLE);
          mol.addBond(b1);
          IBond b2 = mol.getBuilder().newInstance(IBond.class, a3, a2, IBond.Order.SINGLE);
          mol.addBond(b2);
          IBond b3 = mol.getBuilder().newInstance(IBond.class, a4, a3, IBond.Order.DOUBLE);
          mol.addBond(b3);
          IBond b4 = mol.getBuilder().newInstance(IBond.class, a5, a4, IBond.Order.SINGLE);
          mol.addBond(b4);
          IBond b5 = mol.getBuilder().newInstance(IBond.class, a6, a5, IBond.Order.DOUBLE);
          mol.addBond(b5);
          IBond b6 = mol.getBuilder().newInstance(IBond.class, a6, a1, IBond.Order.SINGLE);
          mol.addBond(b6);
          IBond b7 = mol.getBuilder().newInstance(IBond.class, a7, a6, IBond.Order.SINGLE);
          mol.addBond(b7);
          IBond b8 = mol.getBuilder().newInstance(IBond.class, a8, a2, IBond.Order.SINGLE);
          mol.addBond(b8);
  
          DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
  
          Assert.assertEquals(5.9831, ret.get(0), 0.0001);
          Assert.assertEquals(3.7877, ret.get(1), 0.0001);
          Assert.assertEquals(3.3769, ret.get(2), 0.0001);
          Assert.assertEquals(2.1985, ret.get(3), 0.0001);
  
          Assert.assertEquals(0.9714, ret.get(5), 0.0001);
          Assert.assertEquals(0.4512, ret.get(6), 0.0001);
          Assert.assertEquals(0.0000, ret.get(7), 0.0001);
          Assert.assertEquals(5.5772, ret.get(8), 0.0001);
      }
test_case.class_method_signature: ChiPathDescriptorTest.testDan154()
test_case.full_signature: @Test public void testDan154()
test_case.identifier: testDan154
test_case.invocations: newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder setPoint2d addAtom newInstance getBuilder addBond newInstance getBuilder addBond newInstance getBuilder addBond newInstance getBuilder addBond newInstance getBuilder addBond newInstance getBuilder addBond newInstance getBuilder addBond newInstance getBuilder addBond getValue calculate assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDan154()
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.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiPathDescriptor.java
focal_class.identifier: ChiPathDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: ChiPathDescriptor.ChiPathDescriptor()
focal_class.full_signature: public  ChiPathDescriptor()
focal_class.identifier: ChiPathDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ChiPathDescriptor()
focal_class.class_method_signature: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.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: ChiPathDescriptor.order0(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order0(IAtomContainer atomContainer)
focal_class.identifier: order0
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order0(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order1(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order1(IAtomContainer atomContainer)
focal_class.identifier: order1
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order1(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order2(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order2(IAtomContainer atomContainer)
focal_class.identifier: order2
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order2(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order3(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order3(IAtomContainer atomContainer)
focal_class.identifier: order3
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order3(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order4(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order4(IAtomContainer atomContainer)
focal_class.identifier: order4
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order4(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order5(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order5(IAtomContainer atomContainer)
focal_class.identifier: order5
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order5(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order6(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order6(IAtomContainer atomContainer)
focal_class.identifier: order6
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order6(IAtomContainer atomContainer)
focal_class.class_method_signature: ChiPathDescriptor.order7(IAtomContainer atomContainer)
focal_class.full_signature: private List<List<Integer>> order7(IAtomContainer atomContainer)
focal_class.identifier: order7
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: List<List<Integer>>
focal_class.signature: List<List<Integer>> order7(IAtomContainer atomContainer)
focal_class.superclass: extends AbstractMolecularDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtomContainer container) {
          if (sp == null) sp = new SmilesParser(container.getBuilder());
  
          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()));
          }
  
          try {
              List<List<Integer>> subgraph0 = order0(localAtomContainer);
              List<List<Integer>> subgraph1 = order1(localAtomContainer);
              List<List<Integer>> subgraph2 = order2(localAtomContainer);
              List<List<Integer>> subgraph3 = order3(localAtomContainer);
              List<List<Integer>> subgraph4 = order4(localAtomContainer);
              List<List<Integer>> subgraph5 = order5(localAtomContainer);
              List<List<Integer>> subgraph6 = order6(localAtomContainer);
              List<List<Integer>> subgraph7 = order7(localAtomContainer);
  
              double order0s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph0);
              double order1s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph1);
              double order2s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph2);
              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 order7s = ChiIndexUtils.evalSimpleIndex(localAtomContainer, subgraph7);
  
              double order0v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph0);
              double order1v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph1);
              double order2v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph2);
              double order3v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph3);
              double order4v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph4);
              double order5v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph5);
              double order6v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph6);
              double order7v = ChiIndexUtils.evalValenceIndex(localAtomContainer, subgraph7);
  
              DoubleArrayResult retval = new DoubleArrayResult();
              retval.add(order0s);
              retval.add(order1s);
              retval.add(order2s);
              retval.add(order3s);
              retval.add(order4s);
              retval.add(order5s);
              retval.add(order6s);
              retval.add(order7s);
  
              retval.add(order0v);
              retval.add(order1v);
              retval.add(order2v);
              retval.add(order3v);
              retval.add(order4v);
              retval.add(order5v);
              retval.add(order6v);
              retval.add(order7v);
  
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), retval,
                      getDescriptorNames());
          } catch (CDKException e) {
              return getDummyDescriptorValue(new CDKException(e.getMessage()));
          }
  
      }
focal_method.class_method_signature: ChiPathDescriptor.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 order0 order1 order2 order3 order4 order5 order6 order7 evalSimpleIndex evalSimpleIndex evalSimpleIndex evalSimpleIndex evalSimpleIndex evalSimpleIndex evalSimpleIndex evalSimpleIndex evalValenceIndex evalValenceIndex evalValenceIndex evalValenceIndex evalValenceIndex evalValenceIndex evalValenceIndex evalValenceIndex add add add add add add add add add add add add add add add add getSpecification getParameterNames getParameters getDescriptorNames getDummyDescriptorValue getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer container)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtomContainer container)