Skip to main content
. 2014 Nov 25;24(4):508–524. doi: 10.1002/pro.2610

Table I.

Basic pseudo-code for the MASTER search algorithm (some time-saving features of the algorithm are omitted for clarity)

Input: query Q with L segments
Input: database structure T
Output: match list M
1 set C(k) to all residues in T, for k=1…L
2 set M to an empty set
3 set m to an empty match
4 return masterSearch(C,m,1)
5masterSearch(C,m,k) {
6 for each iInline graphic C(k) do
7 set r to RMSD(k,i)a
8 if r > maxA(k)b
9 eliminate i from the list C(k)
10 continue
11 end if
12 if (r > maxB(k)c) OR (cRMSD(k)d > maxC(k)e)
13 continue
14 end if
15 set m(k) to residue i
16 if (k == L)
17 insert match m into M
18 else
19 [dmin, dmax] = distBounds(k)f
20 C(k+1) = residues in T within [dmin, dmax] of m(k)
21 masterSearch(C,m,k+1)
22 end if
23 end for
24 }
a

Computes the individual RMSD of segment k when aligned onto T with position i corresponding to the central residue of k.

b

Upper bound on the RMSD of the k-th segment, assuming a perfect fit for all others [Eq. (5)].

c

Upper bound on the RMSD of k-th segment given the residuals already accumulated by segments 1..k − 1 [Eq. (6)].

d

Computes the cumulative RMSD incurred by the first k segments aligned together.

e

Upper bound on the joint RMSD of the first k segments assuming a perfect fit for the remainder [Eq. (7)].

f

Computes upper and lower bounds on the distance between k-th segment and the next one to be aligned, based on the currently accumulated residuals [Eq. (10)].