Exemplo n.º 1
0
        private int GetDistance(string refStructure, string modelStructure, float [] cent1, float [] cent2)
        {
            if (!pdbs.molDic.ContainsKey(refStructure) || !pdbs.molDic.ContainsKey(modelStructure))
            {
                return(int.MaxValue);
            }
            posMOL locPosMol = opt.PrepareData(pdbs.molDic[refStructure], pdbs.molDic[modelStructure]);

            return((int)(opt.Rmsd(locPosMol.posmol1, locPosMol.posmol2, cent1, cent2, false) * 100));
        }
Exemplo n.º 2
0
 private int ThreadingGetDistance(string refStructure, string modelStructure, float[] cent1, float[] cent2, int threadNum)
 {
     if (!pdbs.molDic.ContainsKey(refStructure) || !pdbs.molDic.ContainsKey(modelStructure))
     {
         return(int.MaxValue);
     }
     if (pdbPos == null)
     {
         posMOL locPosMol = optList[threadNum].PrepareData(pdbs.molDic[refStructure], pdbs.molDic[modelStructure]);
         return((int)(optList[threadNum].Rmsd(locPosMol.posmol1, locPosMol.posmol2, cent1, cent2, false) * 100));
     }
     else
     {
         return((int)(optList[threadNum].Rmsd(pdbPos[hashIndex[refStructure]], pdbPos[hashIndex[modelStructure]], null, null, false) * 100));
     }
 }
Exemplo n.º 3
0
        private float [,] GetStructAfterRotation(string refStructure, string modelStructure)
        {
            float[,] transMatrix = null;

            if (!pdbs.molDic.ContainsKey(refStructure) || !pdbs.molDic.ContainsKey(modelStructure))
            {
                return(null);
            }
            posMOL locPosMol = opt.PrepareData(pdbs.molDic[refStructure], pdbs.molDic[modelStructure]);

            transMatrix = opt.TransMatrix(locPosMol.posmol2, locPosMol.posmol1);
            if (transMatrix == null)
            {
                return(null);
            }
            return(Optimization.MultMatrixTrans(locPosMol.posmol2, transMatrix));
            //return opt.TransMatrix(opt.posMol1, opt.posMol2);
        }