The weights are calculated as shown in: Valdar and Thronton (2001)
According to the following formulas:
$$W_{j} = \frac{\sum_{k\neq j}^{N}Dist(s_{j},s_{k}))}{N-1}$$
where:
\(W_{j}\) is the weight of sequence \(s_{j}\), and is defined as the average evolutionary
distance between \(s_{j}\) and all other sequences in the alignment
\(N\) is the number of sequences in the alignment.
$$Dist(s_{j},s_{k})) = 1 = \frac{\sum_{i\epsilon Aligned_{jk}}Mut(s_{j},s_{k}))}{n(Aligned_{jk}))}$$
where:
\(Dist(s_{j},s_{k})\), the evolutionary distance between sequences \(s_{j}\) and \(s_{k}\)
\(Aligned_{jk}\) is the set of all non-gap positions in \(s_{j}\) or \(s_{k}\), \(n(Aligned_{jk})\) is the number of such positions.
$$Mut(a,b) = \frac{m(a,b) - min(m)}{max(m) - min(m)}$$
where:
\(Mut(a,b)\) measures the similarity between amino acids \(a\) and \(b\) as derived from \(a\) mutation data matrix \(m\)