MemSurfer, Version 0.1
Released: Jan 10, 2019
firstname.lastname@example.org) and Peer-Timo BremerAuthor: Harsh Bhatia (
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
C++, with the following
- The Computational Geometry Algorithms Library (CGAL):
- Visualization Toolkit (VTK):
v 3.13and above
- pypoisson: Thanks to Miguel Molero
The following describes the installation of
whereas the rest of the dependencies are assumed to be standard and available.
1a. Eigen, CGAL, and VTK (on mac)
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.
PATH_DEP refers to the path where you want to install the dependencies.
$ wget http://bitbucket.org/eigen/eigen/get/3.3.7.tar.bz2 $ tar -xf 3.3.7.tar.bz2 $ mkdir -p $PATH_DEP/include/eigen3 $ cp -r eigen-eigen-323c052e1731/Eigen $PATH_DEP/include/eigen3/
$ wget https://github.com/CGAL/cgal/archive/releases/CGAL-4.13.tar.gz $ tar -xf CGAL-4.13.tar.gz $ mkdir -p cgal-releases-CGAL-4.13/build $ cd cgal-releases-CGAL-4.13/build $ cmake -DCMAKE_INSTALL_PREFIX:STRING=$PATH_DEP \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DWITH_CGAL_Qt5:BOOL=OFF\ .. $ make -j12 $ make install
$ wget https://www.vtk.org/files/release/8.1/VTK-8.1.2.tar.gz $ tar -xf VTK-8.1.2.tar.gz $ mkdir -p VTK-8.1.2/build $ cd VTK-8.1.2/build $ cmake -DCMAKE_INSTALL_PREFIX:STRING=$PATH_DEP \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_CXX_FLAGS:STRING="-Wno-inconsistent-missing-override" \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DVTK_WRAP_PYTHON:BOOL=ON \ .. $ make -j12 $ make install
pypoisson package requires a
C++ compiler that supports
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
$ git clone --recursive git://github.com/mmolero/pypoisson.git $ cd pypoisson # on linux, or on mac if your python was installed with a compiler supporting openmp $ python setup.py 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 setup.py build # installation $ python setup.py 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
$ 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__ <PATH_DEP>/lib/python2.7/site-packages/vtk/__init__.pyc >>> import pypoisson >>> print pypoisson.__file__ <PATH_DEP>/lib/python2.7/site-packages/pypoisson.so
Once the dependencies have been installed,
MemSurfer can be installed simply
distutils. However, you need to explicitly supply the path of the external
$ export BOOST_ROOT=<path_to_boost> # such that boost headers are contained in BOOST_ROOT/include/boost $ export VTK_ROOT=$PATH_DEP $ export CGAL_ROOT=$PATH_DEP $ git clone https://github.com/LLNL/MemSurfer.git $ cd MemSurfer $ python setup.py install
- See the
MemSurfer is released under GPU-3.0 license. See the
LICENSE file for details.