# 4. Analysis modules¶

The MDAnalysis.analysis module contains code to carry out specific analysis functionality. It is based on the core functionality (i.e. trajectory I/O, selections etc). The analysis modules can be used as examples for how to use MDAnalysis but also as working code for research projects; typically all contributed code has been used by the authors in their own work.

Please see the individual module documentation for additional references and citation information.

These modules are not imported by default; in order to use them one has to import them from MDAnalysis.analysis, for instance

import MDAnalysis.analysis.align


Some of the modules in MDAnalysis.analysis require additional Python packages to enable full functionality. For example, MDAnalysis.analysis.encore provides more options if scikit-learn is installed. These package are not automatically installed with pip(although one can add the [analysis] requirement to the pip command line to force their installation). If you install MDAnalysis with conda (see Installing MDAnalysis) then a full set of dependencies is automatically installed.

Other modules require external programs. For instance, the MDAnalysis.analysis.hole module requires an installation of the HOLE suite of programs. You will need to install these external dependencies by following their installation instructions before you can use the corresponding MDAnalysis module.

## 4.10. Legacy analysis modules¶

The MDAnalysis.analysis.legacy module contains code that for a range of reasons is not as well maintained and tested as the other analysis modules. Use with care.