code: @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();
      }
docs: {@inheritDoc}