3.1. Python interpreter:
use the interactive help (
TAB completion, e.g.
MDAnalysis.U<TAB>will autocomplete to
MDAnalysis.Universe.<TAB>will show all methods and attributes.
quick plotting with
matplotlib(and array manipulations with
Inside ipython, load
import numpy as np
as we will constantly make use of its capabilities.
3.2. Loading MDAnalysis¶
MDAnalysis is primarily a library that provides means to work with particle-based simulation trajectories (including single frames such as PDB files). As such, it is mainly used
for interactive use
In both cases, we always import the module
MDAnalysis at the top level:
(Not all sub-modules are imported automatically; for instance,
analysis modules such as
MDAnalysis.analysis.rms have to be
MDAnalysis comes with a bunch of test files and trajectories. One is a
trajectory of the enzyme adenylate kinase that samples a transition
from a closed to an open conformation [Beckstein2009], which we will
use as an example throughout the tutorial. The topology file (CHARMM
PSF format) and trajectory (CHARMM DCD format) can be loaded into the
from MDAnalysis.tests.datafiles import PSF, DCD