visitStereochemistry(vertexId, previousVertexId, visited, priority, maxDepth, depth, parentAtomicNumber = 0) {
    visited[vertexId] = 1;
    let vertex = this.graph.vertices[vertexId];
    let atomicNumber = vertex.value.getAtomicNumber();

    if (priority.length <= depth) {
      priority.push(Array());
    }

    for (var i = 0; i < this.graph.getEdge(vertexId, previousVertexId).weight; i++) {
      priority[depth].push(parentAtomicNumber * 1000 + atomicNumber);
    }

    let neighbours = this.graph.vertices[vertexId].neighbours;

    for (var i = 0; i < neighbours.length; i++) {
      if (visited[neighbours[i]] !== 1 && depth < maxDepth - 1) {
        this.visitStereochemistry(neighbours[i], vertexId, visited.slice(), priority, maxDepth, depth + 1, atomicNumber);
      }
    } // Valences are filled with hydrogens and passed to the next level.


    if (depth < maxDepth - 1) {
      let bonds = 0;

      for (var i = 0; i < neighbours.length; i++) {
        bonds += this.graph.getEdge(vertexId, neighbours[i]).weight;
      }

      for (var i = 0; i < vertex.value.getMaxBonds() - bonds; i++) {
        if (priority.length <= depth + 1) {
          priority.push(Array());
        }

        priority[depth + 1].push(atomicNumber * 1000 + 1);
      }
    }
  }
@param {Number} vertexId The id of a vertex.
@param {(Number|null)} previousVertexId The id of the parent vertex of the vertex.
@param {Uint8Array} visited An array containing the visited flag for all vertices in the graph.
@param {Array} priority An array of arrays storing the atomic numbers for each level.
@param {Number} maxDepth The maximum depth.
@param {Number} depth The current depth.