code: public Expr negate() {
          switch (type) {
              case TRUE:
                  type = Type.FALSE;
                  break;
              case FALSE:
                  type = Type.TRUE;
                  break;
              case HAS_ISOTOPE:
                  type = Type.HAS_UNSPEC_ISOTOPE;
                  break;
              case HAS_UNSPEC_ISOTOPE:
                  type = Type.HAS_ISOTOPE;
                  break;
              case IS_AROMATIC:
                  type = Type.IS_ALIPHATIC;
                  break;
              case IS_ALIPHATIC:
                  type = Type.IS_AROMATIC;
                  break;
              case IS_IN_RING:
                  type = Type.IS_IN_CHAIN;
                  break;
              case IS_IN_CHAIN:
                  type = Type.IS_IN_RING;
                  break;
              case NOT:
                  set(this.left);
                  break;
              default:
                  setLogical(Type.NOT, new Expr(this), null);
                  break;
          }
          return this;
      }
docs: Negate the expression, the expression will not return true only if
  the condition is not met. Some expressions have explicit types
  that are more efficient to use, for example:
  <code>IS_IN_RING =&gt; NOT(IS_IN_RING) =&gt; IS_IN_CHAIN</code>. This
  negation method will use the more efficient type where possible.
  <pre>{@code
  Expr e = new Expr(ELEMENT, 8); // SMARTS: [#8]
  e.negate(); // SMARTS: [!#8]
  }</pre>
  @return self for chaining