/// <summary> /// /// </summary> /// <param name="interface2"></param> /// <param name="alignRow"></param> public void SuperposeInterfaces(InterfaceChains interface2, DataTable alignInfoTable) { AtomInfo[] chain1 = interface2.chain1; string asymChain1 = interface2.firstSymOpString.Substring(0, interface2.firstSymOpString.IndexOf("_")); DataRow alignRow = GetAlignRow(alignInfoTable, asymChain1); SuperposeChain(chain1, alignRow); AtomInfo[] chain2 = interface2.chain2; string asymChain2 = interface2.secondSymOpString.Substring(0, interface2.secondSymOpString.IndexOf("_")); if (asymChain1 != asymChain2) { DataRow alignRow2 = GetAlignRow(alignInfoTable, asymChain2); SuperposeChain(chain2, alignRow2); interface2.seqDistHash = SuperposeInterface(interface2.seqDistHash, alignRow, alignRow2); } else { SuperposeChain(chain2, alignRow); interface2.seqDistHash = SuperposeInterface(interface2.seqDistHash, alignRow); } interface2.ResetSeqResidueHash(); }
/// <summary> /// superpose interfaces based on psiblast alignment /// </summary> /// <param name="interChains2"></param> /// <param name="alignInfoTable"></param> public double SuperposeInterfaces(InterfaceChains interface1, InterfaceChains interface2, DataTable alignInfoTable, bool isReverse) { DataRow alignRow = null; DataRow alignRow2 = null; double identity = 100.0; if (isReverse) { interface2.Reverse(); } int entityId11 = interface1.entityId1; AtomInfo[] chain21 = interface2.chain1; int entityId21 = interface2.entityId1; int entityId12 = interface1.entityId2; AtomInfo[] chain22 = interface2.chain2; int entityId22 = interface2.entityId2; alignRow = GetAlignRow(alignInfoTable, entityId11, entityId21); if (alignRow != null) { identity = Convert.ToDouble(alignRow["Identity"].ToString()); SuperposeChain(chain21, alignRow); } if (entityId21 == entityId22 && entityId11 == entityId12) { SuperposeChain(chain22, alignRow); interface2.seqDistHash = SuperposeInterface(interface2.seqDistHash, alignRow); } else { alignRow2 = GetAlignRow(alignInfoTable, entityId12, entityId22); if (alignRow2 != null) { if (identity > Convert.ToDouble(alignRow2["Identity"].ToString())) { identity = Convert.ToDouble(alignRow2["Identity"].ToString()); } SuperposeChain(chain22, alignRow2); } interface2.seqDistHash = SuperposeInterface(interface2.seqDistHash, alignRow, alignRow2); } // reset the hashtable for residue and its bb atoms. interface2.ResetSeqResidueHash(); return(identity); }