Welcome to MembraneCurvature’s Documentation
Minimum MDAnalysis version: 2.4.0
Last updated: Jul 20, 2026
The MDAnalysis MembraneCurvature tool module calculates the Gaussian and mean curvature from Molecular Dynamics (MD) simulations.
MembraneCurvature derives 2D curvature profiles of a surface of reference.
To suit the needs of your system, we offer flexible atom selection that will
enable you to use the most convenient AtomGroup to extract curvature from your
MD simulations!
This is an example on how to use MembraneCurvature:
import MDAnalysis as mda
from membrane_curvature.base import MembraneCurvature
u = mda.Universe(coordinates, trajectory)
mc = MembraneCurvature(u).run()
surface = mc.results.average_z_surface
mean_curvature = mc.results.average_mean
gaussian_curvature = mc.results.average_gaussian
You can find more details on how to use MembraneCurvature in the Usage page.
Features
MembraneCurvature allows you to:
Derive 2D surface profiles from MD simulations using an atom selection as reference with two different methods: binning or Fourier.
Optional periodic edge padding to reduce finite difference artifacts (binning method only).
Optional brick-wall FFT filter on averaged surface maps (binning method only).
Calculate the mean and Gaussian curvatures of the derived surfaces.
Get per-frame or averaged results for surface, mean and Gaussian curvature.
Why MembraneCurvature?
MembraneCurvature is a user-friendly, actively-maintained, well-documented tool in Python 3 to derive 2D maps of membrane curvature from MD Simulations, using the most recent version of MDAnalysis Are you interested in calculating mean and Gaussian curvature from MD simulations? This tool is for you!
Installation
MembraneCurvature is available via pip, conda, and uv. Please refer to the Installation section in the Getting Started page for detailed installation instructions.
Contents:
- Getting Started
- MembraneCurvature’s API Documentation
- Algorithm
- Overview
- 1. Select atoms of reference
- 2. Choose surface method
- 2.1 Fourier method
- 2.2. Binning method
- 3. Derive surface and calculate surface derivatives
- 3.1. Derive surface
- 3.2. Calculate derivatives
- 3.2.1. Binning + finite differences (
surface_method='binning') - 3.2.1.1. Edge padding (
padding=True) - 3.2.1.2. FFT filtering on the averaged surface (
fft_filter) - 3.2.2. Fourier fit + analytic derivatives (
surface_method='fourier') - 3.3. Mean curvature
- 3.4. Gaussian curvature
- 4. Average over frames
- Usage
- Visualization
- Tutorials
License
Source code included in this project is available under the GNU Public License v3 from github.com/MDAnalysis/membrane_curvature.