Functional Mode Analysis

Functional Mode Analysis

Functional mode analysis (FMA) is a technique to identify collective atomic motions related to a specific protein function. Given a large set to structures of one protein, for example from a molecular dynamics trajectory, the method detects a collective motion (or collective mode), that is maximally correlated to an arbitrary quantity of interest. In other words, the method aims to explain alterations in a quantity in terms of internal collective motions of the protein.

What kind of questions can be addressed with FMA?

Let us assume you are interested in a some 'functional' quantity that is important for the function of your protein, such as

you may wonder how the protein accomplishes alterations of that quantity. FMA will detect the collective motion that is maximally correlated to your quantity and, hence, provide the link between protein function and collective motion. For instance, FMA demonstrates that substrate binding and release of T4 lysozyme are triggered by a hinge bending mode, whereas a twisting mode is required for the catalytic activity.

How is FMA related to normal mode analysis or principal component analysis?

Normal mode analysis (NMA) or principal component analysis (PCA) are popular techniques to identify the large-scale collective motions of proteins. NMA computes low-frequency modes and PCA yields the modes that give the largest contributions to the atomic RMSD in a given protein ensemble.

However, a functionally relevant mode is in most cases not identical to a specific normal or PCA mode, but may be distributed over a number of normal or PCA modes. For example, the electrostatic potential at a ligand binding site may be tuned by a combination of PCA vector no. 1, 3 and 15. In such cases, FMA yields a single collective mode which tunes the functional quantity. In addition, FMA quantifies the contributions of the individual PCA vectors (or normal modes) to the fluctuations of the functional quantity.

For more details on FMA, please check the original publication

Detection of functional modes in protein dynamics
Jochen S. Hub and Bert L. de Groot
PLoS Comp Biol 5(8), e1000480 (2009) [pdf] [supporting info] [www]

In case you use results from FMA for a publication, we kindly ask you to cite the reference. Thank you!

Source code

Latest sources: fma.v0901.tar.gz

Version changes

Please note that the software is distributed AS IS with NO WARRANTY OF ANY KIND, to the extent permitted by applicable law. The author is not responsible for any losses or damages suffered directly or indirectly from the use of the software. Use it at your own risk.


There comes a README file with the source tar ball, which (hopefully) explains the compilation requirements and procedure. I have tested the installation under Mac OS X (10.5) and Suse Linux (Version 10), but for other environments the cmake input file might have to be further adapted (than explained in README). If you run into trouble, please do not hesitate to contact us (jhub at

Please note: At present, the FMA code can only be linked to GROMACS 4.0.x. To compile and install Gromacs 4.07 on a Linux or Mac, you can use this script: Please download the script, make it executable with chmod +x, and run it with ./ It will install Gromacs 4.07 in the current working directory. See the note in the script on how to use a specific compiler, if you don't want ot use the default C/C++ compiler of your system. Important: This Gromacs 4.07 installation is not suitable for fast MD simulations because it does not use a fast FFT library. But it is fine to be used with FMA and to use the g_xxx Gromacs tools.

Problems, suggestions, bug reports

Please do not hesitate to send an email (jhub at in case you run into trouble, have any suggestions, or if the documentation is unclear. Bug reports are also highly welcome.

Example (length of a helix)

A single alpha-helix

If you are new with FMA, this example is probably where you want to start. The tar file contains a PDB structure of an alpha-helix, an Gromacs trajectory in XTC format, and a bash script with lots of comments and explanations. Note that his example is also shown in the supporting material of the FMA publication

The example demonstrates how to explain the changes in the length of a helix in terms of a collective motions of the helix. It also shows how to visualize the collective motions using, e.g., PyMol. This helix example does probably not provide striking new biological insight, but it useful for the user of FMA to get familiar with FMA in practice.

How-to-start tutorial

Please also check the fma help (including command line options) via fma -h.
The following instructions assume you use Gromacs. Let us assume you have the following input files: Output: The output files are the following (xvg files are in grace format, use xmgrace to view). For the start, I suggest to check the output files r-crossv.xvg, r-modelbuild.xvg, and pear_nev.xvg. These plots allow to assess how successful FMA was in explaining the functional quantity in terms of a single functional mode.  Visualization of collective modes MCM and ewMCM
You can use the g_anaeig2 -extr option to create movies of the maximally correlated motion (MCM) or the ensemble-weighted MCM (ewMCM). Example videos of such motions are available as supporting material of the FMA publication (see here, for example). To visualize the extreme extensions along the MCM in your trajectory, use something like
g_anaeig -s prot.pdb -f traj.xtc -v MCM.trr -extr mcm-extr.pdb -nframes 30
Note that since the MCM written in MCM.trr is normalized, the spacial displacement visible in mcm-extr.pdb may appear smaller than in the simulation (and depends on the number of basis vectors used in FMA, option -nvec). Therefore, you may want to use the -max option of g_anaeig to visualize the MCM.
To visualize the ewMCM, you can use the g_anaeig command lines that fma prints to the console (check fma output). The motion that makes the functional quantity f fluctuate within n⋅&sigmaf (where &sigmaf is the standard deviation of f) is generated by
g_anaeig -s prot.pdb -v ewMCM.trr -max n -extr ewMCM.pdb -nframes 30
To get a good impression of the motion, you may want to choose n=3. Alternatively, if you want to visualize the motion that generates the extremes of f, you can use the g_anaeig2 tool that comes with the FMA implementation. The only difference between g_anaeig2 and the normal g_anaeig is that it provides a -min option in addition to the -max. (Hopefully the official g_anaeig will soon provide the -min option.) Use arguments for -min and -max are in the fma output. The command line may be similar to:
g_anaeig2 -s prot.pdb -v ewMCM.trr -min -8.25553 -max 7.68362 -extr ewMCM.pdb -nframes 30
Finally, the motions in mcm-extr.pdb or ewMCM.pdb may be visualized with common visualization software (such as PyMol).


Frequently Asked Questions (FAQ)

  1. While compiling, I am getting an error message such as '/usr/bin/ld: cannot find -lf2c', what's wrong?
    Answer: Either you don't have the f2c libraries installed (try locate libf2c, if you have locate on your system), or you have not adapted the line
        set (LIBDIR_F2C /sw/lib)
    in the CMakeLists.txt file.
  2. While compiling I get link errors such as undefined reference to `sgesv_'.
    Answer: The compiler does not find the LAPACK/BLAS libraries. Make sure that
    • the path to the LAPACK/BLAS libs is correctly given in set(LAPACKDIR /home/me/path_to_lapack) in CMakeLists.txt,
    • the names of the LAPACK/BLAS libs is given by set (LIBLAPACK lapack blas). Depending on the file names, that line may also read set (LIBLAPACK lapack_LINUX blas_LINUX) or set (LIBLAPACK lapack_APPLE blas_APPLE) or similar.
      Important: The names must be given without the "lib" at the beginning of the file name.
    • And that the LAPACK/BLAS library file names on your hard disk start with `lib'. If the LAPACK/BLAS libs are called (e.g.) lapack.a and blas.a, please use the mv command to rename them to liblapack.a and libblas.a.
  3. While compiling, I get link errors such as
    undefined reference to `for_len_trim'
    undefined reference to `for_write_seq_fmt'
    undefined reference to `for_write_seq_fmt_xmit'
    undefined reference to `for_stop_core'

    What's wrong?
    Answer: Please try against link to the gfortran libraries, that may help. Please change the line set (LIBS m md_mpi gmx_mpi f2c ${LIBLAPACK})
    set (LIBS m md_mpi gmx_mpi gfortran f2c ${LIBLAPACK})
    in CMakeLists.txt.
  4. Installing f2c on a Fedora Linux. If you are having trouble installing f2c on a Fedora system, this website may help you.
Any suggestions? I am happy to add them here.


Please note: We are not responsible for contents of external links.