class RingMembershipAtom extends SMARTSAtom {

    @Override
    public boolean matches(IAtom atom) {
        if (ringNumber < 0)
            return invariants(atom).ringConnectivity() > 0;
        else if (ringNumber == 0)
            return invariants(atom).ringConnectivity() == 0;
        else
            return ringNumber == invariants(atom).ringNumber();
    }

    public  RingMembershipAtom(int num, IChemObjectBuilder builder);

}