From deep TLS validation to ensembles of atomic models built from elemental motions. II. Analysis of TLS refinement results by explicit interpretation

The values of anisotropic atomic displacement parameters (ADPs) that correspond to concerted motions can be obtained from refined TLS matrices analytically or numerically. The difference between the ADPs obtained using these two methods can be used to assess the results of TLS refinement.


Atomic positions in crystal structures
Describing atomic positions in crystal structures by Cartesian coordinates is a mathematical abstraction. Atomic positions are averages over the diffraction data-collection time and over all of the unit cells in the crystal. The variation of positions may range from large, representing discrete conformations, to small, reflecting atomic motion around a central position.
If a motion is harmonic (in particular, this means that the motion amplitude is small), the probability of a shift of an atom n by a vector r n = Áx n i + Áy n j + Áz n k is defined by individual isotropic (B n ) or anisotropic (U n ) atomic displacement parameters (ADPs): U n ¼ hÁx 2 n i hÁx n Áy n i hÁx n Áz n i hÁx n Áy n i hÁy 2 n i hÁy n Áz n i hÁx n Áz n i hÁy n Áz n i hÁz 2 n i 0 @ 1 A : These characteristics of atomic mobility are part of the structural information that is associated with models of crystal structures. As discussed in the literature (see, for example, Dunitz & White, 1973;Murshudov et al., 1999;Winn et al., 2001), the atomic displacement is a superposition of various motions that arise from different sources. These include displacement of atoms as part of a group and individual vibrations. A group motion itself can have several sources such ISSN 2059-7983 as motion of the whole molecule, motion of its domains, sidechain libration etc. Typically, modern refinement programs treat these motions using three separate components: motion of the whole crystal (modelled as an overall anisotropic scale factor), motion of non-overlapping groups that are considered to be rigid, and individual atomic motions.

Rigid-group motion
Atomic displacements arising from rigid-body motions can be accounted for using the TLS model (Schomaker & Trueblood, 1968). Such a model is based on simple geometric considerations allowing the description of elemental harmonic motions of atomic groups in terms of three matrices T, L and S (for a review, see Urzhumtsev et al., 2013). This provides a convenient mathematical way to present these motions in terms of an individual anisotropic ADP, where A n ¼ 0 z n Ày n Àz n 0 x n y n Àx n 0 is an antisymmetric matrix expressed using the Cartesian coordinates (x n , y n , z n ) of atom n with respect to the origin of the TLS group. The symbol denotes the matrix transpose. The TLS approach may be seen as a statistical model for the analytical averaging of atomic positions that vary according to the given elemental motion parameters. The simplest example of a common motion is an isotropic vibration of a group that is equivalent to the assignment of the same B value to all atoms of the group. In the TLS model, the symmetric matrix L corresponds to the libration of a group, the symmetric matrix T corresponds to its common vibrations 1 (also including a correction for the position of the libration axes) and the matrix S reflects correlations between the motions as well as the position of the axes. A set of TLS matrices is defined by 21 parameters (six for T, six for L and nine for S). There is a linear constraint on the diagonal elements of the S matrix (Schomaker & Trueblood, 1968), resulting in 20 independent parameters. If individual atomic displacements can be ignored and the assumption that atomic motions are purely rigid can be accepted (at low resolution, for example), then modelling atomic displacements using TLS can significantly reduce the overall number of fitting parameters. In the following, we refer to the parameterization of an atomic group motion using parameters of elemental rigid-body motions as direct parameterization and that using elements of the T, L and S matrices, such as in (2), as indirect parameterization.
Indirect parameterization is mathematically and computationally more straightforward compared with direct parameterization. This is because of the simple relationship between the refinable elements of the T, L and S matrices and the atomic displacement parameters U using (2). In contrast, direct parameterization requires a nontrivial number of mathematical steps that link the parameters of atomic motions (such as the amplitudes of vibration and libration etc.) to the elements of TLS matrices (see, for example, Urzhumtsev et al., 2015). It is thus unsurprising that model-refinement programs such as phenix.refine (Afonine et al., 2012) and REFMAC (Murshudov et al., 1997) use indirect parameterization for TLS owing to its simplicity; that is, they refine the elements of TLS matrices and not the actual parameters of atomic motions. This approach is inherently problematic because unconstrained or unrestrained refinement of TLS matrices does not guarantee that the derived parameters of atomic motions are physically realistic or comply with TLS theory (see, for example, Zucker et al., 2010;Merritt, 2012;Urzhumtsev et al., 2015). This is very similar to unrestrained refinement of atomic coordinates at typical 'macromolecular resolutions' (e.g. 2-3 Å ): factually, such refinement would almost certainly result in distorted stereochemistry.

Two possible interpretations of TLS models
One may think of at least two possible ways to interpret the results of TLS refinement. One interpretation considers TLS modelling to be successful if it leads to an improvement in the R factors and if the atomic displacement parameters U TLS,n derived from the refined TLS matrices using (2) are realistic (for example, they vary smoothly between neighbouring atoms). A more conservative approach considers TLS modelling to be successful if, in addition to meaningful ADPs and improved model-to-data fit, the TLS parameters comply with the basic assumptions of the corresponding theory set out  (a) A schematic representation of the atomic displacement for pure vibrations along the vertical axis (light and dark blue arrows) and (b) for libration around the axis perpendicular to the view (light and dark red arrows) shown for a five-atom dummy model (black dots). Lighter coloured arrows correspond to displacements with larger amplitudes. The displacements for vibration and libration are similar for small amplitudes and different for large amplitudes (b). The curvature of libration displacements with large amplitudes (b) makes them anharmonic. by Schomaker & Trueblood (1968). This additional requirement is important when atomic motions modelled using TLS parameters are used to describe molecular motions (Trueblood, 1978;Trueblood & Dunitz, 1983; and references therein) or diffuse X-ray scattering data , or are analysed for biological significance (Kuriyan & Weis, 1991;Harris et al., 1992;Š ali et al., 1992;Wilson & Brunger, 2000;Raaijmakers et al., 2001;Yousef et al., 2002;Papiz et al., 2003;Chaudhry et al., 2004); see also discussion in Merritt (1999).

Analytical and numerical calculations of ADPs from TLS models
An interpretation of TLS refinement results in terms of elemental motions (see, for example, Howlin et al., 1993;Urzhumtsev et al., 2015Urzhumtsev et al., , 2016 provides an opportunity to verify whether the corresponding motion parameters agree with TLS theory. This can be performed in two steps as follows. Firstly, the parameters of elemental group motions extracted from refined TLS matrices can be used to obtain an ensemble of models that samples these motions. In turn, (1) can be used to convert the ensemble back to a single model with the uncertainties in atomic positions described using the corresponding ADP values, U ensemble,n . Secondly, (2) can be used to calculate the uncertainties U TLS,n in atomic positions directly from the TLS matrices. It is intuitive to expect that U TLS,n and U ensemble,n will match within some tolerance. The tolerance is needed to account for rounding errors and the finite number of models in the ensemble. A difference between U TLS,n and U ensemble,n beyond this tolerance may be indicative of various problems with the corresponding TLS set.
Since currently used refinement programs utilize an indirect TLS parameterization that does not use restraints or constraints, it may be the case that extracting motion parameters from refined TLS matrices is mathematically impossible (Urzhumtsev et al., , 2016. The simplest example is the T or L matrices being non-positive definite. A more subtle example is when the parameters of elemental motions can be extracted from the TLS matrices but may not satisfy the basic assumptions about the TLS model (for example, libration amplitudes being too large, resulting in atomic motions that are anharmonic; see Fig. 1 and x2).
When motion parameters can be extracted from TLS matrices, comparison of U ensemble,n and U TLS,n requires a measure of and a threshold for the tolerance mentioned above (discussed in x2.1). Since U ensemble,n depends on the number of models in the ensemble, we use a simple test system to estimate how many models are required to sample the group motion accurately and also to estimate a possible threshold value for the similarity of respective matrices (x2.2). The results are then validated using a more realistic protein model (x2.3). These tests highlighted reasons for differences between U TLS,n and U ensemble,n matrices and prompted further improvements for TLS analysis (x2.4). In x3 we discuss the results of the application of our procedures to all models in the PDB (Bernstein et al., 1977;Berman et al., 2000) that contain TLS information. Respective tools have been added to the PHENIX suite (Adams et al., 2010). 2. Anisotropic displacement matrices and the corresponding model ensembles

Metrics for matrix comparison
To evaluate the similarity of the two sets of anisotropic displacement matrices, U TLS,n and U ensemble,n , for a group composed of N atoms, n = 1, 2, . . . , N, we arbitrarily choose to use a simple R-factor-type metric, where U 1,n = U TLS,n and U 2,n = U ensemble,n . Here, the sums are calculated over all elements of the matrices and over all atoms of the group. Other metrics can also be used (Dunitz & White, 1973;Zucker et al., 2010). Specifically, Kullback-Liebler (KL) divergence (Kullback & Leibler, 1951;Murshudov et al., 2011;Merritt, 2011Merritt, , 2012 and the correlation coefficient (CC UV ; Merritt, 1999) seem to be most prominent, with the caveat that they require matrix inversion, which is not always possible in numeric tests where only one single motion can be considered. The calculation of (4) depends on the randomly generated ensemble models that are used to obtain U ensemble,n . This is a stochastic procedure that depends on random seed values and on the number of models in the ensemble. Below, we analyze how these parameters affect the estimate of U ensemble . Also, we check whether using KL UV or CC UV leads to conclusions that differ from those obtained using R U .

Illustrations using a one-atom model
For simplicity, in this section we drop the subscript n from U ensemble and U TLS because only a single atom is considered.
2.2.1. Effect of vibration. In this test, we consider a model composed of a single atom vibrating along the Ox axis. For each trial root-mean-square deviation (r.m.s.d., which we call the vibration amplitude t), we generated M random copies of this atom and then took all of these copies to calculate U ensemble using (1). We then used (4) to compare U ensemble with the corresponding U TLS = T calculated analytically using (2) with L = S = 0. For each trial t we repeated these calculations 100 times, each time with a different random seed. Obviously, for different trials U TLS remains the same while U ensemble varies. Fig. 2(a) shows the average (over 100 trials) R U for different trial values of t and M. The results are essentially independent of t. This is expected since hÁx 2 i in (1) is proportional to T xx = t x 2 in (2) for a sufficiently large number of models. We observe that R U becomes close to 0.01 once the size of the ensemble reaches about 10 000 models.
2.2.2. Effect of libration. Here, we used the same singleatom model as above and the same calculation workflow, except that we varied the libration r.m.s.d. value d. Similarly to the previous example, R U as a function of ensemble size reaches a plateau for about 5000-10 000 models in the ensemble (Fig. 2b); however, the plateau level depends on the value of d. Then we sampled a broad range of d values keeping the ensemble size fixed at 5000 models (Figs. 2c and 2d). We observe that R U remains approximately constant ($0.02) up to a d 0 of $0.15 rad and then starts increasing monotonically. The d 0 value obtained in this numerical experiment corresponds to the limit of a linear approximation to the small rotations discussed in Urzhumtsev et al. (2013) and other works cited therein, for example Cruickshank (1956). Owing to rounding errors and the differences between a rotation motion and a linear motion, the R U values never reached zero even for very small d and large ensemble sizes (Fig.  2c). Also, while the average values over several trials are stable, they may vary between individual trials (Fig. 2d). These results allowed us to draw two conclusions. Firstly, generating about 5000-10 000 models is sufficient to estimate U ensemble reliably (in x2.3 we show that this is still the case for realistic macromolecular models). Secondly, we may consider that U ensemble agrees with U TLS for a particular TLS set if R U is approximately 0.05 or less.

Checking other metrics.
To illustrate that the results obtained in previous tests are independent of matrix-comparison metrics, we repeated the test described in x2.2.2 using other metrics such as KL UV and CC UV . Since these metrics require a matrix inversion, we had to use a minor modification consisting of adding a small value to all of the diagonal elements of the respective matrices U ensemble and the corresponding U TLS , which is a Agreement of R U between U ensemble and U TLS matrices as a function of the number of generated models calculated for protein data. (a) Results for 2igd models composed of all main-chain atoms (red) and C atoms only (blue) using different approaches to extract the elemental motions: dashed lines for (10) and full lines for (11). (b) Results for the 4muy model using (10) shown as a dashed line and (11) shown as a full line.

Figure 2
Agreement between the U ensemble and U TLS matrices calculated for a single-atom model. R U (averaged over 100 random runs) is shown as a function of the logarithm of the number M of models for different (a) vibration and (b) libration r.m.s.d. values. (c) R U (solid line) and KL UV" (dashed line) with " = 10 À6 as a function of the vibration r.m.s.d. value d for ensembles composed of 5000 generated models. (d) R U as a function of the vibration r.m.s.d. value d zoomed on the d = 0.0-0.1 rad range and shown for the average (black curve) as well as for three individual runs (in maroon, blue and green) selected from the 100 runs used for averaging. (e) CC UV" calculated for several " values (10 À2 , 10 À4 , 10 À6 and 10 À8 ). ( f ) KL UV" calculated for the same " values and for small d values; the curves for " values of 10 À6 and 10 À8 are indistinguishable. See the text for details. convolution with an isotropic vibration. For example, the modified KL UV metric is KL UV" = " tr(U " V " À1 + V " U " À1 À 2I) with U " = U + "I and V " = V + "I. The scale factor " before 'tr' is used to put the results on a similar scale (to facilitate comparisons). By trial and error, we found that a value of " in the range 10 À8 -10 À6 allows the calculation of KL UV" and CC UV" but does not significantly affect the results. Overall, KL UV" , CC UV" and R U do not contradict each other (Fig. 2c), with CC UV" showing a much stronger dependence on " (Fig. 2e) and both KL UV" and CC UV" showing a less prominent drop (Figs. 2e and 2f) at a d 0 of $0.10-0.15 rad (see Cruickshank, 1956) compared with R U . In the following we use R U because the original matrices can be used without modification and it has a predictable range of values, unlike KL UV" .

Illustrations using a protein model
As a more realistic example, we selected the model of IgGbinding domain III (PDB entry 2igd; S. Butterworth, V. L. Lamzin, D. B. Wigley, J. P. Derrick & K. S. Wilson, unpublished work) refined at 1.1 Å resolution using individual anisotropic ADP values. We chose the core of this model as a single TLS group containing residues 6-61 (leaving out the flexible N-terminus).
We considered two models derived from these data. One model contained C atoms only (56 in total) and the other model included all main-chain atoms (C , O, C and N). Each of the two models was treated as a single TLS group. For each model we fitted TLS matrices to individual anisotropic U n values (ANISOU records from the PDB file) using the phenix.tls tool; we refer to these matrices as TLS CA and TLS MC , respectively. Then, using each of the two TLS sets (TLS CA and TLS MC ) we calculated U TLS,n using (2) and generated U ensemble,n as described in Urzhumtsev et al. (2015). Similarly to as described in x2.2, we sampled a range of different numbers of models per ensemble.
The blue dashed curve in Fig. 3(a) shows that for the C -only model (TLS CA ) R U becomes smaller than 0.05 when the ensemble contains about 5000 models; using a larger ensemble does not change R U significantly. This agrees with the conclusions derived in x2.2. For the main-chain model R U reaches a plateau for ensembles containing the same number of models, but the value of R U does not decrease below 0.09 (red dashed curve in Fig. 3a). To investigate the source of such a significant difference in R U we performed the following tests.
Firstly, we note that the only difference between the two models is their composition and TLS matrices (Fig. 4).
To determine which of the two, the composition or TLS matrices, contributes to the large R U value, we repeated the calculations above using the C -only model with TLS MC matrices and the main-chain model with TLS CA matrices. In the first case R U was 0.09 and in the second case it was 0.05. This shows that the difference in R U is owing to the TLS matrices and is not owing to the model composition. To find out which features of TLS MC are responsible for the increased R U , we performed a further analysis.
The elemental motions encoded by TLS matrices are three screw librations (around three mutually orthogonal axes l x , l y , l z ) coupled with three vibrations, also about three mutually orthogonal axes v x , v y , v z . In the following, d x , d y , d z stand for libration amplitudes, t x , t y , t z stand for vibration amplitudes, s x , s y , s z stand for the corresponding screw parameters and w x , w y , w z stand for the points that belong to the respective libration axes (for formal definitions, see Urzhumtsev et al., 2013). As discussed in x2.2, the condition U ensemble,n ' U TLS,n (for a sufficiently large number of models in the ensemble) may The TLS matrices calculated for the 2igd model for all main-chain atoms (right) and for C atoms only (left). The matrices are given according to the PDB conventions: T is in Å 2 , L is in deg 2 and S is in Å deg.

Table 1
Analysis of the discrepancy between U ensemble,n and U TLS,n using R U .
For PDB entry 2igd, the two TLS sets, referred to as TLS CA and TLS MC , are derived from anisotropic ADPs of C atoms only or of main-chain atoms, respectively. For each of the sets the parameters of the elemental motions were determined using either (10) or (11) with the constraints described in Urzhumtsev et al. (2015). For both TLS sets the same model composed of C atoms only was used to generate U ensemble,n and compare it with the respective U TLS,n . For the 4muy model all atoms are used both to determine the TLS matrices and to generate U ensemble,n ; the elemental motions were determined using either (10) or (11). The R U (all) column shows the results of comparison when the whole set of motions (librations and vibrations) were used (5). The R U (no V) column indicates the case when only three librations were used while vibration components were excluded (6). The next three columns [R U (d x , s x ), R U (d y , s y ) and R U (d z , s z )] show the results for cases when only one single libration and a corresponding screw were used (7). The last three columns [R U (d x ), R U (d y ) and R U (d z )] represent the pure librations (8).

TLS
Method from the corresponding TLS matrices as described in Urzhumtsev et al. (2015). Here, and in the following, to simplify the text we drop the parameters l x , l y , l z ; w x , w y , w z ; v x , v y , v z from the list in (5) since they are invariant within these tests. Then, using the parameters in (5) ( Table 2) and the C -only model, we calculated U ensemble,n and U TLS,n for the following different scenarios. Firstly, we considered a scenario where all three librations are used together, including their screw components, while vibrations are excluded: Excluding vibrations led to an increase in R U for both TLS MC and TLS CA ; the values in the R U (no V) column in Table 1 are $1.5 times larger 2 than those for R U (all).
Secondly, we calculated R U separately for each individual libration, including its corresponding screw component (Table 1, ), R U (d y ) and R U (d z ) columns in Table 1]. These tests let us draw two conclusions. Firstly, the ensemble size required for reliable calculation of U ensemble,n does not depend on the model size and, similarly to the oneatom case (x2.2), 5000-10 000 models are sufficient. Secondly, large values of the screw components are responsible for the disagreement between U ensemble,n and U TLS,n and the large reesulting R U . This conclusion prompted us to revisit the TLS  Table 2 Components of the elemental motions.
The four upper blocks correspond to the TLS matrices for PDB entry 2igd calculated for C atoms only (TLS CA ) and for the main-chain atoms (TLS MC ). The TLS matrices were decomposed with (10) or (11) using the constraints described in Urzhumtsev et al. (2015). The two bottom blocks correspond to the model for PDB entry 4muy. The vectors v x , v y , v z and l x , l y , l z of the vibration and libration bases, respectively, are given in Cartesian coordinates in the principal basis [M] with the origin at the group centre of mass and with the axes parallel to the crystal axes. The points w x , w y , w z (in Å ) are given in the orthonormal basis [L] composed of the principal libration axes l x , l y , l z and describe the shift of these axes from the origin. The libration amplitudes d x , d y , d z are given in radians and the vibration amplitudes t x , t y , t z and the screw components s x , s y , s z are in Å . For details of the definitions, see Urzhumtsev et al. (2013).  Urzhumtsev et al. (2015).

Improvement of the TLS decomposition
In the decomposition of the TLS matrices into elemental motions, some parameters, including libration amplitudes and axes, are defined unambiguously. However, the screw parameters are derived using the S matrix, which is not unique but is defined with an arbitrary constant that can be added to or subtracted from its diagonal elements (Schomaker & Trueblood, 1968). This freedom in the definition of S does not change the ADP and provides the possibility for alternative (and possibly better) decompositions of the TLS matrices. In Urzhumtsev et al. (2013) we discussed a possible argument for the traditional choice of from the condition Here S xx , S yy , S zz are the diagonal elements of the matrix S expressed in the basis [L] of the principal libration directions; these directions are eigenvectors of the matrix L. In Urzhumtsev et al. (2015) we showed that (9) may result in TLS matrices that do not correspond to elemental motions, and to address this issue we suggested a better choice for the t value, under some additional constraints on that are discussed in that paper. As shown in the previous paragraph, excessively large screw parameters lead to significant discrepancies between U ensemble,n and U TLS,n . This suggests that a better alternative to (9) and (10) might be to choose such that it minimizes the norm of the screw vector |s|. The new condition is then Here, according to equations (5) and (8) in Urzhumtsev et al. (2015), S xx À = s x hd x 2 i and L xx = hd x 2 i (and similar expressions for the four other terms) are the diagonal elements of the matrices S and L given in the basis [L].
In order to test the new approach for adjusting the S matrix, we used the same models and sets of TLS matrices as described in x2.3. For each set of matrices, TLS MC or TLS CA , we extracted elemental motions using (11), generated U ensemble,n using corresponding models and then computed R U values using the previously obtained U TLS,n . Table 1 shows that the updated R U values calculated using (11) to adjust S are acceptably low not only for the total motion but for each of the individual components, both for TLS CA and for TLS MC . Fig. 3(a) shows R U plots as a function of the number of generated models. The curves are nearly identical for both models, showing even lower values for R U than the original curve for the C -only model.
A more striking result is obtained when applying the new correction method to a real-life example: PDB entry 4muy (Span et al., 2014). In all tests TLS groups were used as defined in the PDB file. The 4muy model is composed of 40 TLS groups, and we focus on group No. 6 (residues 65-77 in chain A). The decomposition of the reported TLS matrices into motion parameters using the approach described previously  suggests removing = 10 À5 from the diagonal elements of the S matrix (expressed in Å rad). The R U corresponding to these matrices is very high at 0.61, indicating a large disagreement between U ensemble,n and U TLS,n (Figs. 5a and 5b and the dashed curve in Fig. 3b). We suspected that this disagreement was owing to a very large value of the screw parameter s x of 303.6 for the screw rotation around the  axis l x (Table 1). Applying (11) to adjust the S matrix resulted in increasing to 42 Â 10 À5 , which in turn reduced s x to 0.1 and also reduced the respective R U from 0.89 to 0.02. Fig. 5(c) shows the thermal ellipsoids obtained using the screw libration parameters extracted with (11): clearly, U ensemble,n and U TLS,n are much more similar (compare with Fig. 5a). Fig. 6 shows the variation of R U and of |s| as a function of the value; indeed, the minimum of R U is observed for obtained using (11). The R U for the overall motion decreased to an acceptable value of 0.05, and for the libration alone it decreased from 0.85 to 0.11. The latter value is still high, possibly because by reducing s x the procedure increased the magnitudes of s y and s z (from 2.90 to À3.38 and from À3.11 to À5.14, respectively; Tables 1 and  2). This test shows both the advantage of the new approach (11) compared with (9) and (10) and also its limitations. In this test using other norms, in particular max{|s x |, |s y |, |s z |}, in (11) did not improve the result. In general, there is no guarantee that (11) always results in the best screw parameters and further improvements may be needed, for example by using a local search around the value obtained with (11). Fig. 3(b) shows R U as a function of the ensemble size for the 4muy model generated using parameters obtained with (10) and (11). It shows the significant difference between the results of the two approaches for correcting the S matrix and also confirms the previous observation that 5000-10 000 models are sufficient.

Model selection and analysis setup
The PDB (as of 14 November 2016) contains 123 954 entries, of which 32 162 contain TLS records. Since each PDB entry may contain more than one TLS record, a total of 260 353 TLS groups are available in the PDB. For each of these groups we tried to determine the corresponding elemental motions. This was performed using phenix.tl-s_as_xyz as described in Urzhumtsev et al. (2015).
88 697 groups could be interpreted in terms of elemental motions. In 263 of these cases all three matrices were composed of zeros. Some further 314 groups were excluded because the deposited TLS information was corrupted in a number of different ways (missing TLS group origin, noninterpretable atomic or TLS records etc.).
The remaining 88 120 TLS sets were subjected to three independent rounds of decomposition into elemental motions, each applying corrections to the S matrix using (9), (10) and (11), respectively. When using (10) and (11) the constraints on described in Urzhumtsev et al. (2015) were applied. For each set of extracted parameter values we analyzed the following motions.
(i) A combination of three screw rotations and the vibration component, i.e. the overall motion (5).
(ii) A combination of the screw rotations with no vibration components (6).  Table 3 Number of TLS groups with ADP matrices that are reproducible by explicit group motions (R U 0.05).
PDB content (November 2016): 32 162 entries containing TLS records, 260 353 TLS groups in total. For 263 TLS groups all three matrices were zero and these groups were excluded from further work. Decomposition of TLS matrices into parameters of elemental motions was performed using (9), (10) and (11). The 'Extracted groups' column shows the total number of TLS groups for which parameter extraction was possible and 'Extracted entries' shows the number of PDB entries for which this was possible for all of the groups. 'Wrong content' shows the number of groups for which random-model generation was impossible for technical reasons and 'Libration undefined' shows the number of groups for which all libration matrices were zero. Other columns: overall motion (5), overall libration (6), conditions verified for each of the three librations of the group including their screw components (7) and conditions verified for each of the three pure librations of the group (8)

Figure 6
Variation of the vector norm |s| (11) (maroon) and of the R U value (black) as a function of the parameter that is subtracted simultaneously from all diagonal elements of the S matrix during the decomposition of TLS matrices into parameters of elemental motions (4muy data; see x2.4). Small oscillations in R U illustrate its stochastic nature.
(iii) Each of the three screw rotations individually (7).
(iv) Each of the three pure rotations (8). For each of these motions we calculated U TLS,n . We then generated an ensemble of 5000 models using phenix.tls_as_xyz and we used this ensemble to calculate U ensemble,n . Finally, we compared U ensemble,n with U TLS,n using R U . Details of this analysis are given in Table 3 and are commented on below.
3.2. Analysis of the elemental motions using (9) Table 3 shows the overall statistics and the number of TLS groups with R U 0.05. For the overall motion combining all elemental components together (5), about half of the TLS groups for which we could extract the motion parameters pass the test condition R U 0.05 (this is approximately 17% of the total number of deposited TLS groups). The same condition applied when considering libration components only (6) reduced the number of acceptable groups roughly by half. In the case of considering librations individually (equations 7 and 8) the criterion R U 0.05 selects only 2.3% of the TLS groups (6107 groups).
There are 45 sets where using pure rotations gives R U > 0.05, all of which correspond to large libration amplitudes. Thus, the main source of the discrepancies between U ensemble,n and U TLS,n are the screw components.
We checked (Fig. 7a) the distribution of the TLS groups as a function of R U calculated for the overall motion (5), for the motion excluding vibrations (6) and separately for the screw components (7). The first distribution (maroon full rectangles) has a peak in the interval 0.02-0.05 which corresponds to the TLS matrices that comply with the underlying study. Nevertheless, for a significant number of sets this value is above 0.05. Major problems come from screw components, for which many TLS groups have an R U above 0.10 or even above 0.20 (blue full rectangles).
The largest value of |s| observed across all TLS groups is greater than 1000 Å . Such a large value means that for a rotation of 0.01 rad, i.e. approximately 0.6 , the rotated atoms would move by 10 Å in the direction of the rotation axis, which is clearly physically unrealistic. Fig. 7(b) shows that there are many groups with large values of |s|. The larger the screw parameter |s|, the larger the R U values (Fig. 7c). However, since a particular screw motion also depends on the libration amplitude and on the positions of the axes, this does not allow anharmonic rotations to be discriminated unambiguously using this value alone (Fig. 7c). (10) and (11) Using the approach in (10) allows motion parameters to be extracted for 6700 more TLS sets compared with (9). Table 3 and Fig. 7(b) show that the distributions of R U values and the screw parameters |s| are similar to those using (9).

Figure 7
Distribution of TLS groups in the PDB. (a) Number of TLS groups with R U values in the given intervals; distributions are shown for the total motions (maroon), for the total motions excluding vibration components (green) and for the individual screw rotations (blue). The histograms are shown when using (9) (full rectangles) and (11) (open rectangles). (b) Number of screw rotations as a function of the screw parameter |s|; the histograms are shown when using (9) (blue rectangles), (10) (light blue rectangles) and (11) (open rectangles). R U values are calculated for all independent screw librations (7). (c) Number of TLS groups with different R U values for the given interval of |s|. The screw parameters were extracted by the procedure using (9); R U values are calculated as in (b). See x3 for details.
Repeating the same calculations using (11) shows a significantly greater difference compared with using (10) ( Table 3). Considering all motions together, the number of groups for which R U 0.05 increased results in more than 12 000 groups compared with using (9). Considering only screw librations, the number of groups satisfying the condition R U 0.05 is doubled compared with using (9) ('Individual screw' column in Table 3). Fig. 7(b) shows that the number of rotations with a large value of the screw parameter |s| is significantly reduced. The largest value of |s| fell to below 700 Å (which is still overly large). Fig. 7(a) shows that using the approach in (11) instead of that in (9) significantly shifts all three distributions to the left (compare the open rectangles with the full rectangles in Fig. 7a), i.e. it improves the similarity between U ensemble,n and U TLS,n . In particular, R U 0.10 for the majority of TLS sets when analyzing only the matrices for the total motion (5). However, considering vibrations alone, R U > 0.10 for more than a third of the models even when using the improved decomposition into elemental motions (11).

Discussion
Validation of atomic models is now routine in macromolecular crystallography and is an integral part of structure submission to the Protein Data Bank (Read et al., 2011;Gore et al., 2017). It requires nomenclature compliance and fit to experimental data. Atomic coordinates are subjected to validation that includes analysis of stereochemistry and molecular packing. Atomic displacement parameters (ADPs) are also subjected to validation. For isotropic ADPs the existing validation criteria are rather simple: their values must be positive, not excessively large and not vary too much between neighbouring atoms. For anisotropic ADP values the criteria are somewhat more complex (Hirshfeld, 1976;Schneider, 1996). Similarly to atomic coordinates and displacement parameters, TLS matrices are model parameters and therefore should be subjected to some form of validation. Depending on the accepted paradigm (x1.3) the scope of TLS validation may refer to two questions: (i) how well does the the TLS approximation explain the experimental data and how well does it describe the atomic displacement parameters (see, for example, Merritt, 2011Merritt, , 2012 and (ii) are the particular descriptors of the TLS model also consistent with the TLS formalism in addition to (i). Addressing the first question does not require analysis of the TLS matrices themselves but only of the derived ADP values. This includes making sure that the ADPs are positive definite and vary smoothly between adjacent atoms and TLS groups (Winn et al., 2001;Zucker et al., 2010;Merritt, 2011Merritt, , 2012. The current work addresses the second question, which focuses exclusively on the analysis of TLS matrices and the parameters of group motion that they encode. Since modern atomic model refinement packages use an indirect TLS parameterization (x1.3), i.e. they refine the elements of the TLS matrices and not the parameters of group motions, it is unsurprising to find that some TLS matrices do not comply with the assumption of harmonic motion that the TLS modelling theory is built upon. The number of such cases may vary based upon the different measures or thresholds that are used. For example, using the criteria discussed above we find that only 2.3% of the TLS groups reported in the PDB can be interpreted in terms of elemental harmonic motions. We envisage two reasons for this. Firstly, the validation of TLS refinement results, focusing on TLS matrices and corresponding group motions, has never been enforced. Secondly, the implementation of TLS refinement in modern refinement packages does not allow control of the parameters of group motion by means of restraints or constraints (see a discussion in Painter & Merritt, 2006) because these parameters are refined indirectly. Unsurprisingly, such unrestrained refinement provides no guarantee of TLS matrices that are interpretable in terms of harmonic elemental motions.
In this work, we have developed methods and a software implementation in the PHENIX suite to analyze the results of TLS refinements. These methods are based on comparison of individual atomic displacement parameters calculated analytically from the TLS matrices with ADPs derived numerically using parameters of elemental motions extracted from the TLS matrices. We theorise that large differences between these matrices indicate problematic TLS parameters. In particular, this may indicate a suboptimal choice of TLS groups or refinement protocol. We show that a post-refinement correction of the deposited TLS matrices makes it possible to curate some but not all of the problematic TLS groups.
The analyses presented in this work rely on the choice of particular criteria (metrics and thresholds). These criteria may be optimized further, which is a nontrivial project and may help to diagnose the problem while still not addressing it. A possibly better investment of effort would be to improve TLS refinement protocols so that they operate in terms of elemental parameters of motions, which has been proposed previously (Tickle & Moss, 1999). This would make it possible to control the refinable parameters directly during refinement and therefore keep them physically realistic without the need for post-refinement corrections. This is a major undertaking both mathematically and algorithmically, which may be considered as a future improvement to the PHENIX refinement software.
The methods and tools discussed in this manuscript have been implemented and are available in PHENIX 1.12 and later. Data and scripts that can be used to reproduce the figures and tables are available at http://phenix-online.org/ phenix_data/afonine/tls2/.