1. Overview of MDAnalysis
MDAnalysis is a Python package for the analysis of molecular dynamics simulations.
It provides an object-oriented interface to molecular structures and trajectories,
with direct access to atomic coordinates as numpy.ndarray objects for seamless
integration with NumPy and SciPy.
This page gives a high-level overview of the most important public classes and modules. For usage examples and tutorials, refer to the User Guide.
1.1. Key Classes
The core of MDAnalysis revolves around the Universe class,
which serves as the central data structure that loads and connects topology and coordinate data.
From a Universe, users typically interact with AtomGroup
objects — flexible collections of atoms that support structural selections and analysis operations. These selections
are created using CHARMM-style selection syntax via the select_atoms() method,
allowing users to query atoms based on names, residue numbers, segments, and more.
Individual atoms are represented by the Atom class, while residues and segments (or chains) are modeled using the
Residue and Segment classes, respectively. Together, these
classes form an intuitive, object-oriented hierarchy that makes it easy to navigate and analyze molecular systems.
1.2. Core modules
MDAnalysis is organized into several core modules that provide specialized functionality for
handling and analyzing molecular dynamics data. The MDAnalysis.core module defines the
essential data structures such as Universe, AtomGroup,
and related objects. The MDAnalysis.analysis module contains a collection of analysis tools for tasks like RMSD calculation,
diffusion analysis, contact maps, and more. The MDAnalysis.selections module implements the flexible selection language used
to query atoms based on structural properties. Finally, MDAnalysis.topology manages topology parsing and representation,
supporting a wide range of file formats for loading molecular structures.