
The construction of the gradient is significantly different for the models , , , and . In Figure 15.1 the construction of the chisquared gradient ∇χ^{2} for the global model is demonstrated. In this case
where ∇χ^{2}_{i} is the vector of partial derivatives of the chisquared equation χ^{2}_{i} for the residue i. The length of this vector is
∇χ^{2}_{i} = dim  (15.10) 
with each position of the vector j equal to where each θ_{j} is a parameter of the model.
The construction of the gradient ∇χ^{2} for the model is simply a subset of that of . This is demonstrated in Figure 15.1 by simply taking the component of the gradient ∇χ^{2}_{i} denoted by the symbol ∂ (the orange blocks) and summing these for all residues. This sum is given by (15.9) and
∇χ^{2}_{i} = dim  (15.11) 
For the parameter set , which consists of the local τ_{m} parameter and the modelfree parameters of a single residue, the gradient ∇χ^{2}_{i} for the residue i is simply the combination of the single orange block and single yellow block of the index i (Figure 15.1).
The modelfree parameter set is even simpler. In Figure 15.1 the gradient ∇χ^{2}_{i} is simply the vector denoted by the single yellow block for the residue i.
The relax user manual (PDF), created 20161028.