private bool UnMappedAtomsEqualsIndexI(IAtomContainer query, IAtomContainer target, int atomIndex, int counter, IList <int> mappedAtoms, int indexI, int indexJ, int order) { bool normalBond = true; for (int c = 0; c < newNeighborNumA; c++) { if (mappedAtoms[c * 2 + 0].Equals(indexI)) { SetBondNeighbors(indexI, indexJ, order); if (string.Equals(cTab1Copy[atomIndex * 4 + 2], "X", StringComparison.OrdinalIgnoreCase)) { Step3(atomIndex, counter); McGregorChecks.ChangeCharBonds(indexJ, signs[counter], query.Bonds.Count, query, cTab1Copy); int corAtom = SearchCorrespondingAtom(newNeighborNumA, indexJ, 1, mappedAtoms); McGregorChecks.ChangeCharBonds(corAtom, signs[counter], target.Bonds.Count, target, cTab2Copy); counter++; } else { Step4(atomIndex); } normalBond = false; neighborBondNumA++; //Console.Out.WriteLine("Neighbor"); //Console.Out.WriteLine(neighborBondNumA); } } return(normalBond); }
private bool UnMappedAtomsEqualsIndexI(int setNumA, int setNumB, IList <int> iBondSetA, IList <int> iBondSetB, int atomIndex, int counter, IList <int> newMapping, int indexI, int indexJ, int order) { bool normalBond = true; for (int c = 0; c < newNeighborNumA; c++) { if (newMapping[c * 2 + 0].Equals(indexI)) { SetBondNeighbors(indexI, indexJ, order); if (string.Equals(cTab1Copy[atomIndex * 4 + 2], "X", StringComparison.OrdinalIgnoreCase)) { Step3(atomIndex, counter); McGregorChecks.ChangeCharBonds(indexJ, signs[counter], setNumA, iBondSetA, cTab1Copy); int corAtom = McGregorChecks.SearchCorrespondingAtom(newNeighborNumA, indexJ, 1, newMapping); McGregorChecks.ChangeCharBonds(corAtom, signs[counter], setNumB, iBondSetB, cTab2Copy); counter++; } else { Step4(atomIndex); } normalBond = false; neighborBondNumA++; } } return(normalBond); }
private bool UnMappedAtomsEqualsIndexJ(IAtomContainer target, int mappingSize, int atomIndex, int counter, IList <int> mappedAtoms, int indexI, int indexJ, int order) { bool normalBond = true; for (int c = 0; c < mappingSize; c++) { if (mappedAtoms[c * 2 + 1].Equals(indexI)) { SetBondNeighbors(indexI, indexJ, order); if (string.Equals(cTab2Copy[atomIndex * 4 + 2], "X", StringComparison.OrdinalIgnoreCase)) { Step3(atomIndex, counter); McGregorChecks .ChangeCharBonds(indexI, signArray[counter], target.Bonds.Count, target, cTab2Copy); int corAtom = McGregorChecks.SearchCorrespondingAtom(mappingSize, indexI, 2, mappedAtoms); McGregorChecks.ChangeCharBonds(corAtom, signArray[counter], newNeighborNumA, newINeighborsA, newCNeighborsA); // ChangeCharBonds(corAtom, signArray[counter], query.Bonds.Count, query, cTab1Copy); counter++; } else { Step4(atomIndex); } normalBond = false; neighborBondNumB++; } } return(normalBond); }