static getBondCount(atoms, adjacencyMatrix) {
    let count = 0;

    for (let u of atoms) {
      for (let v of atoms) {
        if (u === v) {
          continue;
        }

        count += adjacencyMatrix[u][v];
      }
    }

    return count / 2;
  }
Returns the number of bonds within a set of atoms.

@param {Set<Number>} atoms An array of atom ids.
@param {Array[]} adjacencyMatrix An adjacency matrix.
@returns {Number} The number of bonds in a set of atoms.