RuleOfFiveDescriptor extends AbstractMolecularDescriptor implements IMolecularDescriptor { public RuleOfFiveDescriptor() {} RuleOfFiveDescriptor(); @Override DescriptorSpecification getSpecification(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override String[] getDescriptorNames(); @Override DescriptorValue calculate(IAtomContainer mol); @Override IDescriptorResult getDescriptorResultType(); @Override String[] getParameterNames(); @Override Object getParameterType(String name);  }
@Test public void testRuleOfFiveDescriptor() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {Boolean.TRUE}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("CCCC(OCC)OCC(c1cccc2ccccc12)C4CCC(CCCO)C(CC3CNCNC3)C4"); addExplicitHydrogens(mol); Assert.assertEquals(3, ((IntegerResult) descriptor.calculate(mol).getValue()).intValue()); }