MemSurfer is a software tool to compute bilayer membrane surfaces.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

MemSurfer, Version 0.1

Released: Jan 10, 2019

Author: Harsh Bhatia ( and Peer-Timo Bremer

MemSurfer is a tool to compute and analyze membrane surfaces found in a wide variety of large-scale molecular simulations. MemSurfer works independent of the type of simulation, directly on the 3D point coordinates. As a result, MemSurfer can handle a variety of membranes, such as tethers and vesicles, as well as atomic simulations. MemSurfer provides many in-built analysis tasks, such as computing the membrane curvature, density and normals of lipids, and area per lipid. More importantly, MemSurfer provides a simple-to-use Python API that may be easily used/extended to perform other types of analysis.


Core functionality of MemSurfer is written in python and C++, with the following dependencies.

The following describes the installation of cgal, vtk, eigen, and pypoisson, whereas the rest of the dependencies are assumed to be standard and available.

1a. Eigen, CGAL, and VTK (on mac)

On macosx, the simplest way to install these is using macports. As of Jan 2019, macports installs the correct versions.

$ port install vtk+python
$ port install cgal           # also installs boost and eigen
1b. Eigen, CGAL, and VTK (from source)

Here are the simplified instructions to install these dependencies from source. More detailed instructions can be found from the respective websites.

Note that PATH_DEP refers to the path where you want to install the dependencies.

  • eigen3
$ wget
$ tar -xf 3.3.7.tar.bz2
$ mkdir -p $PATH_DEP/include/eigen3
$ cp -r eigen-eigen-323c052e1731/Eigen $PATH_DEP/include/eigen3/
  • cgal
$ wget
$ tar -xf CGAL-4.13.tar.gz
$ mkdir -p cgal-releases-CGAL-4.13/build
$ cd cgal-releases-CGAL-4.13/build
$ make -j12
$ make install
  • vtk
$ wget
$ tar -xf VTK-8.1.2.tar.gz
$ mkdir -p VTK-8.1.2/build
$ cd VTK-8.1.2/build
        -DCMAKE_CXX_FLAGS:STRING="-Wno-inconsistent-missing-override"  \
$ make -j12
$ make install
2. pypoisson

The pypoisson package requires a C++ compiler that supports openmp. Note that on mac, you may not have openmp installed with clang compiler. If you wish to instead use gnu compiler, you can force distutils to use a compiler different than the default for your python installation.

$ git clone --recursive git://
$ cd pypoisson

  # on linux, or on mac if your python was installed with a compiler supporting openmp
$ python build

  # build command on mac, when you want to use your default gnu compiler that supports openmp
$ CC=`which gcc` CXX=`which g++` LDCXXSHARED="`which g++` -bundle -undefined dynamic_lookup" python build

  # installation
$ python install --prefix=$PATH_DEP
3. Testing the dependencies

Please update your python path to link to the dependencies. Note that it is best to have this added to your .bashrc file.

$ export PYTHONPATH=$PATH_DEP/lib/python2.7/site-packages:$PYTHONPATH

Now, check if you are able to load these modules.

$ python
Python 2.7.15 (default, Sep 12 2018, 13:32:25)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> import vtk
>>> print vtk.__file__

>>> import pypoisson
>>> print pypoisson.__file__
4. MemSurfer

Once the dependencies have been installed, MemSurfer can be installed simply using distutils. However, you need to explicitly supply the path of the external dependencies.

$ export BOOST_ROOT=<path_to_boost>
    # such that boost headers are contained in BOOST_ROOT/include/boost

$ git clone
$ cd MemSurfer
$ python install


  • See the example directory.


MemSurfer is released under GPU-3.0 license. See the LICENSE file for details.