class SpiroAtomCountDescriptor extends AbstractMolecularDescriptor implements IMolecularDescriptor {

    @Override
    public DescriptorValue calculate(IAtomContainer atomContainer) {
        int nSpiro = 0;

        try {
            IAtomContainer local = atomContainer.clone();
            Cycles.markRingAtomsAndBonds(local);
            for (IAtom atom : local.atoms()) {
                if (getSpiroDegree(local, atom) != 0)
                    nSpiro++;
            }
            return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(),
                    new IntegerResult(nSpiro), getDescriptorNames());
        } catch (CloneNotSupportedException e) {
            return getDummyDescriptorValue(e);
        }
    }

    public  SpiroAtomCountDescriptor();

}