Exemplo n.º 1
0
        /// <summary>
        /// reverse the residue sequence id after interface comparing
        /// </summary>
        /// <param name="interChains2"></param>
        /// <param name="alignInfoTable"></param>
        public void ReverseSupInterfaces(InterfaceChains interface2, DataTable alignInfoTable)
        {
            DataRow alignRow  = null;
            DataRow alignRow2 = null;

            AtomInfo[] chain1     = interface2.chain1;
            string     asymChain1 = interface2.firstSymOpString.Substring(0, interface2.firstSymOpString.IndexOf("_"));

            alignRow = GetAlignRow(alignInfoTable, asymChain1);
            ReverseSupChain(chain1, alignRow);

            AtomInfo[] chain2     = interface2.chain2;
            string     asymChain2 = interface2.secondSymOpString.Substring(0, interface2.secondSymOpString.IndexOf("_"));

            if (asymChain1 != asymChain2)
            {
                alignRow2 = GetAlignRow(alignInfoTable, asymChain2);
                ReverseSupChain(chain2, alignRow2);
                interface2.seqDistHash =
                    ReverseSupInterface(interface2.seqDistHash, alignRow, alignRow2);
            }
            else
            {
                ReverseSupChain(chain2, alignRow);
                interface2.seqDistHash =
                    ReverseSupInterface(interface2.seqDistHash, alignRow);
            }
            interface2.ClearSeqResidueHash();
        }
Exemplo n.º 2
0
        /// <summary>
        /// reverse the residue sequence id after interface comparing
        /// </summary>
        /// <param name="interChains2"></param>
        /// <param name="alignInfoTable"></param>
        public void ReverseSupInterfaces(InterfaceChains interface1, InterfaceChains interface2,
                                         DataTable alignInfoTable, bool isReverse)
        {
            DataRow alignRow  = null;
            DataRow alignRow2 = null;

            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)
            {
                ReverseSupChain(chain21, alignRow);
            }
            if (entityId21 == entityId22 && entityId11 == entityId12)
            {
                ReverseSupChain(chain22, alignRow);
                interface2.seqDistHash =
                    ReverseSupInterface(interface2.seqDistHash, alignRow);
            }
            else
            {
                alignRow2 = GetAlignRow(alignInfoTable, entityId12, entityId22);
                if (alignRow2 != null)
                {
                    ReverseSupChain(chain22, alignRow2);
                    interface2.seqDistHash =
                        ReverseSupInterface(interface2.seqDistHash, alignRow, alignRow2);
                }
            }
            if (isReverse)
            {
                interface2.Reverse();
            }
            interface2.ClearSeqResidueHash();
        }