WienerNumbersDescriptor extends AbstractMolecularDescriptor implements IMolecularDescriptor { public WienerNumbersDescriptor() { } WienerNumbersDescriptor(); @Override DescriptorSpecification getSpecification(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override String[] getDescriptorNames(); @Override DescriptorValue calculate(IAtomContainer atomContainer); @Override IDescriptorResult getDescriptorResultType(); @Override String[] getParameterNames(); @Override Object getParameterType(String name);  }
@Test public void testWienerNumbersDescriptor() throws Exception { double[] testResult = {18, 2}; SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("[H]C([H])([H])C([H])([H])C(=O)O"); AtomContainerManipulator.removeHydrogens(mol); DoubleArrayResult retval = (DoubleArrayResult) descriptor.calculate(mol).getValue(); Assert.assertEquals(testResult[0], retval.get(0), 0.0001); Assert.assertEquals(testResult[1], retval.get(1), 0.0001); }