/*
 * Copyright (c) 2026 University of Insubria <https://www.uninsubria.it>
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version. All we ask is that proper credit is given
 * for our work, which includes - but is not limited to - adding the above
 * copyright notice to the beginning of your source code files, and to any
 * copyright notice that you may distribute with programs based on this work.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation, Inc.
 * <https://fsf.org/>
 */

package qsardes.descriptor.qsarwb;

import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.graph.Cycles;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IRingSet;
import qsardes.descriptor.DescriptorRingCount;

/**
 * Ring count descriptors (QSAR-WB Descriptors).
 * <BR><BR>
 * Calculates ring count descriptors.
 * <BR><BR>
 * Returns
 * <BR><BR>
 * nRing - rings count.
 * <BR>
 * n#Ring - #-membered rings count.
 * <BR>
 * nG12Ring - Greater than 12-membered rings count.
 * <BR><BR>
 * nHeteroRing - Rings containing heteroatoms
 * (N, O, P, S, or halogens) count.
 * <BR>
 * n#HeteroRing - #-membered rings containing heteroatoms
 * (N, O, P, S, or halogens) count.
 * <BR>
 * nG12HeteroRing - Greater than 12-membered rings containing heteroatoms
 * (N, O, P, S, or halogens) count.
 * <BR><BR>
 * # is the member number spanning from 3 to 12.
 * <BR><BR>
 * nFRing - Fused rings count.
 * <BR>
 * nF*Ring - *-membered fused rings count.
 * <BR>
 * nFG12Ring - Greater than 12-membered fused rings count.
 * <BR><BR>
 * nTRing - Rings count (including counts from fused rings).
 * <BR>
 * nT*Ring - *-membered rings count (including counts from fused rings).
 * <BR>
 * nTG12Ring - Greater than 12-membered rings count (including counts from fused
 * rings).
 * <BR><BR>
 * nFHeteroRing - Fused rings containing heteroatoms
 * (N, O, P, S, or halogens) count.
 * <BR>
 * nF*HeteroRing - *-membered fused rings containing heteroatoms
 * (N, O, P, S, or halogens) count.
 * <BR>
 * nFG12HeteroRing - Greater than 12-membered fused rings containing
 * heteroatoms (N, O, P, S, or halogens) count.
 * <BR><BR>
 * nTHeteroRing - Rings containing heteroatoms (N, O, P, S, or halogens)
 * count (including counts from fused rings).
 * <BR>
 * nT*HeteroRing - *-membered rings containing heteroatoms
 * (N, O, P, S, or halogens) count (including counts from
 * fused rings).
 * <BR>
 * nTG12HeteroRing - Number of Greater than 12-membered rings containing
 * heteroatoms (N, O, P, S, or halogens) count (including counts from
 * fused rings).
 * <BR><BR>
 * * is the member number spanning from 4 to 12.
 *
 * @author Nicola Chirico
 */
public final class QsarWBRingCount extends DescriptorRingCount
{
    public QsarWBRingCount()
    {
    }

    @Override
    protected IRingSet get_t_ring_set(IAtomContainer iac) throws CDKException
    {
        return Cycles.all(iac).toRingSet();
    }
}
