Exemple #1
0
        // αR: −100° ≤ φ ≤ −30°, −80° ≤ ψ ≤ −5°;
        // near-αR: −175° ≤ φ ≤ −100°, −55° ≤ ψ ≤ −5°;
        // αL: 5° ≤ φ ≤ 75°, 25° ≤ ψ ≤ 120°;
        // β: −180° ≤ φ ≤ −50°, 80° ≤ ψ ≤ −170°;
        // PIR: −180° ≤ φ ≤ −115°, 50° ≤ ψ ≤ 100°;
        // PIIL: −110° ≤ φ ≤ −50°, 120° ≤ ψ ≤ 180°
        public static SS[] GetPhiPsiSS(IChain peptide, int minStructureLength = 1)
        {
            int start = 1;

            SS[] bins = new SS[peptide.Count];
            for (int i = 1; i < peptide.Count - 1; i++)
            {
                // Make the bin assignment
                if (i != peptide.Count - 1)
                {
                    double phi = peptide.GetPhiDegrees(i);
                    double psi = peptide.GetPsiDegrees(i);
                    if (-100 <= phi && phi <= -30 && -80 <= psi && psi <= -5)
                    {
                        bins[i] = SS.Helix;
                    }

                    if (-180 <= phi && phi <= -50 && (psi <= -170 || 80 <= psi))
                    {
                        bins[i] = SS.Extended;
                    }
                }

                // Clear preceding assignments in range [start, i-1] if there
                // is a transition before the minimum structure length
                if (bins[i] != bins[start])
                {
                    if (i - start < minStructureLength)
                    {
                        for (int j = start; j < i; j++)
                        {
                            bins[j] = SS.Loop;
                        }
                    }
                    start = i;
                }
            }
            for (int i = 0; i < peptide.Count; i++)
            {
                if (bins[i] == SS.Undefined)
                {
                    bins[i] = SS.Loop;
                }
            }
            return(bins);
        }
Exemple #2
0
 public double GetPhiDegrees(int index)
 {
     return(_template.GetPhiDegrees(index));
 }