Пример #1
0
  private boolean unMappedAtomsEqualsIndexI(
      int setNumB,
      List<Integer> i_bond_setB,
      int newMappingSize,
      int atomIndex,
      int counter,
      List<Integer> new_Mapping,
      Integer indexI,
      Integer indexJ,
      Integer order) {
    boolean normal_bond = true;
    for (int c = 0; c < newMappingSize; c++) {
      if (new_Mapping.get(c * 2 + 1).equals(indexJ)) {
        setBondNeighbors(indexI, indexJ, order);
        if (cTab2Copy.get(atomIndex * 4 + 3).compareToIgnoreCase("X") == 0) {
          step1(atomIndex, counter);
          McGregorChecks.changeCharBonds(
              indexJ, signArray[counter], setNumB, i_bond_setB, cTab2Copy);
          int cor_atom =
              McGregorChecks.searchCorrespondingAtom(newMappingSize, indexJ, 2, new_Mapping);
          McGregorChecks.changeCharBonds(
              cor_atom, signArray[counter], newNeighborNumA, newINeighborsA, newCNeighborsA);
          counter++;

        } else {
          step2(atomIndex);
        }

        normal_bond = false;
        neighborBondNumB++;
      }
    }
    return normal_bond;
  }
Пример #2
0
  private boolean unMappedAtomsEqualsIndexJ(
      IAtomContainer target,
      int mappingSize,
      int atomIndex,
      int counter,
      List<Integer> mapped_atoms,
      Integer indexI,
      Integer indexJ,
      Integer order) {
    boolean normal_bond = true;
    for (int c = 0; c < mappingSize; c++) {
      if (mapped_atoms.get(c * 2 + 1).equals(indexI)) {
        setBondNeighbors(indexI, indexJ, order);
        if (cTab2Copy.get(atomIndex * 4 + 2).compareToIgnoreCase("X") == 0) {
          step3(atomIndex, counter);
          McGregorChecks.changeCharBonds(
              indexI, signArray[counter], target.getBondCount(), target, cTab2Copy);
          int cor_atom =
              McGregorChecks.searchCorrespondingAtom(mappingSize, indexI, 2, mapped_atoms);
          McGregorChecks.changeCharBonds(
              cor_atom, signArray[counter], newNeighborNumA, newINeighborsA, newCNeighborsA);
          //                                changeCharBonds(cor_atom, signArray[counter],
          // query.getBondCount(), query, cTab1Copy);
          counter++;
        } else {
          step4(atomIndex);
        }
        normal_bond = false;
        neighborBondNumB++;
      }
    }

    return normal_bond;
  }