getRing(ringId) {
    for (var i = 0; i < this.rings.length; i++) {
      if (this.rings[i].id == ringId) {
        return this.rings[i];
      }
    }
  }
Gets a ring object from the array of rings associated with the current molecule by its id. The ring id is not equal to the index, since rings can be added and removed when processing bridged rings.

@param {Number} ringId A ring id.
@returns {Ring} A ring associated with the current molecule.