2° structure dependency
In roder to introduce into the algorithm the 2° structure dependency we add to the calculation a topology factor and use Dssp (Kabsch W., 1983) to assign the residues of the aligned proteins with a secondary structure (alpha Helix, beta sheet or a loop). we regard the alpha Helix and beta sheet residues as Structure and loop residues as Loop.
The table above illustrates the criteria that influence the topology factor: the 2° structure assignment (red cells), and the spatial relation matrix (green cells). For example, cell i, j is an alignment of two loop assigned residues and is regarded as a match due to the spatial neighboring of Ca atoms i and j according to the spatial relation matrix. The figure at the bottom illustrates a graphic representation of the table. It shows the indices (black), the 2° structure assignment (red), the match between j and e Ca atoms and the mismatch between the e and k Ca atoms.
Once we have the secondary structure assignment and the SNRM of the alignemd proteins we can calculate every movement during the alignment as follows:
The addition of the secondary structure dependency into the affine gap and affine mismatch alignment addes more gap types according to the secondary structure the cell the gap starts from aligns. Therefore, we have 6 gap types for every dirction up and left that we need to remeber their value, as depicited in the figure below:

movments weights
These payoffs are the weights that determine the alignment. The ratio between
the payoffs endows upon the alignment its affine mismatch secondary structure-dependent
nature. The ratio payoff has the following criteria:
(1) The payoff for opening a mismatch in a loop-to-loop is higher than that
in a structure-to-structure alignment. Similarly, the payoff for continuing
a mismatch in a loop-to-loop is higher than that in a structure-to-structure
alignment. These ratios guarantee that the best alignment will favor few long
mismatches over many short regions and favor mismatches in loops over mismatches
in a-helix and ß-sheets.
(2) The payoff for a match in a structure-to-structure is higher than a match
in a loop-to-loop alignment. This reflects the tendency for matches in structure-assigned
residues.
(3) The payoff for opening a mismatch is always smaller than continuing an
already opened mismatch. This favors few long mismatch regions over many short
ones.
(4) We expect loop-to-structure alignment to appear more often in the margins
of the assigned secondary structure, where the assignment might be imprecise.
To ensure some flexibility in the alignment, the payoffs of loop-to-structure
are the average of the loop-to-loop and structure-to-structure alignment payoffs.