WeightDescriptor extends AbstractMolecularDescriptor implements IMolecularDescriptor { public WeightDescriptor() {} WeightDescriptor(); @Override DescriptorSpecification getSpecification(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override String[] getDescriptorNames(); @Override DescriptorValue calculate(IAtomContainer container); @Override IDescriptorResult getDescriptorResultType(); @Override String[] getParameterNames(); @Override Object getParameterType(String name);  }
@Test public void testWeightDescriptor() throws Exception { Object[] params = {"*"}; descriptor.setParameters(params); SmilesParser smilesParser = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = smilesParser.parseSmiles("CCC"); Assert.assertEquals(44.095, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 0.001); }