Most of the tips and best practices for reconstructing density using DENSS can be found throughout the Tutorial page. Here I will just describe a few handy tips that aren’t mentioned elsewhere.
Evaluating the Results
The primary result from a single reconstruction of denss.py is the output.mrc file. This file contains the final electron density reconstructed by DENSS formatted as a CCP4/MRC file which is one of the most common volumetric data formats used. It can be opened by most volume visualization programs such as Chimera, PyMOL, EMAN2, and many others. After running the averaging procedure with superdenss and EMAN2, the final averaged density can be found in the folder that superdenss created with the output prefix you specified with the -o option to superdenss, named something like 6lyz_avg.mrc. For convenience, this file is an MRC formatted file that is converted from the EMAN2 file located at 6lyz/spt_avg_01/final_avg_ali2ref.hdf. This is a specially formatted HDF5 file that EMAN2 creates. Fortunately, Chimera can read .hdf files by default. If at any point you would like to convert .hdf files to .mrc files, you can select Save As… in the Volume Viewer in Chimera, or you can convert it with the e2proc3d.py command by typing:
Additionally, if you have the matplotlib module installed, a file called something like 6lyz_fsc.png will be created showing a plot of the Fourier Shell Correlation calculated from the averaging procedure with the estimated resolution given. The resolution is also printed to the terminal screen at the end of the averaging procedure.
Chimera is an excellent tool for assessing many features about the electron density map. First open the 6lyz_avg.mrc file in Chimera and select an appropriate threshold (Tools > Volume Data > Volume Viewer). What’s an “appropriate” threshold? A good starting point would be the threshold that creates a contour of the density that encloses a total volume equal to the expected volume of the particle. For example, a rough estimate of protein volume (in Å3) is 1.7 * mass in kilodaltons. To estimate the volume of the envelope contoured by the current threshold, open the Measure Volume and Area tool (Tools > Volume Data > Measure Volume and Area, make sure your volume object is selected in the drop down menu). Then drag the threshold slider until you achieve the desired volume. Alternatively, you can automatically set the threshold based on your desired volume (in Å3) using the Chimera command line with the following command:
where the #0 refers to the object ID (check the Tools > General Controls > Model Panel), and here the 17000 is the volume you want to enclose.
PyMOL is also great for visualizing the density. The “volume” representation is particularly useful for seeing the gradients of density inside the particle envelope. To load the .mrc file in PyMOL, open PyMOL and type at the PyMOL command prompt:
$ volume 6lyz_volume, 6lyz
This will load your map and create a volume object from it. By default it will color the density as 2Fo – Fc, which in most cases will essentially give you an envelope of the particle. To see the internal density fluctuations we need to create a new color “ramp”. This can be done in one of two ways.
First, to color your density interactively, use the volume adjustments dialog by selecting the “C” (Coloring) box next to the object name, and select “panel”. In the new window that pops up, adjust the opacity of the dots by dragging them up or down or adjust the electron density value by dragging them right or left.
You can also explicitly create a color ramp on the PyMOL command line by typing:
This will create a new color ramp called “colored_density” that gradually changes color and opacity from transparent blue at the lowest densities through cyan, green, yellow and finally red at the highest densities. By default these values are given in units of standard electron density sigma from crystallography. Note that DENSS reconstructions often have significant density at very high sigma values (much higher than crystallography) due to the fact that we are viewing only low resolution reconstructions.
Now that we have created the color ramp, let’s apply it to our volume object:
and that should update the representation like this:
If you would like to make the new colored_density color ramp to be available every time you open PyMOL, add the volume_ramp_new line above to your .pymolrc file (likely in your $HOME directory, or create it if it doesn’t exist). Now you will be able to select the color ramp from the “C” box dropdown menu.
If you prefer to view the density as absolute electron density in units of e–/Å3, you must be sure to run DENSS with the –ne option and set the number of electrons you expect (e.g. from the known molecular weight). To display the absolute values in PyMOL, first, before you load the MRC file in the step above, disable the normalization of ccp4 maps in PyMOL by typing:
Then create a new color ramp that reflects electron density values rather than sigma values, e.g.:
To adjust the values for viewing the density, open up the volume adjustments panel in PyMOL by selecting the “C” (Coloring) box next to the object name, and select “panel”. In the new window that pops up, adjust the opacity of the dots by dragging them up or down or adjust the electron density value by dragging them right or left.
Assessing the Quality of the Reconstructions
One of the first things to determine is whether the settings you have set for the individual runs of denss.py were sufficient for accurately reconstructing the particle. While the default values are suitable for most standard cases, for more complex cases, such as particles with multiple connected domains, or molecules with large aspect ratios (e.g. > 5:1), it is not uncommon for the fit of the scattering profile to be poor relative to the experimental data. This can be evaluated by viewing the output_fit.png file which contains a plot of the intensity versus q values for the q-shells used in the reconstruction. Note that after the last iteration of DENSS, the structure factors are scaled one final time to ensure that the intensities match exactly that from the input data. However, just prior to the final scaling of the structure factors, after the real space restraints are imposed for the last time, the fit of the calculated intensities versus the experimental intensities is calculated and recorded, and ultimately plotted in the output_fit.png file. This is to give an indication of the quality of the reconstruction, as by the end, after the process has converged, this plot should closely fit the experimental data.
Open the output_fit.png file. If you see that the red dots corresponding to the calculated intensities match well to the blue dots corresponding to the experimental intensities (interpolated at the required q values), then that suggests the reconstruction was successful. To get a precise assessment of this, the residuals between these curves is shown on the bottom of this plot:
The above example shows a good fit between the two curves, suggesting that the reconstruction was successful. In some cases, e.g. complex shapes, the fit shown in this plot may be poor. If that is the case, try increasing the oversampling ratio (-os option) to 5.
Three additional plots saved in .png files (and the _stats_by_step.dat file) show how the χ2, Rg and Support Volume changed as the reconstruction progressed. Note that before the step when –enforce_connectivity removes extra regions of density in the solvent, these numbers are particularly inaccurate. The three plots for 6lyz.out using default parameters are shown below. The decay and ultimate plateau of χ2 indicates that the reconstruction has converged and additional steps will have little effect on the results.
Oftentimes you will want to compare the final electron density map with some known structure (or partially known structure), such as from crystallography. This can be done conveniently in Chimera. First open your final_avg_ali2ref.hdf file and set an appropriate threshold (see above). Then open your pdb file. Next, we need to align the pdb model to the volume. To start, we first manually move the pdb model to approximately overlap with the volume. To do this, deselect the “A” checkbox (A for “active”) next to the final_avg_ali2ref.hdf volume object in the Model Panel. This ensures that when we move the pdb molecule in the next step, the volume object will not move along with it. Then, using the middle mouse button (see here for setting mouse preferences), translate the pdb model to overlap with your volume as shown below. To make the volume semitransparent, type in the Chimera command line:
Then rotate (left mouse button) until you get a rough alignment of the pdb model to the volume. To perform a finer alignment, open up the Fit in Map tool (Tools > Volume Data > Fit in Map). Select the pdb model from the “Fit” drop down menu (probably will start with “select atoms” in drop down menu) and your final_avg_ali2ref.hdf volume file in the “in map” drop down menu (which will probably already be filled in for you). Then click the “Fit” button a few times to perform a more accurate fit.
To save the aligned pdb file, go to File > Save PDB… in Chimera.
One can also calculate a FSC curve between the pdb model and the volume now that they are aligned. First, we must create a volume object from our pdb model. In the Fit in Map window, click the “Options” button. Click the check box next to “Use map simulated from atoms, resolution”. We need to enter an appropriate resolution in the box. An appropriate resolution is that determined by the DENSS averaging procedure (see here for details). Enter the resolution in the box and press Enter. This should create a new molmap object in the Model Panel (though you may not see anything in the main window). Click on the check box under “S” in the Model Panel to show the map in the main window. To calculate FSC, the new map must be resampled onto the same grid as the final_avg_ali2ref.hdf map. To do this, type in the Chimera command line (make sure your model IDs are correct; here my molmap model is #1.1 in the Model Panel and my final_avg_ali2ref.hdf file is #0):
Now we need to save that resampled map as an MRC file. Go to the Volume Viewer window and select File > Save map as… (make sure you have selected the new resampled map object in the Volume Viewer, in my case its now ID #2). This will create a new .mrc file that we can use to calculate the FSC curve. We can also use this opportunity to save our final_avg_ali2ref.hdf file as an .mrc file in the same manner, for use with viewing in PyMOL later.
Now go to your terminal (not in Chimera) and cd into the directory where you saved the new resampled MRC file and the final_avg_ali2ref.mrc file you also just made. We can use the e2proc3d.py program from EMAN2 to calculate an FSC curve with the following command:
which will create a new file called 6lyz_pdb2map_fsc.txt containing our FSC curve comparing the averaged DENSS reconstruction and the aligned and resampled 6LYZ pdb model.
While the -e option of superdenss can generate and select the enantiomers that are most similar between multiple reconstructions from denss, there’s no guarantee that the selected enantiomer in the final average is actually the correct enantiomer, just that all the reconstructions represent a similar enantiomer for the purposes of averaging. Hence, if you would like to compare your final averaged density to a known structural model, its possible that superdenss may have selected the wrong enantiomer, making comparison with your structure difficult.
DENSS now includes (as of v1.1.1) a new option (the -g option) to the best_enantiomers.sh script that will generate the eight enantiomers of the given map(s) and exit without performing alignments, etc. To run this option, simply type:
which will produce eight new files named something like “6lyz_avg_ali2xyz_x.hdf”, where the “_x” part of the filename describes which axis the enantiomer has been flipped over after its initial alignment of its principal axes to the xyz axes. View these files in Chimera and perform alignment with your model to determine which is the best fit.