Machine-learning prediction algorithms such as AlphaFold and RoseTTAFold can create remarkably accurate protein models, but these models usually have some regions that are predicted with low confidence or poor accuracy. We hypothesized that by implicitly including new experimental information such as a density map, a greater portion of a model could be predicted accurately, and that this might synergistically improve parts of the model that were not fully addressed by either machine learning or experiment alone. An iterative procedure was developed in which AlphaFold models are automatically rebuilt on the basis of experimental density maps and the rebuilt models are used as templates in new AlphaFold predictions. We show that including experimental information improves prediction beyond the improvement obtained with simple rebuilding guided by the experimental data. This procedure for AlphaFold modeling with density has been incorporated into an automated procedure for interpretation of crystallographic and electron cryo-microscopy maps.
Advanced machine-learning-based structure prediction algorithms are transforming the way that three-dimensional structures of proteins and their complexes are obtained1,2,3,4,5,6. The AlphaFold1 and RoseTTAFold2 algorithms, for example, can create accurate predictions for substantial regions of a protein structure that are based on the amino acid sequence of that protein and on residue covariation information7 present in a multiple sequence alignment1. Prediction can be augmented by including experimentally determined structures of proteins with similar sequences as templates1. In many cases, the predicted models are accurate enough to allow straightforward experimental structure determination using molecular replacement in macromolecular crystallography or by docking a structure in a density map in single-particle electron cryo-microscopy (cryo-EM), without requiring that a similar structure has been previously determined5,6,8.
There are limitations in using predicted models for structure determination3,4,9. In particular, machine-learning methods typically do not yield accurate predictions for all of the residues in a protein10. This is partly due to the presence of disordered segments in many proteins1,11, but is also due to the limited size and accuracy of multiple sequence alignments for part or all of some protein sequences, resulting in a limited amount of available information about residue covariation1. A related limitation is that parts of proteins that can adopt alternative conformations may be systematically predicted in only one of them1,12; this limitation may be reduced by alternative sampling of multiple sequence alignments12. Additionally, individual domains of proteins are often predicted accurately, but in the absence of extensive conserved interaction surfaces the spatial relationship between domains cannot be unambiguously predicted with current methods3. A final limitation is that as these machine-learning methods are trained on structures in the Protein Data Bank (PDB)1, predictions are likely to be biased towards these known structures even if they are not included explicitly as templates in prediction.
A strength of recent machine-learning algorithms for protein structure prediction is that they can assess the accuracies of their own predictions. AlphaFold, for example, estimates the value of a commonly used measure of prediction accuracy (lDDT-Cα13) for each residue in a protein and reports these estimates as a confidence measure, plDDT1. Validation with known structures demonstrated that these AlphaFold plDDT values are reasonably good indicators of actual accuracy (Pearson’s r value relating plDDT and lDDT-Cα is 0.73 (ref. 10)).
It is well known that the accuracy of structure prediction can be improved by including external structural information, for example distances between specified pairs of residues in a protein14. In AlphaFold and RoseTTAFold, for example, residue pair distance information is implicitly derived from sequence covariation1,2. It is reasonable to expect that experimental structural information from density maps such as those used in cryo-EM or crystallographic structure determination could be included as well, though a mechanism for incorporation of this information in a form that is compatible with modeling would be required.
The hypothesis underlying the present work is that new experimental information might improve structure prediction synergistically, where correcting one part of a protein chain might improve structure prediction in another part of the chain. In AlphaFold, a core algorithm focuses attention on features that may contribute the most to structure prediction1. An internal recycling procedure uses the path of the protein chain in one cycle to focus attention on interactions that should be considered in the next cycle. If experimental information were to result in adjustments in conformation, the attention mechanism might recognize important relationships that otherwise would have been missed. This refocusing of the prediction algorithm might lead to improvements well beyond the experimentally guided changes in conformation. At the same time, improvement in the accuracy of a predicted model might make it easier to identify modifications to that model needed to obtain a better match to the density map. These possibilities suggest that an iterative procedure for incorporation of information from a density map into structure prediction might further improve the accuracy of modeling. This would be similar to the situation in macromolecular crystallography, where improvement of one part of a model leads to improved estimates of crystallographic phases, in turn improving the density map everywhere and allowing still more of the model to be built15.
A second hypothesis in this work is that information from a density map can be partially captured in the form of a rebuilt version of a predicted model that has been adjusted to match the map. The structure of such a model could only represent a small part of the total information in a map, but it seemed possible that much of the key information could be captured, including overall relationships between domains in a protein as well as the detailed conformation of the protein. As AlphaFold can use models of known proteins as templates1, such a rebuilt model could readily be incorporated into subsequent cycles of structure prediction.
We tested the ideas that that new experimental information might improve structure prediction synergistically and that information from a density map can be captured in the form of a rebuilt model by developing an automated procedure in which a predicted AlphaFold model is trimmed, superimposed (docked) on a cryo-EM density map, and rebuilt to better match the map. The rebuilt model was then supplied along with the sequence to AlphaFold in a new cycle of prediction. The output of this procedure is a new AlphaFold model that has incorporated new experimental information through the use of the rebuilt template in the prediction. We applied four cycles of the iterative algorithm to the sequence of one protein chain and the full density map for each of 25 cryo-EM structures, all deposited after the training database for the version of AlphaFold we used was created (July 2020). In these tests, multiple sequence alignments were included in each stage of AlphaFold modeling. To emulate the situation where no similar structure is present in the PDB, templates from the PDB were not used. For each protein we then examined the four AlphaFold models obtained (one for each cycle of modeling), comparing them to the corresponding deposited model (used as our best estimate of the true structure) and to the corresponding deposited density map.
Iterative structure prediction and model rebuilding using a density map
Figure 1a–f illustrates iterative structure prediction for one of these structures, that of a focused reconstruction of SARS-CoV-2 spike protein receptor binding domain (RBD) in a complex with neutralizing antibodies16 (3.7 Å; Electron Microscopy Data Bank (EMDB) entry 23914, PDB entry 7MLZ; only the spike protein is analyzed here). The five-stranded β-sheet (Fig. 1a, lower left corner) in the AlphaFold model (in blue) was created on the basis of the sequence of the spike protein and can be superimposed closely on the deposited model (in brown), but the loops near P479 in the right part of Fig. 1a then do not match well. Note that the deposited model is presented only for comparison and is not used in any of the calculations. The same AlphaFold model is shown along with the density map in Fig. 1d, where it can be appreciated that the density map does not clearly show the path of the protein chain. The agreement between the AlphaFold model and the map is considerably worse than between the deposited model and map (map correlation with map calculated from deposited model is 0.70; from AlphaFold model is 0.41). Figure 1b shows a rebuilt version of this AlphaFold model (in purple) obtained after automatic rebuilding using the density map. It is different from the blue predicted model in Fig. 1a and agrees better with the density map (Fig. 1e), where the map correlation increased from 0.41 to 0.58. The percentage of Cα atoms in the deposited model matched within 3 Å by a Cα atom in the rebuilt model was also somewhat improved over that for the superimposed AlphaFold model (from 71% to 76%). This rebuilt model was used as a template in AlphaFold modeling, with the goal of providing the inference procedure with some additional information about which parts of the structure are close together, and the rebuilding and modeling were repeated for a total of four iterations. The AlphaFold model obtained after iterative prediction and rebuilding is shown in green in Fig. 1c. It matches the deposited model (in brown) much more closely than the original AlphaFold model obtained with sequence alone, particularly in the loop region near residue P479, and 91% of Cα atoms in the deposited model were matched within 3 Å by a Cα atom in the superimposed AlphaFold model. The overall map correlation for AlphaFold model obtained after iterative prediction and rebuilding is 0.57. Note that unlike the rebuilt model, the AlphaFold predicted model shown in Fig. 1c has not been adjusted by coordinate refinement or rebuilding; it is simply superimposed as a rigid unit on the density map. The similarity obtained to the map and to the deposited model therefore reflects an improvement in the AlphaFold prediction itself.
Overall, Fig. 1a–f shows that the AlphaFold model obtained with our iterative procedure and shown in green in Fig. 1c is much more similar to the deposited model (brown) than either the predicted AlphaFold model created with sequence alone (shown in blue in Fig. 1a) or the rebuilt version of this predicted model (shown in purple in Fig. 1b). The improvement over the original AlphaFold model supports the idea that a template created by rebuilding an AlphaFold model using a density map contains information from that density map that can be used to improve AlphaFold structure prediction. The observations that the AlphaFold model obtained using a density map also improves upon the rebuilt model and that iteration improves the AlphaFold model support the idea that model rebuilding is synergistic with AlphaFold prediction, yielding a new model that is better than either alone. Our observations are consistent with the idea that this synergy comes from providing additional information to the attention mechanism used in AlphaFold but are also consistent with other mechanisms. For example, an alternative hypothesis also consistent with our observations is that AlphaFold is capable of improving a model that is not too different from the true structure, and rebuilding the model can bring it within the radius of convergence of AlphaFold.
Figure 1g–i illustrate the improvement of another AlphaFold prediction by iterative rebuilding and modeling. A detail of the superimposed AlphaFold prediction of the 2AG3 Fab heavy chain17 is shown in Fig. 1g along with the corresponding portion of the density map from EMDB entry 23883 at a resolution of 3.0 Å. The superimposed predicted model does not match the density well, and the r.m.s.d. of all matching Cα atoms from the deposited model is 3.6 Å. Figure 1h shows that the superposed AlphaFold model obtained after one cycle of iterative rebuilding matches the map considerably better, and Fig. 1i shows that after four cycles the AlphaFold model closely matches the density map. The full AlphaFold prediction for this heavy chain obtained after four cycles of iteration with the density map has an r.m.s.d. of matching Cα atoms from the deposited model of just 0.8 Å.
Figure 1j compares the accuracy of AlphaFold models obtained without and with density information for all of the 25 recently deposited structures considered. The ordinate of Fig. 1j is the percentage of Cα atoms in each AlphaFold model superposing within 3 Å of a Cα atom in the corresponding deposited model (that is, 100% means that all Cα atoms superimpose within 3 Å). The abscissa in Fig. 1j is the same metric, but applied to the AlphaFold model obtained after iterative improvement. Points above the unit line shown correspond to cases where iterative modeling and building improves the accuracy of AlphaFold modeling. The inclusion of density information increased the number of these 25 structures with at least 90% of Cα atoms superposing within 3 Å from 12 to 20. This set of models is assessed on the basis of r.m.s.d. of matching Cα atoms in Fig. 1k demonstrating that in most cases the iterative AlphaFold models have much lower r.m.s.d. from corresponding deposited models than predictions using sequence alone.
Figure 1l extends this analysis further by comparing the 25 models obtained using iterative AlphaFold modeling and model rebuilding (abscissa) with models created directly from density maps using an automatic model-building algorithm18 that is based on many of the same tools used here in model rebuilding, but without including AlphaFold at all (ordinate). All but one of the iterative AlphaFold models are more accurate than the corresponding models created by automatic model building alone.
Validation using a structure not present at the time of AlphaFold training
In the cases described above, it was possible that information about the specific sequences that are being modeled could be present in the AlphaFold parameter database because similar structures may have been present in the PDB when AlphaFold was trained. In this work we are comparing AlphaFold predictions that are identical except that they are carried out with and without templates, so this does not directly affect our conclusion that AlphaFold modeling and rebuilding using a density map are synergistic. There was a possibility, however, that including the density information in these examples allowed AlphaFold prediction to use some pre-existing information about similar structures, rather than truly incorporating new information from the density maps. To address such a possibility, we carried out an analysis of a structure for which no similar structure was present in the PDB when AlphaFold training was carried out. The structure we used was that of a domain of a bacterial flagellar basal body19 (PDB entry 7BGL, chain a, residues 250–365, EMDB entry 12183, resolution of 2.2 Å) included in the CASP-14 structure prediction competition20 (target identification of T1047s2-D3). The PDB entry with the most similar sequence (PDB entry 2HM2) present at the time of AlphaFold training has a sequence identity of just 9% and has a very different structure20. Parts of the structure of this domain from the basal body are accurately predicted by AlphaFold20; however, there was a substantial difference in the arrangement of two antiparallel strands relative to the cryo-EM structure, as well as a small difference in the position of a helix (Fig. 2a, compare the four-stranded sheet in the AlphaFold model in blue with the two-stranded sheet in the deposited model in brown at the left side, and compare positions of the blue and brown helices in the center).
We used the flagellar basal body (7BGL) structure to test whether iterative AlphaFold prediction and model rebuilding would be effective in a case where AlphaFold was trained without any similar structures. In this test, fragments from a model automatically built from the density map were included in model rebuilding, and multiple sequence alignments were only used in the first cycle of AlphaFold modeling. These options were chosen to improve model rebuilding and to allow the conformations of the rebuilt models to guide the AlphaFold prediction. Figure 2a showed that a standard AlphaFold prediction leads to a model that has some correct and some substantially incorrect parts. Note that the deposited model in brown is missing residues 285–315, which are not visible in the density map. These residues are modeled by AlphaFold but are not included in our comparisons. Iteration of AlphaFold modeling with model rebuilding yields a model that agrees more closely with the deposited (7BGL) model (Fig. 2b) This iterative AlphaFold model is much more accurate than the original AlphaFold prediction (Fig. 2a) on the basis of r.m.s.d. between matching Cα atoms (1.7 Å versus 4.7 Å) and by percentile-based spread, which de-emphasizes large discrepancies21 (0.3 Å versus 2.0 Å). It is similar to, but somewhat more accurate than, the initial rebuilt model (r.m.s.d. of 1.8 Å, percentile-based spread of 0.4 Å). To check that the improvement in prediction with iteration was not simply due to leaving out the multiple sequence alignment in predictions after the first, we carried out AlphaFold modeling without a multiple sequence alignment and without information from the map. This resulted in a prediction that was quite different from that of the deposited model (r.m.s.d. of 11.5 Å, percentile-based spread of 11.2 Å). These observations show that the synergy in iterative AlphaFold modeling and model rebuilding using a density map can be obtained even if AlphaFold is trained in the absence of any similar structures. Three cycles of iteration were used in this example.
The flagellar basal body structure is a symmetric 26-mer (C26), while the AlphaFold prediction in CASP-14 used a monomer, and we also used the sequence of a monomer in our analysis. It seemed possible that some of the sequence covariation present in the multiple sequence alignment would be due to inter-subunit contacts, and that if we supplied a sequence corresponding to a homo-oligomer, AlphaFold might be able to use this inter-subunit contact information to create a more accurate model of each individual chain. We carried out predictions with a trimer and a dodecamer of the 7BGL sequence and compared one chain from each with the deposited model. The conformation of each chain in predictions from the trimer were similar to that of the predicted monomer in Fig. 2a and had an r.m.s.d. from the deposited model of 3.8 Å. Three of five dodecamer predictions had a conformation for each single chain that was more like the deposited model, with an r.m.s.d. of superposed Cα atoms for the top-scoring model of 3.0 Å. For comparison, the iterative AlphaFold model in Fig. 2b has an r.m.s.d. of 0.8 Å. This indicates that the AlphaFold prediction could be somewhat improved in this case by modeling more than one chain.
Application to automated analysis of cryo-EM or crystallographic maps
An immediate application of iterative prediction and model rebuilding is automatic analyses of cryo-EM or crystallographic density maps. Though tools exist for this purpose, automatic map interpretation is challenging, particularly when high-resolution maps are not available. For example, Fig. 3a–d show that automatically generated models created by each of two automated tools18,22 using the experimental density map for the SARS-CoV-2 spike protein structure illustrated in Fig. 1 fail to create a model resembling the deposited structure. The automated map interpretation methods in Fig. 3a,c are able to match just 60% and 24%, respectively, of Cα atoms in the corresponding deposited model within 3 Å. A corresponding analysis using a cutoff of 2 Å is shown in Extended Data Fig. 1.
The output of the iterative AlphaFold modeling and map-based rebuilding process described above is a predicted AlphaFold model that is already positioned to match the density in a map. The predicted model may still require some adjustment indicated by the density map, and such adjustment can be carried out by automatic refinement23 or rebuilding as described above. The resulting refined or rebuilt model is an automatically generated interpretation of the corresponding part of the density map. Our procedure can therefore also be viewed as a method to automatically interpret a density map, incorporating information from a density map into AlphaFold modeling in the process.
Figure 3e presents results from the same analysis of cryo-EM maps as that shown in Fig. 1, this time from the perspective of automated map interpretation. As in a real case where the structure is not known, each full density map is supplied without any trimming or masking. The sequence of one chain to be interpreted in this map was used to create a standard AlphaFold prediction. That predicted model is automatically oriented to match the map, rebuilt to match the density in the map, and included in the next AlphaFold prediction. After iteration, the last version of the model that was rebuilt to match the map is the output of the procedure. This differs from Fig. 1 in that the final model is now no longer an AlphaFold model, but instead is an AlphaFold model that has been adjusted to match the map. The progress of map interpretation for each of the 25 recent cryo-EM density maps considered in Fig. 1j is shown in Fig. 3e. Some of these structures contain multiple copies of the same chain. In these cases, matching any copy was allowed in this evaluation. Others contained multiple chains with similar sequences (for example, proteasome structures 7LSX and 7LS5, the antibody heavy and light chains in 7MJS, and the αβγδ histones in 7LV9). In these cases, a match was allowed to whichever chain matched the location the automatic docking had chosen (the correct location was actually picked in all cases except for 7LV9, a structure at a resolution of 4.5 Å). For each structure and density map, Fig. 3e shows this percentage of matching Cα atoms for the initial AlphaFold model (superimposed on the deposited chain with secondary-structure matching) and the four automatically docked and iteratively rebuilt models. The structures are arranged on the basis of the resolutions of the corresponding maps, with finer (higher) resolution on the left and coarser (lower) resolution on the right. The SARS-Cov-2 spike protein structure16 shown in Fig. 1 is labeled as 7MLZ in Fig. 3e; it can be seen that the automated interpretation of this density map starts with 71% of Cα atoms in the deposited model matched by the rebuilt model and improves with each cycle of rebuilding until the next-to-last cycle, where 92% are matched, and no additional improvement is obtained on the final cycle. Others that improve substantially include 7M7B (improving from 59% to 77% matched), 7LX5 (75% to 91%), and 7LCI (73% to 95%). In 18 of 25 cases a model matching at least 95% of Cα atoms in the deposited structure within 3 Å was obtained; this level of accuracy was present in only 11 of the starting AlphaFold models. Two of the cases (7LV9 and 7MSW) yielded very poor models (Fig. 3e). In each of these cases, the initial AlphaFold model was predicted with very low confidence. In the case of 7LV9, the plDDT for only 5 of 97 residues was above the threshold for a ‘good’ prediction of 0.7, for 7MSW this portion was 86 of 635 residues. Overall, the accuracy of the 25 chains examined improved from an average of 82% of Cα atoms in the deposited model matched of to an average of 91% after iterative modeling and rebuilding.
We note that in some cases improvement occurs mostly in the first cycle (for example, 7LCI, 7BMB), in others, several cycles of improvement occur and then no further improvement is found (for example, 7EDA, 7LX5, 7MLZ), and in others little improvement is obtained at all or the quality even decreases (7KU7, 7M9C). Overall, the number of cycles over which improvement occurs appears to vary considerably and it may be useful to continue iteration until the changes in the model are small. It seems possible that the variability may be due to failure of our rebuilding tools to find the correct conformation of parts that need rebuilding and that improvements or new methods of rebuilding may improve the overall process considerably.
As the procedures described here are not specific to AlphaFold, to cryo-EM maps or to the Phenix24 model rebuilding software used in this work, we expect that the synergy of model prediction and model rebuilding using a density map observed here will be general and that similar results could be obtained using other model prediction and model rebuilding approaches and using other types of density maps such as those obtained in cryo-tomography or crystallography.
In the test cases described here, individual chains in a cryo-EM structure have been predicted with AlphaFold, first without information from the cryo-EM density map and then after iteratively incorporating information from that map. In many of the cases examined, the AlphaFold prediction is improved by using templates derived from the initial AlphaFold prediction and automatic rebuilding using the density map. In practice, this entire procedure could be used as a first step in structure determination, yielding a docked AlphaFold model that can be more accurate than one predicted without the density map. Once this docked predicted model is obtained it can then be rebuilt manually25.
We did not use templates from the PDB to help guide the AlphaFold predictions described here. Although including templates was found (on average) to be of only minimal overall utility in improving the accuracy of AlphaFold models1 it seems likely that in at least some cases including templates representing part or all of the structure to be modeled could be very useful.
The examples described here range in resolution from 2.4 Å to 4.5 Å, and we expect that the overall approach will apply most effectively to structures at resolutions of about 4.5 Å or better because this is the range of resolutions where model rebuilding is currently most effective. As model-building tools improve, the low-resolution range where the procedure is useful may be further extended. Additionally, the low-resolution range may possibly be extended with existing tools by only carrying out refinement and not attempting to rebuild parts of the structure that do not match the density map.
Choice of maps and models
The 25 maps and corresponding models shown in Figs 1 and 3 were chosen in August 2021 in a way that was intended to yield relatively representative recent structures in the PDB. We selected the first protein chain in the 25 most recently deposited unique cryo-EM structures at the time with resolution of 4.5 Å or better and containing between 100 and 1,000 residues. For this purpose, we considered two structures to be duplicates if the first protein chains matched in sequence at a level of 99% identity or greater. We included one pair of similar structures in the 25 structures chosen (7MLZ and 7LX5). These differ in residues at the ends of the chain and differ also in that the SARS-Cov-2 spike protein (the chain analyzed) is bound to different antibodies in the two structures. The PDB and EMDB accession numbers for these 25 structures are listed in Extended Data Table 1.
The choice of structure and map to test model creation using AlphaFold trained without similar sequences in the PDB was made by selecting the (one) structure in CASP-14 that was determined by cryo-EM, classified as a ‘hard’ target in CASP-1427, and for which experimental data is available in the EMDB and PDB. This structure was PDB entry 7BGL (ref. 19), EMDB entry 12183. We chose domain 3 of chain a in this structure as AlphaFold performed poorly on this target in CASP-14 (rank of 78) compared to most other targets (rank of 1 for all other 7BGL targets).
We note that the software was developed at the same time as the analysis and used some of the samples in the analysis in development. Consequently, it is possible that even though the same code and parameters are used for all the work shown here there may be choices made in parameters that improved results for these cases but that might not improve them for a completely new set of structures.
Map and model display
Figures were prepared with ChimeraX28 v.1.2.5.
For the analyses shown in Figs 1 and 3, the full maps corresponding to each structure were used. The overall resolution-dependent sharpening or blurring of maps were automatically adjusted using the deposited model with the Phenix tool local_aniso_sharpen (without the local sharpening feature but applying the anisotropic correction). For the 7BGL structure in Fig. 2, the map was boxed so as to include the density corresponding to the domain that was analyzed, but was not masked (density corresponding to other chains was therefore present as well).
Overall procedure for iterative AlphaFold model generation and model rebuilding using a density map
The first cycle of our iterative procedure consists of creating an AlphaFold model using a Google Colab (https://colab.research.google.com/) AlphaFold2 notebook, followed by downloading the resulting model and automatically trimming, docking and rebuilding the model with the density map and the Phenix tool dock_and_rebuild. Subsequent cycles consisted of converting the rebuilt model to mmCIF format29, uploading the model to the Colab notebook, generating a new AlphaFold model using the rebuilt model as a template, and rebuilding as in the first cycle. A total of four cycles were carried out. We considered the last AlphaFold model obtained in this procedure to be the AlphaFold model created with information from a density map, and the last rebuilt model to be the overall final model produced by the procedure.
AlphaFold model generation
We used a slightly modified version of the ColabFold notebook30 to create models with AlphaFold. The principal difference from ColabFold is that this notebook can create models for a group of sequences, each with optional uploaded templates. This allowed us to analyze all the structures in Fig. 1 as a group. Another difference is that this notebook allows any combination of use of templates supplied by the user and chosen from the PDB and the optional use of multiple sequence alignments. The notebook is available at https://colab.research.google.com/github/phenix-project/Colabs/blob/main/alphafold2/AlphaFold2.ipynb. In the first cycle of AlphaFold model generation, no templates were used and multiple sequence alignments were included. In subsequent cycles, the rebuilt model from the previous cycle was used as a template. For the examples in Fig. 1, multiple sequence alignments were included in all cycles; for the 7bgl example in Fig. 2, they were included only in the first cycle.
Automatic model trimming, docking and rebuilding
We used the Phenix24 tool dock_and_rebuild to orient AlphaFold models in a density map and rebuild them based on the map. This is accomplished in five overall steps: trimming and splitting into domains, docking of individual domains, morphing the full AlphaFold model to match the docked domains, creating rebuilt versions of the model, and assembly of the best parts of the rebuilt versions of the model. All these steps are carried out automatically with the dock_and_rebuild tool that in turn uses other Phenix tools to carry out individual steps. Key parameters are noted in the text below; except as noted, default values were used throughout this work.
Model trimming and splitting into compact domains
AlphaFold models are automatically trimmed and split into domains on the basis of the coordinates of the AlphaFold model and on estimates of confidence (plDDT values1) supplied by AlphaFold for each residue in the structure. The Phenix tool process_predicted_model is used for this purpose. Residues with plDDT value less than 70 (the threshold for a ‘good’ prediction1) are removed and the remaining residues are grouped into ‘domains’ (up to three by default, controlled by the parameter ‘maximum_domains’) consisting of one or more parts of the chain that contain a sufficient number of residues (ten residues, controlled by the parameter ‘minimum_domain_length’) and form a compact unit. This grouping can be carried out based on spatial proximity (default), or on the basis of the predicted uncertainties in Cα–Cα distances. We note that in cycles after the first, a template is supplied that derives in part from the previous AlphaFold model, resulting in systematically higher plDDT values. In this work we have not quantified this effect or adjusted the threshold to account for it.
Domain docking into density
The compact groups of residues (‘domains’) obtained by trimming the AlphaFold model are aligned, one at a time, to the density map. Two approaches are used. The first approach uses secondary-structure matching (SSM) to dock the domain onto the map using the Phenix tool superpose_and_morph with the setting ‘ssm_match_to_map = True’ (see below for details of this tool). The second approach consists of a direct correlation search between model-based density and the map using the Phenix tool dock_in_map24. Normally these procedures are carried out sequentially, and if the first yields a match with a map-model correlation (CC_mask value using the Phenix tool map_model_cc) sufficiently large (typically 0.3, controlled by the parameter ‘ssm_search_min_cc’) the other is skipped. On the hypothesis that the transformations for different domains may often be similar, the transformations for successfully docked domains are considered as possible transformations for each additional domain. These methods typically yield a set of possible placements of each domain in the map. If symmetry is automatically detected in the map24, these placements also include all the possibilities obtained by applying this symmetry to placements found directly.
The final inclusion and placement of each domain is then chosen by maximizing an empirical scoring function. The function includes the fraction of domains that are placed and the map correlation for each placement. It also includes a penalty for placing two domains further apart than can be spanned by the number of residues between those domains, and a penalty function for the number of Cα atoms in one domain overlapping with those in another domain within 3 Å (controlled by the parameter ‘overlap_ca_ca_distance’). The score starts out at zero. If the map correlation for each domain is at least 0.15 (‘minimum_docking_cc’) the score is given large positive increases (200 units) for each of the following that occur: (1) lowest map correlation of all docked domains is greater than 0.5 (set with ‘acceptable_docking_cc’); (2) if (1) occurs, and all placements also have similar transformations (that is, the docking was essentially a rigid-body docking), where two transformations are similar if applying them to a domain gives an r.m.s. difference in coordinates equal to the resolution of the map or less; (3) all domains are docked; (4) the fraction of residues that overlap between domains is less than 0.1 (‘allowed_fraction_overlapping’); and (5) no domains are further apart than can be spanned by the number of residues between those domains. If any domains are further apart than can be spanned by the number of residues between those domains plus twice the resolution plus 15 Å (‘maximum_connectivity_deviation’), 200 units are subtracted from the score. The resulting score is then adjusted with the following additions and subtractions: (1) the lowest map correlation of all domains is added; (2) the average map correlation is added; (3) the fraction of transformations that are different from the first is subtracted; (4) the fraction of Cα atoms that overlap between domains is subtracted; and (5) the sum of all deviations in distances between domains, normalized to the sum of all allowed distances between domains, is subtracted. This scoring function was not optimized and does not contain weights except as described above.
Morphing and refining the full AlphaFold model to match the map on the basis of docked domains
Once a set of domains is placed to match a map, the entire AlphaFold model is morphed to superimpose on these domains as much as possible, while smoothly distorting along the chain between domains. We use a shift-field approach to morphing31, creating a vector function that varies smoothly in space. The shift (distortion) applied to a particular atom in a model is the value of the shift field at the coordinates of that atom.
The shift field is calculated from a set of (shift coordinate, shift vector) pairs. There is one such pair for each Cα atom in a docked domain. The value of the shift coordinate is the position of the corresponding Cα atom in the full AlphaFold model. The value of the shift vector is the difference between the coordinate of the Cα atom in the docked model and the corresponding Cα atom in the full AlphaFold model. The shift field at any point in space is then the weighted average of all the shift vectors, where the weights are the inverse exponential of the normalized squared distance between that point in space and the corresponding shift coordinate, and where the normalization is the square of the shift-field distance, which has a typical value of 10 Å (set with the parameter ‘shift_field_distance’ and chosen to be a compromise between maintaining the model geometry with a long shift-field distance and matching the docked domains closely with a a short one). The coordinates of a morphed AlphaFold model are then calculated from the initial coordinates and this shift field. This morphing has the property that local distortions occur on a scale of about 10 Å, the shift-field distance. The docked, morphed AlphaFold model is adjusted to match the map using the refinement tool real_space_refine23.
Creating rebuilt models by replacing uncertain parts of the docked, morphed and refined AlphaFold model
The parts of the docked, morphed and refined AlphaFold model that have either (1) low confidence predictions from AlphaFold (typically residues with plDDT < 0.7 as above), or (2) low correlation with the map, are then identified and used to specify segments of the model that require rebuilding. The threshold defining low map correlation is obtained with the following procedure. Density values in the map at positions of all Cα atoms are noted, the values in the lower half are removed, and the mean and standard deviation of remaining (‘good’) density values are noted. Low map correlation is defined as more than three standard deviations below the mean (where the ratio of three is defined by the parameter ‘cc_sd_ratio’). Before applying these thresholds, the plDDT values and density values for each residue are smoothed by averaging with a window of ten residues along the chain (defined by ‘minimum_domain_length’).
Then a series of attempts to improve the fit of each poorly fitting segment to the map are carried out. These attempts to improve the fit include: (1) iterative resolution refinement, in which the model is iteratively refined, initially at low resolution (6 Å, controlled by the parameter ‘iterative_refine_start_resolution’), then progressing in 1 Å decrements until the resolution of the map is reached; (2) rebuilding of loops, using the Phenix tool ‘fit_loops’; (3) retracing loops by finding a path through the density map that connects the ends of the loop with a chain that follows the path with the highest minimum value18; (4) a combination of retracing part of the loop with superimposing and splicing that part of the existing refined model that matches the remainder of the loop; (5) iterative morphing; and (6) use of an external model. The combination method addresses the situation where clear density is present in the map for the beginning and end of a loop and the remainder is unclear. In this case, the refined model for the residues that cannot be modeled from density are simply grafted onto the residues that can be modeled, using a shift-field procedure as described above to morph the refined model while superimposing three residues on each end. The iterative morphing procedure was similar to one previously used to distort a model to better match the density32, but in the current procedure morphing is carried out on six residues from each end at a time (specified by ‘n_window’), then the remainder of the model is superimposed on the 12 morphed residues, the window is shifted by one residue from either end, and the process is repeated until the loop is morphed. In cases where an externally created model has been supplied to the rebuilding procedure, another attempt to rebuild each loop consisted of selecting a matching segment from the external model, if such a segment with the expected number of residues was present and could be connected to the existing model with deviations at the ends of 3.8 Å or less (defined by the parameter ‘ca_distance’). Each attempt to rebuild a part of the refined model yields a new candidate segment of the model. All the candidate segments obtained with a particular rebuilding method (for example, rebuilding loops) are used to replace the corresponding segments in the refined model and the resulting full model is refined on the basis of the density map. This overall process then yields several new full-length versions of the model.
Assembling the best parts of rebuilt models into a single final model
The rebuilt and refined models are then used as hypotheses for the structure to be built. In the preceding step, boundaries of regions needing or not needing rebuilding were identified. In this step, each model is broken up into the corresponding segments. Then the best version of each segment, chosen on the basis of their map correlation, is used to create a new full model. This model is refined using the density map to produce a single full-length final model.
Values of parameters
Default values were used for the parameters controlling model rebuilding, with two exceptions. One exception was that for the 7BGL structure19 in Fig. 2, model building was aided by supplying a model created by the Phenix tool map_to_model18 as a source of possible fragments to use in rebuilding the structure. The reason this was necessary was that without these fragments, model rebuilding with the methods described below was incomplete for this structure despite the very good resolution of 2.2 Å, possibly because the AlphaFold model was quite different from the actual structure in some places. The other exception was that in cases where multiple chains with similar sequences (and therefore presumably similar structures) were present in a structure, the secondary-structure-based docking procedure was skipped and only a direct density correlation search was used (with the Phenix tool dock_in_map). The rationale for this was that, as might be expected, docking with a correlation search was more effective than a secondary-structure search at distinguishing the correct placement from one superimposing on related but different chain.
In the first cycle of rebuilding for each model, the corresponding AlphaFold model was supplied along with the full corresponding density map and the resolution of the structure reported in the PDB. In subsequent cycles, a new AlphaFold model was supplied as well as the rebuilt model from the previous cycle.
Model superposition and comparisons
Models were superimposed using the Phenix tools superpose_pdbs, superpose_and_morph and the Coot secondary-structure matching tool25.
The superpose_pdbs tool carries out least-squares superposition of matching Cα atoms identified by alignment of the sequences of two models. Note that in cases where the sequences of two models are similar and the models differ largely by rigid-body movement of one domain relative to another, this procedure can lead to a superposition where neither domain superimposes closely.
The superpose_and_morph tool carries out SSM to superimpose part or all of one model on another using reduced representations of secondary-structure elements and indexing of these elements to speed up comparisons and allowing matches that are non-sequential in a procedure similar to that used in33. If the option ‘ssm_match_to_map’ is used, the inputs are a model and a map. In this case the tool find_helices_strands is used to find secondary-structure elements in the map and to create a secondary-structure model containing these secondary-structure elements. Then the model to be docked is superimposed on the a secondary-structure model with a modified form of SSM. In this SSM procedure, two secondary-structure elements from the map (for example, a helix and a strand) are paired with two matching elements from the domain to be docked (for example, a matching helix and strand), thereby defining a transformation between the domain to be docked in the map. As the precise alignment of secondary-structure elements from the map and those from the domain to be docked is not known, all possible alignments of the shorter of each pair of elements with the longer element are tested (for example, residues 1–10 of one helix might be paired with residues 1–10, 2–11, 3–12 and so on from the other). All the Cα atoms in each element from the map are then associated with Cα atoms in the corresponding element from the domain, and a least-squares superposition is carried out. If these Cα atoms match (by default within 5 Å, controlled by the parameter ‘match_distance_high’), the resulting transformation is applied to all Cα atoms in the domain and the map-model correlation of the resulting docked domain is calculated with the Phenix tool map_model_cc. If the resulting correlation is above a minimum level (controlled by the parameter ‘ok_brute_force_cc’ with a default value of 0.25), the docked model is adjusted by rigid-body refinement to maximize this correlation.
The Phenix chain_comparison tool was used to compare models that were already superimposed. This tool counts the number of Cα atoms in a target model that are matched within 3 Å by any Cα atom in the matching model. Allowing any Cα atom in the matching model to superimpose effectively ignores the connectivity of the chains, but it is useful for evaluating whether a Cα atom is placed in a position where some Cα atom belongs. The distance of 3 Å is the default value and is useful for ranking pairs of models that have more than about 30% of Cα atoms matching. It is less useful for ranking pairs with lower similarity because two overlapping structures that are completely unrelated will often have 20–30% of Cα atoms matching within 3 Å.
We used the Phenix tool map_model_cc to calculate correlations between experimental density maps and model-based density maps for PDB entry 7MLZ and resulting AlphaFold and rebuilt models. The overall orientation and positions of AlphaFold models are arbitrary and the values in the atomic displacement parameter field (B-values) are plDDT values. We superimposed these models on the corresponding deposited structure before calculation of map correlations, keeping all coordinates fixed at the values obtained by direct superposition. To make a fair comparison with rebuilt and deposited models, we refined the atomic displacement parameters for all the models to match the map before calculation of map correlations. For the 7MLZ example shown in Fig. 1, the refinement of B-values increased all the map correlation values. Map correlation values for the deposited model, initial superposed AlphaFold model (with B-values representing plDDT), initial rebuilt model and final AlphaFold model were 0.64, 0.26, 0.47 and 0.44, respectively. After B-value refinement these were 0.70, 0.41, 0.58 and 0.57, respectively.
Further information on research design is available in the Nature Research Reporting Summary linked to this article.
All data were taken from the PDB and the EMDB. PDB accession codes: 7MBY, 7ME0, 7EV9, 7LS5, 7EDA, 7LCI, 7LVR, 7C2K, 7M7B, 7N8I, 7MJS, 7L1K, 7L6U, 7KU7, 7KZZ, 7LX5, 7BRM, 7LSX, 7LC6, 7MLZ, 7MSW, 7RB9, 7BXT, 7M9C and 7LV9. EMDB entries: 23750, 23786, 31325, 23502, 31062, 23274, 23541, 30275, 23709, 24237, 23883, 23110, 23208, 23035, 23093, 23566, 30160, 23508, 23269, 23914, 23970, 24400, 30237, 23723 and 23530. Source data are provided with this paper.
All code for the Phenix version of the AlphaFold2 Colab is freely available from Github at https://github.com/phenix-project/Colabs (see notes in this repository in Colabs/alphafold2/README_programming_notes.dat). All code for Phenix is available at https://phenix-online.org. The spreadsheets and ChimeraX (v.1.2.5) sessions used to generate the figures in this paper, along with the maps and models created for Figs. 1–3 are available at: https://phenix-online.org/phenix_data.
Jumper, J. et al. Highly accurate protein structure prediction with AlphaFold. Nature 596, 583–589 (2021).
Baek, M. et al. Accurate prediction of protein structures and interactions using a three-track neural network. Science 373, 871–876 (2021).
David, A., Islam, S., Tankhilevich, E. & Sternberg, M. J. E. The AlphaFold database of protein structures: a biologist’s guide. J. Mol. Biol. 434, 167336 (2022).
Perrakis, A. & Sixma, T. K. AI revolutions in biology. EMBO Rep. 22, e54046 (2021).
Millán, C. et al. Assessing the utility of CASP14 models for molecular replacement. Proteins Struct. Funct. Bioinf. 89, 1752–1769 (2021).
Cramer, P. AlphaFold2 and the future of structural biology. Nat. Struct. Mol. Biol. 28, 704–705 (2021).
Marks, D. S. et al. Protein 3D structure computed from evolutionary sequence variation. PLoS One 6, e28766 (2011).
Gupta, M. et al. CryoEM and AI reveal a structure of SARS-CoV-2 Nsp2, a multifunctional protein involved in key host processes. Preprint at bioRxiv https://doi.org/10.1101/2021.05.10.443524 (2021).
AlQuraishi, M. Machine learning in protein structure prediction. Curr. Opin. Chem. Biol. 65, 1–8 (2021).
Tunyasuvunakool, K. et al. Highly accurate protein structure prediction for the human proteome. Nature 596, 590–596 (2021).
Dunker, A. K. et al. Intrinsically disordered protein. J. Mol. Graph. Modell. 19, 26–59 (2001).
Stein, R. A. & McHaourab H. S. SPEACH_AF: sampling protein ensembles and conformational heterogeneity with AlphaFold2. PLOS Comput. Biol. 18 e1010483 (2022).
Mariani, V., Biasini, M., Barbato, A. & Schwede, T. lDDT: a local superposition-free score for comparing protein structures and models using distance difference tests. Bioinformatics 29, 2722–2728 (2013).
Ju, F. et al. CopulaNet: learning residue co-evolution directly from multiple sequence alignment for protein structure prediction. Nat. Commun. 12, 2535 (2021).
Perrakis, A., Morris, R. & Lamzin, V. S. Automated protein model building combined with iterative structure refinement. Nat. Struct. Biol. 6, 458–463 (1999).
Wang, L. et al. Ultrapotent antibodies against diverse and highly transmissible SARS-CoV-2 variants. Science 373, eabh1766 (2021).
Cater, R. J. et al. Structural basis of omega-3 fatty acid transport across the blood–brain barrier. Nature 595, 315–319 (2021).
Terwilliger, T. C., Adams, P. D., Afonine, P. V. & Sobolev, O. V. Cryo-EM map interpretation and protein model-building using iterative map segmentation. Protein Sci. 29, 87–99 (2020).
Johnson, S. et al. Molecular structure of the intact bacterial flagellar basal body. Nat. Microbiol. 6, 712–721 (2021).
Kryshtafovych, A., Schwede, T., Topf, M., Fidelis, K. & Moult, J. Critical assessment of methods of protein structure prediction (CASP)—round XIV. Proteins Struct. Funct. Bioinf. 89, 1607–1617 (2021).
Pozharski, E. Percentile-based spread: a more accurate way to compare crystallographic models. Acta Crystallogr. Sect. D 66, 970–978 (2010).
Pfab, J., Phan, N. M. & Si, D. DeepTracer for fast de novo cryo-EM protein structure modeling and special studies on CoV-related complexes. Proc. Natl Acad. Sci. 118, e2017525118 (2021).
Afonine, P. V. et al. Real-space refinement in PHENIX for cryo-EM and crystallography. Acta Crystallogr. Sect. D 74, 531–544 (2018).
Liebschner, D. et al. Macromolecular structure determination using X-rays, neutrons and electrons: recent developments in Phenix. Acta Crystallogr. Sect. D 75, 861–877 (2019).
Emsley, P., Lohkamp, B., Scott, W. G. & Cowtan, K. Features and development of Coot. Acta Crystallogr. Sect. D 66, 486–501 (2010).
Lawson, C. L. et al. EMDataBank.org: unified data resource for CryoEM. Nucleic Acids Res. 39, D456–D464 (2011).
Cragnolini, T., Kryshtafovych, A. & Topf, M. Cryo-EM targets in CASP14. Proteins Struct. Funct. Bioinf. 89, 1949–1958 (2021).
Pettersen, E. F. et al. UCSF ChimeraX: structure visualization for researchers, educators, and developers. Protein Sci. 30, 70–82 (2021).
Westbrook, J. D. & Fitzgerald, P. M. D. in Structural Bioinformatics Vol. 44 (eds Philip E. Bourne, P. E. & Weissig H.) Ch. 8 (John Wiley & Sons, 2003).
Mirdita, M. et al. ColabFold: making protein folding accessible to all. Nat. Methods 19, 670–682 (2021).
Cowtan, K., Metcalfe, S. & Bond, P. Shift-field refinement of macromolecular atomic models. Acta Crystallogr. Sect. D 76, 1192–1200 (2020).
Terwilliger, T. C. et al. Model morphing and sequence assignment after molecular replacement. Acta Crystallogr. Sect. D 69, 2244–2250 (2013).
Kolbeck, B., May, P., Schmidt-Goenner, T., Steinke, T. & Knapp, E.-W. Connectivity independent protein-structure alignment: a hierarchical approach. BMC Bioinf. 7, 510 (2006).
The authors acknowledge funding from the Department of Energy National Nuclear Security Administration (grant DE-AC52-06NA25396 to P.D.A.), from Lawrence Berkeley National Laboratory (grant DE-AC02-05CH11231 to P.D.A.), from the Phenix Industrial Consortium (to P.D.A.), and from the National Institutes of Health (grant GM063210 to P.D.A., R.J.R., T.C.T. and J.S.R.).
The authors declare no competing interests.
Peer review information
Nature Methods thanks Bruno Klaholz and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Primary Handling Editor: Arunima Singh, in collaboration with the Nature Methods team.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended Data Fig. 1 Analysis of automatic map interpretation in Fig. 3 panel E using 2 Å cutoff instead of 3 Å.
Figure as in Fig. 3 panel E, except the value of the keyword max_dist was set to 2 Å instead of 3 Å. This then reports the percentage of Cα atoms in the deposited structure matched within 2 Å by a Cα atom in the corresponding final rebuilt model. There is only one iteration shown for 7lv9 because after this cycle the predictions yielded no residues with plDDT above the threshold used for identification of reliable regions (0.7).
About this article
Cite this article
Terwilliger, T.C., Poon, B.K., Afonine, P.V. et al. Improved AlphaFold modeling with implicit experimental information. Nat Methods 19, 1376–1382 (2022). https://doi.org/10.1038/s41592-022-01645-6
This article is cited by
Nature Reviews Molecular Cell Biology (2023)
Does AlphaFold2 model proteins’ intracellular conformations? An experimental test using cross-linking mass spectrometry of endogenous ciliary proteins
Communications Biology (2023)
The F-box protein UFO controls flower development by redirecting the master transcription factor LEAFY to new cis-elements
Nature Plants (2023)
Scientific Reports (2023)
Biophysical Reviews (2023)