ProtonTotalPartialChargeDescriptor extends AbstractAtomicDescriptor implements IAtomicDescriptor { public ProtonTotalPartialChargeDescriptor() {} ProtonTotalPartialChargeDescriptor(); @Override DescriptorSpecification getSpecification(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override String[] getDescriptorNames(); @Override DescriptorValue calculate(IAtom atom, IAtomContainer ac); @Override String[] getParameterNames(); @Override Object getParameterType(String name);  }
@Test public void testProtonTotalPartialChargeDescriptorTest() throws java.lang.Exception { double[] testResult = {0.07915, 0.05783, 0.05783, 0.05783}; IAtomicDescriptor descriptor = new ProtonTotalPartialChargeDescriptor(); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("CF"); addExplicitHydrogens(mol); DoubleArrayResult retval = (DoubleArrayResult) descriptor.calculate(mol.getAtom(0), mol).getValue(); for (int i = 0; i < testResult.length; ++i) { Assert.assertEquals(testResult[i], retval.get(i), 0.00001); } }