// ~--- constructors -------------------------------------------------------
  GameTheoryMin(
      IReaction reaction,
      boolean removeHydrogen,
      Map<Integer, IAtomContainer> _educts,
      Map<Integer, IAtomContainer> _products,
      GameTheoryMatrix rpsh)
      throws Exception {
    if (DEBUG) {
      out.println("I am MIN MIX");
    }
    this.canonLabeler = new SmilesMoleculeLabeller();
    this.removeHydrogen = removeHydrogen;
    this.reaction = reaction;
    this.educts = _educts;
    this.products = _products;
    this.reactionName = reaction.getID();
    this.eductList = synchronizedList(rpsh.getEductCounter());
    this.productList = synchronizedList(rpsh.getProductCounter());
    this.mh = rpsh.getMatrixHolder();

    setReactionMolMapping(rpsh.getReactionMolMapping());

    winner = new ChooseWinner(eductList, productList);
    this._dirSuffix = super.getSuffix();

    ReactionIsomorphismHandler RIH = new ReactionIsomorphismHandler(mh, eductList, productList);

    if (RIH.getIsomorphismFlag()) {
      //            System.out.println("ISOMORPHISM");
      mh = RIH.getMatrixHolder();
      GenerateIsoMorphismMapping();
    } else {
      GenerateMapping(false);
    }
  }
  private synchronized double calRelation(IReaction reaction, IMappingAlgorithm theory) {
    try {
      Map<Integer, IAtomContainer> educts =
          synchronizedSortedMap(new TreeMap<Integer, IAtomContainer>());
      for (int i = 0; i < reaction.getReactantCount(); i++) {
        educts.put(i, reaction.getReactants().getAtomContainer(i));
      }

      Map<Integer, IAtomContainer> products =
          synchronizedSortedMap(new TreeMap<Integer, IAtomContainer>());
      for (int i = 0; i < reaction.getProductCount(); i++) {
        products.put(i, reaction.getProducts().getAtomContainer(i));
      }

      GameTheoryMatrix EDSH = new GameTheoryMatrix(theory, reaction, removeHydrogen);

      IGameTheory gameTheory = make(theory, reaction, removeHydrogen, educts, products, EDSH);

      this.reactionBlastMolMapping = gameTheory.getReactionMolMapping();
      EDSH.Clear();

      return gameTheory.getDelta();
    } catch (Exception e) {
      logger.error(e);
      return -1;
    }
  }