@Test
public void testPetitjeanShapeIndexDescriptor() throws ClassNotFoundException, CDKException, Exception {

    // first molecule is nbutane, second is naphthalene
    String filename = "data/mdl/petitejean.sdf";
    InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
    ISimpleChemObjectReader reader = new MDLV2000Reader(ins);
    ChemFile content = (ChemFile) reader.read((ChemObject) new ChemFile());
    List cList = ChemFileManipulator.getAllAtomContainers(content);
    IAtomContainer ac = (IAtomContainer) cList.get(0);
    DescriptorValue result = descriptor.calculate(ac);
    DoubleArrayResult dar = (DoubleArrayResult) result.getValue();
    Assert.assertEquals(0.5, dar.get(0), 0.00001);
    Assert.assertEquals(0.606477, dar.get(1), 0.000001);
    ac = (IAtomContainer) cList.get(1);
    result = descriptor.calculate(ac);
    dar = (DoubleArrayResult) result.getValue();
    Assert.assertEquals(0.666666, dar.get(0), 0.000001);
    Assert.assertEquals(0.845452, dar.get(1), 0.000001);
}