# Helix analysis¶

We look at protein helices with HELANAL.

Last updated: December 2022 with MDAnalysis 2.4.0-dev0

Minimum version of MDAnalysis: 2.0.0

Packages required:

Optional packages for visualisation:

Note

MDAnalysis.analysis.helix_analysis.HELANAL implements the HELANAL algorithm from [BKV00], which itself uses the method of [SM67] to characterise each local axis. Please cite them when using this module in published work.

[1]:
import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD
from MDAnalysis.analysis import helix_analysis as hel
import matplotlib.pyplot as plt
import nglview as nv
%matplotlib inline

The test files we will be working with here feature adenylate kinase (AdK), a phosophotransferase enzyme. ([BDPW09])

[2]:
u = mda.Universe(PSF, DCD)
/home/pbarletta/mambaforge/envs/mda-user-guide/lib/python3.9/site-packages/MDAnalysis/coordinates/DCD.py:165: DeprecationWarning: DCDReader currently makes independent timesteps by copying self.ts while other readers update self.ts inplace. This behaviour will be changed in 3.0 to be the same as other readers

## Helix analysis¶

HELANAL can be used to characterize the geometry of helices with at least 9 residues. The geometry of an alpha helix is characterized by computing local helix axes and local helix origins for four contiguous C-alpha atoms, using the procedure of Sugeta and Miyazawa ([SM67]) and sliding this window over the length of the helix in steps of one C-alpha atom.

HELANAL computes a number of properties.

For each sliding window, it calculates:

• local_rotation_vectors: the vectors bisecting the angles of the middle 2 atoms

• local_origins: the projected origins of the helix

• local_twists: the twist of each window ($$\theta$$)

• residues_per_turn: how many residues would fit in a turn, based on local_twist

• local_axes: the axis of each local helix

• local_heights: the rise of each helix

HELANAL calculates the bends between each local_axes and fits the vector global_axes to the local_origins.

all_bends contains the angles between every local_axes ($$\alpha$$) in a pairwise matrix, whereas local_bends contains the angles between local_axes that are calculated 3 windows apart ($$\beta$$). The global_tilts ($$\gamma$$) are calculated as the angle between the global_axes and the user-given reference ref_axis.

Finally, local_screw angles are computed between the local_rotation_vectors and the normal plane of the global_axes.

### Running the analysis¶

As with most other analysis classes in MDAnalysis, pass in the universe and selection that you would to like to operate on. The default reference axis is the z-axis. You can also pass in a list of selection strings to run HELANAL on multiple helices at once.

[3]:
h = hel.HELANAL(u, select='name CA and resnum 161-187',
ref_axis=[0, 0, 1]).run()

The properties described above are stored as attributes in h.results. For example, the all_bends matrix contains the bends in a (n_frames, n_residues-3, n_residues-3) array.

[4]:
h.results.all_bends.shape
[4]:
(98, 24, 24)

Each property is also summarised with a mean value, the sample standard deviation, and the average deviation from the mean.

[5]:
h.results.summary.keys()
[5]:
dict_keys(['local_twists', 'local_bends', 'local_heights', 'local_nres_per_turn', 'local_origins', 'local_axes', 'local_helix_directions', 'local_screw_angles', 'global_axis', 'global_tilts', 'all_bends'])
[6]:
for key, val in h.results.summary['global_tilts'].items():
print(f"{key}: {val:.3f}")
mean: 86.121
sample_sd: 2.011
abs_dev: 1.715

As the data is stored as arrays, it can easily be plotted.

[7]:
plt.plot(h.results.local_twists.mean(axis=1))
plt.xlabel('Frame')
plt.ylabel('Average twist (degrees)');

You can also create a Universe from the local_origins if you would like to save it as a file and visualise it in programs such as VMD.

[8]:
origins = h.universe_from_origins()
[9]:
view = nv.show_mdanalysis(h.atomgroups[0])